Make sure DENY_EXIT checks for the admin override permission. Fixes #2411.

This commit is contained in:
Alexander Söderberg 2019-10-27 12:11:48 +01:00
parent 2e15934666
commit 3be0be1b60

View File

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