From 3be0be1b604c8b58bbbb98e17a0b3fa0dd040083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 27 Oct 2019 12:11:48 +0100 Subject: [PATCH] Make sure DENY_EXIT checks for the admin override permission. Fixes #2411. --- .../plotsquared/plot/listener/PlotListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java index 4911f9f47..ce1007e15 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/listener/PlotListener.java @@ -200,7 +200,9 @@ public class PlotListener { if (pw == null) { return true; } - if (Flags.DENY_EXIT.isTrue(plot) && !player.getMeta("kick", false)) { + if (Flags.DENY_EXIT.isTrue(plot) + && !Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_EXIT_DENIED) + && !player.getMeta("kick", false)) { if (previous != null) { player.setMeta(PlotPlayer.META_LAST_PLOT, previous); }