The "spawner|mobType" syntax once again makes functional mob spawners.

Also fix block parser context not being restricted.
This commit is contained in:
wizjany
2019-05-18 09:52:24 -04:00
parent 3173e26109
commit 334d5cfaab
5 changed files with 45 additions and 32 deletions

View File

@ -86,7 +86,10 @@ public class BukkitServerInterface implements MultiUserPlatform {
@Override
public boolean isValidMobType(String type) {
final EntityType entityType = EntityType.fromName(type);
if (!type.startsWith("minecraft:")) {
return false;
}
final EntityType entityType = EntityType.fromName(type.substring(10));
return entityType != null && entityType.isAlive();
}