Fixes a bug with on-join commands not working when players join the team. #1925 (#1926)

This commit is contained in:
BONNe 2022-01-24 01:25:27 +02:00 committed by GitHub
parent 2f0869fd6e
commit 56c9f5c28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -222,5 +222,8 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
if (getIWM().isOnJoinResetXP(getWorld())) {
user.getPlayer().setTotalExperience(0);
}
// Execute commands
Util.runCommands(user, getIWM().getOnJoinCommands(getWorld()), "join");
}
}

View File

@ -1154,9 +1154,6 @@ public class IslandsManager {
// Do nothing
return;
}
// Execute commands
Util.runCommands(user, plugin.getIWM().getOnJoinCommands(world), "join");
// Remove money inventory etc.
if (plugin.getIWM().isOnJoinResetEnderChest(world)) {
user.getPlayer().getEnderChest().clear();
@ -1185,6 +1182,9 @@ public class IslandsManager {
// Set the game mode
user.setGameMode(plugin.getIWM().getDefaultGameMode(world));
// Execute commands
Util.runCommands(user, plugin.getIWM().getOnJoinCommands(world), "join");
}
// Remove from mid-teleport set
goingHome.remove(user.getUniqueId());