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

Fix for multiverse teleportation problems on a multiworld server (also see thread in Discord server) #52

Closed
Closed
Changes from 1 commit
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
Prev Previous commit
Merge branch 'master' into mv-teleport-fix
Waterman1001 authored Jun 26, 2024
commit 501c18019944ee3e047743f9dfd803ee7e78b2c9
Original file line number Diff line number Diff line change
@@ -105,9 +105,9 @@ public void joinAttempt(@NotNull Player player, @NotNull IPluginArena arena) {
plugin.getUserManager().getUser(player).setKit(plugin.getKitRegistry().getDefaultKit());
}
plugin.getSpecialItemManager().addSpecialItemsOfStage(player, SpecialItem.DisplayStage.LOBBY);
if(arena.getArenaState() == ArenaState.WAITING_FOR_PLAYERS) {
if(arena.getArenaState() == IArenaState.WAITING_FOR_PLAYERS) {
plugin.getSpecialItemManager().addSpecialItemsOfStage(player, SpecialItem.DisplayStage.WAITING_FOR_PLAYERS);
} else if(arena.getArenaState().isStartingStage(arena)) {
} else if(ArenaState.isStartingStage(arena)) {
plugin.getSpecialItemManager().addSpecialItemsOfStage(player, SpecialItem.DisplayStage.ENOUGH_PLAYERS_TO_START);
}

Original file line number Diff line number Diff line change
@@ -73,11 +73,11 @@ public static void hidePlayersOutsideTheGame(Player player, PluginArena arena) {
VersionUtils.hidePlayer(plugin, players, player);
}
}

public static CompletableFuture<Void> preparePlayerForGame(
PluginArena arena, Player player, Location location, boolean spectator) {
IPluginArena arena, Player player, Location location, boolean spectator) {
return VersionUtils.teleport(player, location).thenAccept(bo -> {
User user = plugin.getUserManager().getUser(player);
IUser user = plugin.getUserManager().getUser(player);
if (plugin.getConfigPreferences().getOption("INVENTORY_MANAGER")) {
InventorySerializer.saveInventoryToFile(plugin, player);
}
@@ -117,7 +117,7 @@ public static CompletableFuture<Void> preparePlayerForGame(
user.setSpectator(false);
}
player.updateInventory();
arena.getBossbarManager().doBarAction(PluginArena.BarAction.ADD, player);
arena.getBossbarManager().doBarAction(IPluginArena.IBarAction.ADD, player);
arena.getScoreboardManager().createScoreboard(user);
});
}
You are viewing a condensed version of this merge commit. You can view the full changes here.