geforkt von Mirrors/FastAsyncWorldEdit
Added 'no-op-permissions' setting for Bukkit.
Dieser Commit ist enthalten in:
Ursprung
824e4c9381
Commit
9667e92d66
@ -56,6 +56,7 @@ history:
|
||||
wand-item: 271
|
||||
shell-save-type:
|
||||
no-double-slash: false
|
||||
no-op-permissions: false
|
||||
debug: false
|
||||
|
||||
# See http://wiki.sk89q.com/wiki/WorldEdit/Permissions/Bukkit
|
||||
|
@ -35,6 +35,8 @@ public class BukkitConfiguration extends LocalConfiguration {
|
||||
private Configuration config;
|
||||
private Logger logger;
|
||||
|
||||
public boolean noOpPermissions = false;
|
||||
|
||||
public BukkitConfiguration(Configuration config, Logger logger) {
|
||||
this.config = config;
|
||||
this.logger = logger;
|
||||
@ -76,6 +78,8 @@ public class BukkitConfiguration extends LocalConfiguration {
|
||||
disallowedBlocks = new HashSet<Integer>(config.getIntList("limits.disallowed-blocks", null));
|
||||
|
||||
allowedDataCycleBlocks = new HashSet<Integer>(config.getIntList("limits.allowed-data-cycle-blocks", null));
|
||||
|
||||
noOpPermissions = config.getBoolean("no-op-permissions", false);
|
||||
|
||||
LocalSession.MAX_HISTORY_SIZE = Math.max(15, config.getInt("history.size", 15));
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
final WorldEdit controller;
|
||||
final WorldEditAPI api;
|
||||
|
||||
private final LocalConfiguration config;
|
||||
private final BukkitConfiguration config;
|
||||
private final PermissionsResolverManager perms;
|
||||
|
||||
private final WorldEditPlayerListener playerListener =
|
||||
@ -280,7 +280,8 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
}
|
||||
|
||||
boolean hasPermission(Player player, String perm) {
|
||||
return player.isOp() || perms.hasPermission(player.getName(), perm);
|
||||
return (!config.noOpPermissions && player.isOp())
|
||||
|| perms.hasPermission(player.getName(), perm);
|
||||
}
|
||||
|
||||
BukkitPlayer wrapPlayer(Player player) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren