diff --git a/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java index 256c65d9d..e499bc26e 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java @@ -96,8 +96,6 @@ public class AdminDeleteCommand extends ConfirmableCommand { } private void cleanUp(User user, User target) { - // Execute commands when leaving - Util.runCommands(user, getIWM().getOnLeaveCommands(getWorld()), "leave"); // Remove money inventory etc. if (getIWM().isOnLeaveResetEnderChest(getWorld())) { target.getPlayer().getEnderChest().clear(); @@ -123,6 +121,8 @@ public class AdminDeleteCommand extends ConfirmableCommand { target.getPlayer().setTotalExperience(0); } + // Execute commands when leaving + Util.runCommands(target, getIWM().getOnLeaveCommands(getWorld()), "leave"); } @Override @@ -135,4 +135,4 @@ public class AdminDeleteCommand extends ConfirmableCommand { List options = new ArrayList<>(Util.getOnlinePlayerList(user)); return Optional.of(Util.tabLimit(options, lastArg)); } -} \ No newline at end of file +}