From 3b5a2827894a39fdcdf5527a024a4b69901ea385 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 10 Nov 2021 20:01:21 +0100 Subject: [PATCH] Improve behaviour during check session Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/listener/HotbarGUI.java | 2 +- .../de/steamwar/fightsystem/listener/PistonListener.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/HotbarGUI.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/HotbarGUI.java index 2906a33..125b17f 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/HotbarGUI.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/HotbarGUI.java @@ -49,7 +49,6 @@ public class HotbarGUI implements Listener { if(event.getItem() == null) return; - event.setCancelled(true); FightTeam fightTeam = Fight.getPlayerTeam(player); if(fightTeam == null) return; @@ -60,6 +59,7 @@ public class HotbarGUI implements Listener { if(displayName == null) return; + event.setCancelled(true); onMatch(player, displayName, "CHOOSE_SCHEMATIC", () -> GUI.preSchemDialog(player), Config.GameName); onMatch(player, displayName, "INVITE_PLAYERS", () -> GUI.chooseInvitation(player)); onMatch(player, displayName, "REMOVE_PLAYERS", () -> GUI.chooseRemove(player)); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java index adb4195..8235216 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/PistonListener.java @@ -19,6 +19,7 @@ package de.steamwar.fightsystem.listener; +import de.steamwar.fightsystem.ArenaMode; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.StateDependentListener; @@ -32,8 +33,10 @@ public class PistonListener implements Listener { public PistonListener() { //Wenn Entern aktiv ist, sollen Raketen etc. entern können - new StateDependentListener(Config.EnterStages.isEmpty(), FightState.All, this); - new StateDependentListener(!Config.EnterStages.isEmpty(), FightState.Setup, this); + if(!ArenaMode.Check.contains(Config.mode)) { + new StateDependentListener(Config.EnterStages.isEmpty(), FightState.All, this); + new StateDependentListener(!Config.EnterStages.isEmpty(), FightState.Setup, this); + } } @EventHandler -- 2.39.2