3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-07 20:10:06 +01:00

Simplified permissions by automatically allowing [cmd]air when cmd is allowed.

Dieser Commit ist enthalten in:
sk89q 2010-10-18 16:19:22 -07:00
Ursprung 5dc69ae325
Commit 94876194c4
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -190,7 +190,7 @@ public class SMWorldEditListener extends PluginListener {
* @return * @return
*/ */
private boolean canUseCommand(Player player, String command) { private boolean canUseCommand(Player player, String command) {
return player.canUseCommand(command) return player.canUseCommand(command.replace("air", ""))
|| player.canUseCommand("/worldedit"); || player.canUseCommand("/worldedit");
} }
} }

Datei anzeigen

@ -110,6 +110,8 @@ public class WorldEdit {
* Construct an instance of the plugin. * Construct an instance of the plugin.
*/ */
private WorldEdit() { private WorldEdit() {
// Note: Commands should only have the phrase 'air' at the end
// for now (see SMWorldEditListener.canUseCommand)
commands.put("//pos1", "Set editing position #1"); commands.put("//pos1", "Set editing position #1");
commands.put("//pos2", "Set editing position #2"); commands.put("//pos2", "Set editing position #2");
commands.put("/toggleplace", "Toggle placing at pos #1"); commands.put("/toggleplace", "Toggle placing at pos #1");