diff --git a/src/com/dre/dungeonsxl/listener/PlayerListener.java b/src/com/dre/dungeonsxl/listener/PlayerListener.java index fc1a4058..b5b4f028 100644 --- a/src/com/dre/dungeonsxl/listener/PlayerListener.java +++ b/src/com/dre/dungeonsxl/listener/PlayerListener.java @@ -314,9 +314,14 @@ public class PlayerListener implements Listener { Player player = event.getPlayer(); // Check dplayers - DPlayer dplayer = DPlayer.get(event.getPlayer().getName()); + DPlayer dplayer = DPlayer.get(player.getName()); if (dplayer != null) { - dplayer.player = event.getPlayer(); + DGroup dgroup = DGroup.get(dplayer.player); + if (dgroup != null) { + dgroup.getPlayers().remove(dplayer.player); + dgroup.getPlayers().add(player); + } + dplayer.player = player; // Check offlineTime dplayer.offlineTime = 0;