diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/GamemodeCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/GamemodeCommand.java index 8282da94..729ec5c7 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/GamemodeCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/GamemodeCommand.java @@ -49,6 +49,9 @@ public class GamemodeCommand extends SWCommand { @Register public void gamemodeCommand(final Player p, final GameMode gameMode) { + if (NoClipCommand.getNOCLIPS().contains(p)) { + p.performCommand("noclip"); + } p.setGameMode(gameMode); } } \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/NoClipCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/NoClipCommand.java index bf134a8c..4d8d5f1f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/NoClipCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/NoClipCommand.java @@ -34,6 +34,7 @@ import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; import de.steamwar.core.VersionedRunnable; +import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer; @@ -56,6 +57,7 @@ import java.util.logging.Level; @Linked(LinkageType.LISTENER) public class NoClipCommand extends SWCommand implements Listener { + @Getter private static final List NOCLIPS = new ArrayList<>(); private static final Map LAST_TICKS = new HashMap<>();