From 7822bb965182a04618fa5ce3a7de3856e527b309 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 5 Mar 2022 16:44:48 +0100 Subject: [PATCH] Fix leave messages Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/listener/Permanent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java index bb6e72d..6f0b877 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/Permanent.java @@ -85,13 +85,13 @@ public class Permanent implements Listener { @EventHandler(priority = EventPriority.MONITOR) public void handlePlayerDeath(PlayerDeathEvent event) { - if(Fight.fighting(event.getEntity())) + if(!Config.ArenaLeaveable || Fight.fighting(event.getEntity())) event.setDeathMessage(null); } @EventHandler(priority = EventPriority.MONITOR) public void handlePlayerLeave(PlayerQuitEvent event) { - if(Fight.fighting(event.getPlayer())) + if(!Config.ArenaLeaveable) event.setQuitMessage(null); }