mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-17 12:54:43 +02:00
Tweaks (perms, debug, scripting)
This commit is contained in:
@ -92,12 +92,7 @@ public class DebugExec extends SubCommand {
|
||||
File file = new File(PS.get().IMP.getDirectory(), "scripts" + File.separator + "start.js");
|
||||
if (file.exists()) {
|
||||
init();
|
||||
TaskManager.runTaskLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
onCommand(ConsolePlayer.getConsole(), new String[] {"run", "start.js"});
|
||||
}
|
||||
}, 1);
|
||||
onCommand(ConsolePlayer.getConsole(), new String[] {"run", "start.js"});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.MathMan;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.StringComparison;
|
||||
import com.intellectualcrafters.plot.util.StringMan;
|
||||
import com.intellectualcrafters.plot.util.helpmenu.HelpMenu;
|
||||
@ -141,7 +142,7 @@ public class MainCommand extends CommandManager<PlotPlayer> {
|
||||
if (category != null && !command.getCategory().equals(category)) {
|
||||
continue;
|
||||
}
|
||||
if (player != null && !player.hasPermission(command.getPermission())) {
|
||||
if (player != null && !Permissions.hasPermission(player, command.getPermission())) {
|
||||
continue;
|
||||
}
|
||||
commands.add(command);
|
||||
|
@ -71,34 +71,34 @@ public class list extends SubCommand {
|
||||
|
||||
private String[] getArgumentList(PlotPlayer player) {
|
||||
List<String> args = new ArrayList<>();
|
||||
if (EconHandler.manager != null && player.hasPermission("plots.list.forsale")) {
|
||||
if (EconHandler.manager != null && Permissions.hasPermission(player, "plots.list.forsale")) {
|
||||
args.add("forsale");
|
||||
}
|
||||
if (player.hasPermission("plots.list.mine")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.mine")) {
|
||||
args.add("mine");
|
||||
}
|
||||
if (player.hasPermission("plots.list.shared")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.shared")) {
|
||||
args.add("shared");
|
||||
}
|
||||
if (player.hasPermission("plots.list.world")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.world")) {
|
||||
args.add("world");
|
||||
}
|
||||
if (player.hasPermission("plots.list.top")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.top")) {
|
||||
args.add("top");
|
||||
}
|
||||
if (player.hasPermission("plots.list..all")) {
|
||||
if (Permissions.hasPermission(player, "plots.list..all")) {
|
||||
args.add("all");
|
||||
}
|
||||
if (player.hasPermission("plots.list.unowned")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.unowned")) {
|
||||
args.add("unowned");
|
||||
}
|
||||
if (player.hasPermission("plots.list.unknown")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.unknown")) {
|
||||
args.add("unknown");
|
||||
}
|
||||
if (player.hasPermission("plots.list.player")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.player")) {
|
||||
args.add("<player>");
|
||||
}
|
||||
if (player.hasPermission("plots.list.world")) {
|
||||
if (Permissions.hasPermission(player, "plots.list.world")) {
|
||||
args.add("<world>");
|
||||
}
|
||||
return args.toArray(new String[args.size()]);
|
||||
|
Reference in New Issue
Block a user