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()); }