diff --git a/triton-spigot/src/main/java/com/rexcantor64/triton/spigot/listeners/BukkitListener.java b/triton-spigot/src/main/java/com/rexcantor64/triton/spigot/listeners/BukkitListener.java index 5e5edc5e..d98d5bc9 100644 --- a/triton-spigot/src/main/java/com/rexcantor64/triton/spigot/listeners/BukkitListener.java +++ b/triton-spigot/src/main/java/com/rexcantor64/triton/spigot/listeners/BukkitListener.java @@ -32,6 +32,8 @@ public void onLogin(AsyncPlayerPreLoginEvent loginEvent) { .translateString(loginEvent.getKickMessage(), languagePlayer, Triton.get().getConfig().getKickSyntax()) .ifChanged(loginEvent::setKickMessage) .ifUnchanged(() -> loginEvent.setKickMessage("")); + // Unregister the player, otherwise their language will stay (perhaps incorrectly) cached + SpigotTriton.asSpigot().getPlayerManager().unregisterPlayer(loginEvent.getUniqueId()); } } @@ -43,6 +45,8 @@ public void onLoginSync(PlayerLoginEvent loginEvent) { .translateString(loginEvent.getKickMessage(), languagePlayer, Triton.get().getConfig().getKickSyntax()) .ifChanged(loginEvent::setKickMessage) .ifUnchanged(() -> loginEvent.setKickMessage("")); + // Unregister the player, otherwise their language will stay (perhaps incorrectly) cached + SpigotTriton.asSpigot().getPlayerManager().unregisterPlayer(loginEvent.getPlayer().getUniqueId()); } }