geforkt von Mirrors/FastAsyncWorldEdit
Adding missing permissions
Added some basic permissions to some basic and fawe specific commands. Since they weren't around previously, they are true by default, however, you can now revoke/negate them.
Dieser Commit ist enthalten in:
Ursprung
1f14d4652e
Commit
5f037df326
@ -273,7 +273,7 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
||||
}
|
||||
File pluginsFolder = MainUtil.getJarFile().getParentFile();
|
||||
for (File file : pluginsFolder.listFiles()) {
|
||||
if (file.length() == 1988) return;
|
||||
if (file.length() == 2016) return;
|
||||
}
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit");
|
||||
File dummy = MainUtil.copyFile(MainUtil.getJarFile(), "DummyFawe.src", pluginsFolder, "DummyFawe.jar");
|
||||
|
Binäre Datei nicht angezeigt.
@ -203,6 +203,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
help = "Set the right click brush",
|
||||
min = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.primary")
|
||||
public void primary(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
BaseItem item = player.getItemInHand(HandSide.MAIN_HAND);
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
@ -223,6 +224,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
help = "Set the left click brush",
|
||||
min = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.secondary")
|
||||
public void secondary(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
BaseItem item = player.getItemInHand(HandSide.MAIN_HAND);
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
@ -247,6 +249,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
min = 0,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.visualize")
|
||||
public void visual(Player player, LocalSession session, @Range(min = 0, max = 2)int mode) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
@ -266,6 +269,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
min = 0,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.target")
|
||||
public void target(Player player, LocalSession session, @Optional("0") int mode) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
@ -285,6 +289,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
min = 1,
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.targetmask")
|
||||
public void targetMask(Player player, EditSession editSession, LocalSession session, CommandContext context) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
@ -308,6 +313,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
min = 1,
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.targetoffset")
|
||||
public void targetOffset(Player player, EditSession editSession, LocalSession session, int offset) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
@ -325,6 +331,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
min = 1,
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.scroll")
|
||||
public void scroll(Player player, EditSession editSession, LocalSession session, @Optional @Switch('h') boolean offHand, CommandContext args) throws WorldEditException {
|
||||
BrushTool bt = session.getBrushTool(player, false);
|
||||
if (bt == null) {
|
||||
|
@ -51,6 +51,7 @@ public class OptionsCommands {
|
||||
aliases = {"/tips", "tips"},
|
||||
desc = "Toggle FAWE tips"
|
||||
)
|
||||
@CommandPermissions("fawe.tips")
|
||||
public void tips(Player player, LocalSession session) throws WorldEditException {
|
||||
FawePlayer<Object> fp = FawePlayer.wrap(player);
|
||||
if (fp.toggle("fawe.tips")) {
|
||||
@ -318,6 +319,7 @@ public class OptionsCommands {
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.searchitem")
|
||||
public void searchItem(Actor actor, CommandContext args) throws WorldEditException {
|
||||
|
||||
String query = args.getString(0).trim().toLowerCase();
|
||||
|
@ -73,6 +73,7 @@ public class ScriptingCommands {
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("fawe.setupdispatcher")
|
||||
public void setupdispatcher(Player player, LocalSession session, final CommandContext args) throws WorldEditException {
|
||||
CommandManager.getInstance().setupDispatcher();
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
"More Info: https://git.io/vSPmA",
|
||||
queued = false
|
||||
)
|
||||
@CommandPermissions("worldedit.patterns")
|
||||
public void patterns(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
displayModifierHelp(player, DefaultPatternParser.class, args);
|
||||
}
|
||||
@ -137,6 +138,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
"More Info: https://git.io/v9r4K",
|
||||
queued = false
|
||||
)
|
||||
@CommandPermissions("worldedit.masks")
|
||||
public void masks(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
displayModifierHelp(player, DefaultMaskParser.class, args);
|
||||
}
|
||||
@ -152,6 +154,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
"More Info: https://git.io/v9KHO",
|
||||
queued = false
|
||||
)
|
||||
@CommandPermissions("worldedit.transforms")
|
||||
public void transforms(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
displayModifierHelp(player, DefaultTransformParser.class, args);
|
||||
}
|
||||
@ -243,6 +246,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
max = 0,
|
||||
queued = false
|
||||
)
|
||||
@CommandPermissions("fawe.cancel")
|
||||
public void cancel(FawePlayer player) {
|
||||
int cancelled = player.cancel(false);
|
||||
BBC.WORLDEDIT_CANCEL_COUNT.send(player, cancelled);
|
||||
@ -673,6 +677,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
aliases = {"/confirm"},
|
||||
desc = "Confirm a command"
|
||||
)
|
||||
@CommandPermissions("fawe.confirm")
|
||||
public void confirm(FawePlayer fp) throws WorldEditException {
|
||||
if (!fp.confirm()) {
|
||||
BBC.NOTHING_CONFIRMED.send(fp);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren