mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-28 02:51:51 +01:00
Removed if/else change because it is not required.
This commit is contained in:
parent
d2098c3dbe
commit
941d9d3dc5
@ -98,7 +98,8 @@ public class HurtingListener extends AbstractFlagListener {
|
|||||||
e.getHook().remove();
|
e.getHook().remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (e.getCaught() instanceof Monster || e.getCaught() instanceof Squid || e.getCaught() instanceof Slime) {
|
}
|
||||||
|
if (e.getCaught() instanceof Monster || e.getCaught() instanceof Squid || e.getCaught() instanceof Slime) {
|
||||||
if (checkIsland(e, e.getCaught().getLocation(), Flags.HURT_MONSTERS)) {
|
if (checkIsland(e, e.getCaught().getLocation(), Flags.HURT_MONSTERS)) {
|
||||||
e.getHook().remove();
|
e.getHook().remove();
|
||||||
return;
|
return;
|
||||||
@ -195,7 +196,7 @@ public class HurtingListener extends AbstractFlagListener {
|
|||||||
checkIsland(e, entity.getLocation(), Flags.HURT_MONSTERS);
|
checkIsland(e, entity.getLocation(), Flags.HURT_MONSTERS);
|
||||||
}
|
}
|
||||||
// Mobs being hurt
|
// Mobs being hurt
|
||||||
else if (entity instanceof Animals || entity instanceof IronGolem || entity instanceof Snowman
|
if (entity instanceof Animals || entity instanceof IronGolem || entity instanceof Snowman
|
||||||
|| entity instanceof Villager) {
|
|| entity instanceof Villager) {
|
||||||
checkIsland(e, entity.getLocation(), Flags.HURT_MONSTERS);
|
checkIsland(e, entity.getLocation(), Flags.HURT_MONSTERS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user