Add missing break, remove boolean and just continue

This commit is contained in:
Andrew 2013-08-06 00:21:47 +12:00
parent e19af33a47
commit 9f7b3620ca

View file

@ -458,7 +458,6 @@ public class LibsDisguises extends JavaPlugin {
} }
disguiseType.setWatcherClass(watcherClass); disguiseType.setWatcherClass(watcherClass);
String name = toReadable(disguiseType.name()); String name = toReadable(disguiseType.name());
boolean dontDo = false;
switch (disguiseType) { switch (disguiseType) {
case WITHER_SKELETON: case WITHER_SKELETON:
case ZOMBIE_VILLAGER: case ZOMBIE_VILLAGER:
@ -466,8 +465,7 @@ public class LibsDisguises extends JavaPlugin {
case MULE: case MULE:
case UNDEAD_HORSE: case UNDEAD_HORSE:
case SKELETON_HORSE: case SKELETON_HORSE:
dontDo = true; continue;
break;
case PRIMED_TNT: case PRIMED_TNT:
name = "TNTPrimed"; name = "TNTPrimed";
break; break;
@ -495,8 +493,6 @@ public class LibsDisguises extends JavaPlugin {
default: default:
break; break;
} }
if (dontDo)
continue;
try { try {
net.minecraft.server.v1_6_R2.Entity entity = null; net.minecraft.server.v1_6_R2.Entity entity = null;
Class entityClass; Class entityClass;
@ -559,7 +555,7 @@ public class LibsDisguises extends JavaPlugin {
Disguise disguise = DisguiseAPI.getDisguise(entity); Disguise disguise = DisguiseAPI.getDisguise(entity);
// If disguised. // If disguised.
if (disguise != null) { if (disguise != null) {
// If packet is Packets.Server.UPDATE_ATTRIBUTES - For some reason maven doesn't let me.. // If packet is Packets.Server.UPDATE_ATTRIBUTES
// This packet sends attributes // This packet sends attributes
switch (sentPacket.getID()) { switch (sentPacket.getID()) {
@ -645,6 +641,7 @@ public class LibsDisguises extends JavaPlugin {
packets[0].getModifier().write(2, packets[0].getModifier().write(2,
(itemstack.getTypeId() == 0 ? null : CraftItemStack.asNMSCopy(itemstack))); (itemstack.getTypeId() == 0 ? null : CraftItemStack.asNMSCopy(itemstack)));
} }
break;
} }
default: default: