Don't bother checking if the entity is disguised before cancelling packet as it should be cancelled anyways

This commit is contained in:
libraryaddict 2013-12-02 01:36:55 +13:00
parent 4aa148d1eb
commit 25a6e713af

View File

@ -111,8 +111,7 @@ public class PacketsManager {
Player observer = event.getPlayer();
StructureModifier<Entity> entityModifer = event.getPacket().getEntityModifier(observer.getWorld());
org.bukkit.entity.Entity entity = entityModifer.read(1);
if (DisguiseAPI.isDisguised(entity)
&& (entity instanceof ExperienceOrb || entity instanceof Item || entity instanceof Arrow)) {
if (entity instanceof ExperienceOrb || entity instanceof Item || entity instanceof Arrow) {
event.setCancelled(true);
}
} catch (Exception e) {