Might work?

This commit is contained in:
Jesse Boyd 2016-08-17 12:22:37 +10:00
parent 6b95e57d9e
commit f651607d2f
2 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,7 @@ public final class Flags {
}; };
public static final BooleanFlag SLEEP = new BooleanFlag("sleep"); public static final BooleanFlag SLEEP = new BooleanFlag("sleep");
public static final TeleportDenyFlag DENY_TELEPORT = new TeleportDenyFlag("deny-teleport"); public static final TeleportDenyFlag DENY_TELEPORT = new TeleportDenyFlag("deny-teleport");
public static final BooleanFlag DENY_EXIT = new BooleanFlag("deny-exit");
private static final HashMap<String, Flag<?>> flags; private static final HashMap<String, Flag<?>> flags;

View File

@ -182,6 +182,9 @@ public class PlotListener {
if (pw == null) { if (pw == null) {
return true; return true;
} }
if (Flags.DENY_EXIT.isTrue(plot)) {
return false;
}
if (plot.getFlag(Flags.GAMEMODE).isPresent() || plot.getFlag(Flags.GUEST_GAMEMODE).isPresent()) { if (plot.getFlag(Flags.GAMEMODE).isPresent() || plot.getFlag(Flags.GUEST_GAMEMODE).isPresent()) {
if (player.getGameMode() != pw.GAMEMODE) { if (player.getGameMode() != pw.GAMEMODE) {
if (!Permissions.hasPermission(player, "plots.gamemode.bypass")) { if (!Permissions.hasPermission(player, "plots.gamemode.bypass")) {