mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16: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_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
|
||||||
*/
|
*/
|
||||||
|
@ -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) {
|
||||||
|
if (!player.hasPermission("plots.gamemode.bypass")) {
|
||||||
player.setGameMode(getGameMode(gamemodeFlag.getValueString()));
|
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) {
|
||||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user