Fix applying respawn inventory after time went out; resolves #392

This commit is contained in:
Daniel Saukel 2018-05-24 20:41:51 +02:00
parent 6194b7ac54
commit e2456f360b

View File

@ -70,8 +70,9 @@ public class TimeIsRunningTask extends BukkitRunnable {
if (!dPlayerKickEvent.isCancelled()) {
MessageUtil.broadcastMessage(DMessage.PLAYER_TIME_KICK.getMessage(player.getName()));
boolean keepInventory = Game.getByDGroup(dGroup).getRules().getKeepInventoryOnEscape();
dPlayer.leave();
if (Game.getByDGroup(dGroup).getRules().getKeepInventoryOnEscape()) {
if (keepInventory) {
dPlayer.applyRespawnInventory();
}
}