From 43c07020a2cdf3e369718b9719641fdd5f899f42 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 30 Sep 2017 18:37:12 -0700 Subject: [PATCH] Fixes splash potion attack. https://github.com/tastybento/ASkyBlock-Bugs-N-Features/issues/483 Mobs could not be hurt even if you were the island owner. --- src/com/wasteofplastic/askyblock/listeners/IslandGuard.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/wasteofplastic/askyblock/listeners/IslandGuard.java b/src/com/wasteofplastic/askyblock/listeners/IslandGuard.java index d459bc6f1..1765a5dc6 100644 --- a/src/com/wasteofplastic/askyblock/listeners/IslandGuard.java +++ b/src/com/wasteofplastic/askyblock/listeners/IslandGuard.java @@ -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; } @@ -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)