From 580fda0273ee4db16880833890c259c58563c971 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sun, 19 May 2013 12:01:55 +0200 Subject: [PATCH] Don't teleport if gates are closed. --- src/de/craftinc/gates/listeners/PlayerMoveListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/craftinc/gates/listeners/PlayerMoveListener.java b/src/de/craftinc/gates/listeners/PlayerMoveListener.java index cf97b85..584badb 100644 --- a/src/de/craftinc/gates/listeners/PlayerMoveListener.java +++ b/src/de/craftinc/gates/listeners/PlayerMoveListener.java @@ -37,6 +37,11 @@ public class PlayerMoveListener implements Listener if (gateAtLocation == null) { return; } + + if (!gateAtLocation.isOpen()) { + return; + } + // Check for permission if (!hasPermission(event.getPlayer(), gateAtLocation)) {