This commit is contained in:
Sauilitired 2015-07-18 10:26:55 +02:00
parent ec204bb4c4
commit 757e502b14
3 changed files with 14 additions and 2 deletions

View File

@ -104,6 +104,8 @@ public enum C {
WORLDEDIT_BYPASS("$2&oTo bypass your restrictions use $4/plot wea", "WorldEdit Masks"), WORLDEDIT_BYPASS("$2&oTo bypass your restrictions use $4/plot wea", "WorldEdit Masks"),
WORLDEDIT_UNMASKED("$1Your WorldEdit is now unrestricted.", "WorldEdit Masks"), WORLDEDIT_UNMASKED("$1Your WorldEdit is now unrestricted.", "WorldEdit Masks"),
WORLDEDIT_RESTRICTED("$1Your WorldEdit is now restricted.", "WorldEdit Masks"), WORLDEDIT_RESTRICTED("$1Your WorldEdit is now restricted.", "WorldEdit Masks"),
GAMEMODE_WAS_BYPASSED("$1You bypassed the gamemode ($2{gamemode}) $1set for this plot", "Gamemode"),
/* /*
* Records * Records
*/ */

View File

@ -133,7 +133,15 @@ public class PlotListener extends APlotListener {
final Flag gamemodeFlag = flags.get("gamemode"); final Flag gamemodeFlag = flags.get("gamemode");
if (gamemodeFlag != null) { if (gamemodeFlag != null) {
player.setGameMode(getGameMode(gamemodeFlag.getValueString())); if (!player.hasPermission("plots.gamemode.bypass")) {
player.setGameMode(getGameMode(gamemodeFlag.getValueString()));
} else {
MainUtil.sendMessage(
pp,
C.GAMEMODE_WAS_BYPASSED.s().replace("{plot}", plot.getId().toString()).replace("{gamemode}", gamemodeFlag.getValueString()),
true
);
}
} }
final Flag flyFlag = flags.get("fly"); final Flag flyFlag = flags.get("fly");
if (flyFlag != null) { if (flyFlag != null) {

View File

@ -124,3 +124,5 @@ permissions:
plots.kick: true plots.kick: true
plots.worldedit.bypass: plots.worldedit.bypass:
default: false default: false
plots.gamemode.bypass:
default: op