mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 11:37:05 +01:00
Fix timeUntilKickOfflinePlayer; resolves #826
This commit is contained in:
parent
a4616b07ac
commit
9167face12
@ -788,6 +788,8 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dPlayer.setPlayer(player);
|
dPlayer.setPlayer(player);
|
||||||
|
playerCache.remove(dPlayer);
|
||||||
|
playerCache.add(player, dPlayer);
|
||||||
dPlayer.setOfflineTimeMillis(0);
|
dPlayer.setOfflineTimeMillis(0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -449,9 +449,11 @@ public class DPlayerListener implements Listener {
|
|||||||
} else if (timeUntilKickOfflinePlayer > 0) {
|
} else if (timeUntilKickOfflinePlayer > 0) {
|
||||||
dGroup.sendMessage(DMessage.PLAYER_OFFLINE.getMessage(dPlayer.getName(), String.valueOf(timeUntilKickOfflinePlayer)), player);
|
dGroup.sendMessage(DMessage.PLAYER_OFFLINE.getMessage(dPlayer.getName(), String.valueOf(timeUntilKickOfflinePlayer)), player);
|
||||||
((GamePlayer) dPlayer).setOfflineTimeMillis(System.currentTimeMillis() + timeUntilKickOfflinePlayer * 1000);
|
((GamePlayer) dPlayer).setOfflineTimeMillis(System.currentTimeMillis() + timeUntilKickOfflinePlayer * 1000);
|
||||||
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dGroup.sendMessage(DMessage.PLAYER_OFFLINE_NEVER.getMessage(dPlayer.getName()), player);
|
dGroup.sendMessage(DMessage.PLAYER_OFFLINE_NEVER.getMessage(dPlayer.getName()), player);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (dPlayer instanceof InstancePlayer) {
|
} else if (dPlayer instanceof InstancePlayer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user