Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 13:00:05 +01:00
Bug fixes
Dieser Commit ist enthalten in:
Ursprung
6b3f19f857
Commit
c38a6b0677
@ -53,7 +53,7 @@ public class DinnerPermsResolver implements PermissionsResolver {
|
||||
List<String> groupNames = new ArrayList<String>();
|
||||
for (PermissionAttachmentInfo permAttach : player.getEffectivePermissions()) {
|
||||
String perm = permAttach.getPermission();
|
||||
if (!(perm.startsWith(GROUP_PREFIX) || permAttach.getValue()))
|
||||
if (!(perm.startsWith(GROUP_PREFIX) && permAttach.getValue()))
|
||||
continue;
|
||||
groupNames.add(perm.substring(GROUP_PREFIX.length(), perm.length()));
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ public class PermissionsResolverManager implements PermissionsResolver {
|
||||
|
||||
private Server server;
|
||||
private PermissionsResolver perms;
|
||||
private PermissionsResolverServerListener listener;
|
||||
private Configuration permsConfig;
|
||||
private String name;
|
||||
private Logger logger;
|
||||
@ -72,7 +73,7 @@ public class PermissionsResolverManager implements PermissionsResolver {
|
||||
this.name = name;
|
||||
this.logger = logger;
|
||||
new PermissionsResolverServerListener(this, plugin);
|
||||
loadConfig(new File("wepif.yml")); // TODO: config migration, maybe
|
||||
loadConfig(new File("wepif.yml"));
|
||||
findResolver();
|
||||
}
|
||||
public void findResolver() {
|
||||
@ -206,6 +207,14 @@ public class PermissionsResolverManager implements PermissionsResolver {
|
||||
return isUpdated;
|
||||
}
|
||||
|
||||
boolean hasServerListener() {
|
||||
return listener != null;
|
||||
}
|
||||
|
||||
void setServerListener(PermissionsResolverServerListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public static class MissingPluginException extends Exception {
|
||||
private static final long serialVersionUID = 7044832912491608706L;
|
||||
}
|
||||
|
@ -36,7 +36,9 @@ public class PermissionsResolverServerListener extends ServerListener {
|
||||
|
||||
public PermissionsResolverServerListener(PermissionsResolverManager manager, Plugin plugin) {
|
||||
this.manager = manager;
|
||||
register(plugin);
|
||||
if (!manager.hasServerListener()) {
|
||||
register(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,5 +84,6 @@ public class PermissionsResolverServerListener extends ServerListener {
|
||||
this, Priority.Normal, plugin);
|
||||
plugin.getServer().getPluginManager().registerEvent(Event.Type.PLUGIN_DISABLE,
|
||||
this, Priority.Normal, plugin);
|
||||
manager.setServerListener(this);
|
||||
}
|
||||
}
|
||||
|
@ -135,9 +135,6 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
protected void registerEvents() {
|
||||
new WorldEditPlayerListener(this);
|
||||
new WorldEditCriticalPlayerListener(this);
|
||||
|
||||
// The permissions resolver has some hooks of its own
|
||||
new PermissionsResolverServerListener(perms, this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren