From e2456f360b67f136f36968876175db04a3f751df Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Thu, 24 May 2018 20:41:51 +0200 Subject: [PATCH] Fix applying respawn inventory after time went out; resolves #392 --- .../java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java b/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java index 52e52dbb..bbbadc3b 100644 --- a/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java +++ b/src/main/java/de/erethon/dungeonsxl/player/TimeIsRunningTask.java @@ -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(); } }