Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-13 22:50:06 +01:00
Added 'no-op-permissions' setting for Bukkit.
Dieser Commit ist enthalten in:
Ursprung
824e4c9381
Commit
9667e92d66
@ -56,6 +56,7 @@ history:
|
|||||||
wand-item: 271
|
wand-item: 271
|
||||||
shell-save-type:
|
shell-save-type:
|
||||||
no-double-slash: false
|
no-double-slash: false
|
||||||
|
no-op-permissions: false
|
||||||
debug: false
|
debug: false
|
||||||
|
|
||||||
# See http://wiki.sk89q.com/wiki/WorldEdit/Permissions/Bukkit
|
# See http://wiki.sk89q.com/wiki/WorldEdit/Permissions/Bukkit
|
||||||
|
@ -35,6 +35,8 @@ public class BukkitConfiguration extends LocalConfiguration {
|
|||||||
private Configuration config;
|
private Configuration config;
|
||||||
private Logger logger;
|
private Logger logger;
|
||||||
|
|
||||||
|
public boolean noOpPermissions = false;
|
||||||
|
|
||||||
public BukkitConfiguration(Configuration config, Logger logger) {
|
public BukkitConfiguration(Configuration config, Logger logger) {
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
@ -77,6 +79,8 @@ public class BukkitConfiguration extends LocalConfiguration {
|
|||||||
|
|
||||||
allowedDataCycleBlocks = new HashSet<Integer>(config.getIntList("limits.allowed-data-cycle-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));
|
LocalSession.MAX_HISTORY_SIZE = Math.max(15, config.getInt("history.size", 15));
|
||||||
|
|
||||||
String snapshotsDir = config.getString("snapshots.directory", "");
|
String snapshotsDir = config.getString("snapshots.directory", "");
|
||||||
|
@ -51,7 +51,7 @@ public class WorldEditPlugin extends JavaPlugin {
|
|||||||
final WorldEdit controller;
|
final WorldEdit controller;
|
||||||
final WorldEditAPI api;
|
final WorldEditAPI api;
|
||||||
|
|
||||||
private final LocalConfiguration config;
|
private final BukkitConfiguration config;
|
||||||
private final PermissionsResolverManager perms;
|
private final PermissionsResolverManager perms;
|
||||||
|
|
||||||
private final WorldEditPlayerListener playerListener =
|
private final WorldEditPlayerListener playerListener =
|
||||||
@ -280,7 +280,8 @@ public class WorldEditPlugin extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean hasPermission(Player player, String perm) {
|
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) {
|
BukkitPlayer wrapPlayer(Player player) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren