From 790fd5bccd34619290aeac80e1bb5a6f1b3c30fc Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sun, 1 Jan 2017 10:52:13 +0100 Subject: [PATCH] bugfix: allow null gate parameter. --- src/de/craftinc/gates/controllers/PermissionController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/de/craftinc/gates/controllers/PermissionController.java b/src/de/craftinc/gates/controllers/PermissionController.java index ccbe58e..872169b 100644 --- a/src/de/craftinc/gates/controllers/PermissionController.java +++ b/src/de/craftinc/gates/controllers/PermissionController.java @@ -23,6 +23,10 @@ public class PermissionController { assert(sender != null); assert(permission != null); + if (gate == null) { + return hasPermission(sender, permission); + } + final Location location = gate.getLocation(); final Location exit = gate.getExit();