From 4d737afc4f7a40e417aea6e046d61c2590a586a7 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Thu, 28 Jul 2022 22:00:31 -0400 Subject: [PATCH] stop kicking from standing ontop of hidden block --- .../hideAndSeek/game/listener/JoinLeaveHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/listener/JoinLeaveHandler.java b/src/main/java/net/tylermurphy/hideAndSeek/game/listener/JoinLeaveHandler.java index 5233d2e..82369c8 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/listener/JoinLeaveHandler.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/listener/JoinLeaveHandler.java @@ -56,6 +56,10 @@ public class JoinLeaveHandler implements Listener { @EventHandler(priority = EventPriority.MONITOR) public void onKick(PlayerKickEvent event) { + if(event.getReason().equals("Flying is not enabled on this server!")){ + event.setCancelled(true); + return; + } handleLeave(event.getPlayer()); }