diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEventUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEventUtil.java index c28a0a78c..31adf2aad 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEventUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEventUtil.java @@ -110,12 +110,12 @@ public class BukkitEventUtil extends EventUtil { @Override public void callTrusted(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotHelperEvent(getPlayer(initiator), plot, player, added)); + callEvent(new PlayerPlotTrustedEvent(getPlayer(initiator), plot, player, added)); } @Override public void callMember(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotTrustedEvent(getPlayer(initiator), plot, player, added)); + callEvent(new PlayerPlotHelperEvent(getPlayer(initiator), plot, player, added)); } @Override diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Remove.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Remove.java index b1ad27bf3..9e311f743 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Remove.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Remove.java @@ -5,6 +5,7 @@ import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.EventUtil; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; @@ -71,20 +72,30 @@ public class Remove extends SubCommand { if (!uuids.isEmpty()) { for (UUID uuid : uuids) { if (uuid == DBFunc.everyone) { - if (plot.removeTrusted(uuid) | plot.removeMember(uuid) | plot.removeDenied(uuid)) { + if (plot.removeTrusted(uuid)){ + EventUtil.manager.callTrusted(player, plot, uuid, false); + count++; + }else if (plot.removeMember(uuid)) { + EventUtil.manager.callMember(player, plot, uuid, false); + count++; + }else if (plot.removeDenied(uuid)) { + EventUtil.manager.callDenied(player, plot, uuid, false); count++; } } else if (plot.getTrusted().contains(uuid)) { if (plot.removeTrusted(uuid)) { + EventUtil.manager.callTrusted(player, plot, uuid, false); count++; } } else if (plot.getMembers().contains(uuid)) { if (plot.removeMember(uuid)) { + EventUtil.manager.callMember(player, plot, uuid, false); count++; } } else if (plot.getDenied().contains(uuid)) { if (plot.removeDenied(uuid)) { + EventUtil.manager.callDenied(player, plot, uuid, false); count++; } } diff --git a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeEventUtil.java b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeEventUtil.java index d5f07d5d3..5dcc80c67 100644 --- a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeEventUtil.java +++ b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeEventUtil.java @@ -106,12 +106,12 @@ public class SpongeEventUtil extends EventUtil { @Override public void callTrusted(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotHelperEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); + callEvent(new PlayerPlotTrustedEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); } @Override public void callMember(PlotPlayer initiator, Plot plot, UUID player, boolean added) { - callEvent(new PlayerPlotTrustedEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); + callEvent(new PlayerPlotHelperEvent(SpongeUtil.getPlayer(initiator), plot, player, added)); } @Override