This commit is contained in:
libraryaddict 2014-06-10 12:42:00 +12:00
parent 572d94219d
commit 53754ee684

View File

@ -143,30 +143,26 @@ public enum DisguiseType {
// Without erroring up everything. // Without erroring up everything.
for (DisguiseType type : values()) { for (DisguiseType type : values()) {
try { try {
DisguiseType toUse = type;
switch (type) { switch (type) {
// Disguise item frame isn't supported. So we don't give it a entity type which should prevent it from being.. // Disguise item frame isn't supported. So we don't give it a entity type which should prevent it from being..
// Usable. // Usable.
case ITEM_FRAME:
break;
case DONKEY: case DONKEY:
case MULE: case MULE:
case UNDEAD_HORSE: case UNDEAD_HORSE:
case SKELETON_HORSE: case SKELETON_HORSE:
type = DisguiseType.HORSE; toUse = DisguiseType.HORSE;
break; break;
case ZOMBIE_VILLAGER: case ZOMBIE_VILLAGER:
type = DisguiseType.ZOMBIE; toUse = DisguiseType.ZOMBIE;
break; break;
case WITHER_SKELETON: case WITHER_SKELETON:
type = DisguiseType.SKELETON; toUse = DisguiseType.SKELETON;
break; break;
default: default:
break; break;
} }
EntityType entityType = EntityType.valueOf(type.name()); type.setEntityType(EntityType.valueOf(toUse.name()));
if (entityType != null) {
type.setEntityType(entityType);
}
} catch (Throwable ex) { } catch (Throwable ex) {
// This version of craftbukkit doesn't have the disguise. // This version of craftbukkit doesn't have the disguise.
} }