mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-14 21:13:54 +00:00
JS command perms
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
var f = functions[i];
|
||||
if (f.hasOwnProperty('desc'))
|
||||
{
|
||||
if (!f.hasOwnProperty('permission')) f.permission = "fawe.use";
|
||||
if (!f.hasOwnProperty('aliases')) f.aliases = [f.name];
|
||||
var cmd = com.boydti.fawe.config.Commands.fromArgs(f.aliases, f.usage, f.desc, f.min, f.max, f.flags, f.help);
|
||||
var man = com.sk89q.worldedit.extension.platform.CommandManager.getInstance();
|
||||
@ -41,7 +42,7 @@
|
||||
}
|
||||
});
|
||||
var w2 = new wrap();
|
||||
var callable = new com.sk89q.worldedit.util.command.parametric.FunctionParametricCallable(builder, "", cmd, "fawe.use", args, w2);
|
||||
var callable = new com.sk89q.worldedit.util.command.parametric.FunctionParametricCallable(builder, "", cmd, f.permission, args, w2);
|
||||
commands.add(callable);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user