mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 03:34:42 +02:00
Tweaks (perms, debug, scripting)
This commit is contained in:
@ -355,7 +355,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
}
|
||||
|
||||
Flag flag;
|
||||
if (!player.hasPermission(PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS) && (flag = FlagManager.getPlotFlag(plot, "blocked-cmds")) != null) {
|
||||
if (!Permissions.hasPermission(pp, PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS) && (flag = FlagManager.getPlotFlag(plot, "blocked-cmds")) != null) {
|
||||
List<String> v = (List<String>) flag.getValue();
|
||||
|
||||
String msg = event.getMessage().toLowerCase().replaceFirst("/", "");
|
||||
|
@ -85,8 +85,10 @@ public class BukkitPlayer extends PlotPlayer {
|
||||
return true;
|
||||
}
|
||||
if (offline && EconHandler.manager != null) {
|
||||
System.out.print("CHECKIGN VAULT!");
|
||||
return EconHandler.manager.hasPermission(getName(), perm);
|
||||
}
|
||||
System.out.print("CHECKING: " + perm + " -> " + player.hasPermission(perm));
|
||||
return this.player.hasPermission(perm);
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ import com.intellectualcrafters.plot.commands.DebugUUID;
|
||||
import com.intellectualcrafters.plot.commands.MainCommand;
|
||||
import com.intellectualcrafters.plot.object.ConsolePlayer;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.StringComparison;
|
||||
import com.plotsquared.general.commands.Command;
|
||||
|
||||
@ -63,7 +64,7 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
|
||||
String label = cmd.getCommand();
|
||||
if (!label.equalsIgnoreCase(best)) {
|
||||
if (label.startsWith(arg)) {
|
||||
if (player.hasPermission(cmd.getPermission())) {
|
||||
if (Permissions.hasPermission(player, cmd.getPermission())) {
|
||||
tabOptions.add(cmd.getCommand());
|
||||
} else if (cmd.getAliases().size() > 0) {
|
||||
for (String alias : cmd.getAliases()) {
|
||||
|
Reference in New Issue
Block a user