Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes a bug with on-join commands #1926

Merged
merged 1 commit into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,8 @@ private void cleanPlayer(User user) {
if (getIWM().isOnJoinResetXP(getWorld())) {
user.getPlayer().setTotalExperience(0);
}

// Execute commands
Util.runCommands(user, getIWM().getOnJoinCommands(getWorld()), "join");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1154,9 +1154,6 @@ private void teleported(World world, User user, String name, boolean newIsland,
// 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();
Expand Down Expand Up @@ -1185,6 +1182,9 @@ private void teleported(World world, User user, String name, boolean newIsland,

// 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());
Expand Down