Skip to content

Commit

Permalink
Fixes splash potion attack.
Browse files Browse the repository at this point in the history
tastybento/ASkyBlock-Bugs-N-Features#483

Mobs could not be hurt even if you were the island owner.
  • Loading branch information
tastybento committed Oct 1, 2017
1 parent f90b504 commit 43c0702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/wasteofplastic/askyblock/listeners/IslandGuard.java
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@ public void onSplashPotionSplash(final PotionSplashEvent e) {
// Monsters being hurt
if (entity instanceof Monster || entity instanceof Slime || entity instanceof Squid) {
// Normal island check
if (island != null && island.getMembers().contains(attacker)) {
if (island != null && island.getMembers().contains(attacker.getUniqueId())) {
// Members always allowed
continue;
}
Expand All @@ -2577,7 +2577,7 @@ public void onSplashPotionSplash(final PotionSplashEvent e) {
// Mobs being hurt
if (entity instanceof Animals || entity instanceof IronGolem || entity instanceof Snowman
|| entity instanceof Villager) {
if (island != null && (island.getIgsFlag(SettingsFlag.HURT_MOBS) || island.getMembers().contains(attacker))) {
if (island != null && (island.getIgsFlag(SettingsFlag.HURT_MOBS) || island.getMembers().contains(attacker.getUniqueId()))) {
continue;
}
if (DEBUG)
Expand Down

0 comments on commit 43c0702

Please sign in to comment.