mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #373
This commit is contained in:
parent
ec204bb4c4
commit
757e502b14
@ -104,6 +104,8 @@ public enum C {
|
||||
WORLDEDIT_BYPASS("$2&oTo bypass your restrictions use $4/plot wea", "WorldEdit Masks"),
|
||||
WORLDEDIT_UNMASKED("$1Your WorldEdit is now unrestricted.", "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
|
||||
*/
|
||||
|
@ -133,7 +133,15 @@ public class PlotListener extends APlotListener {
|
||||
|
||||
final Flag gamemodeFlag = flags.get("gamemode");
|
||||
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");
|
||||
if (flyFlag != null) {
|
||||
|
@ -123,4 +123,6 @@ permissions:
|
||||
plots.undeny: true
|
||||
plots.kick: true
|
||||
plots.worldedit.bypass:
|
||||
default: false
|
||||
default: false
|
||||
plots.gamemode.bypass:
|
||||
default: op
|
Loading…
Reference in New Issue
Block a user