mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
more permission refactoring
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ public class CommandWhitelistBukkit extends JavaPlugin {
|
|||||||
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
||||||
if (s.getKey().equalsIgnoreCase("default"))
|
if (s.getKey().equalsIgnoreCase("default"))
|
||||||
commandList.addAll(s.getValue().getCommands());
|
commandList.addAll(s.getValue().getCommands());
|
||||||
else if (player.hasPermission("commandwhitelist.group." + s.getKey()))
|
else if (player.hasPermission(s.getValue().getPermission()))
|
||||||
commandList.addAll(s.getValue().getCommands());
|
commandList.addAll(s.getValue().getCommands());
|
||||||
}
|
}
|
||||||
return commandList;
|
return commandList;
|
||||||
|
|||||||
+1
-2
@@ -50,7 +50,6 @@ public class CommandWhitelistVelocity {
|
|||||||
configCache = new ConfigCache(new File(String.valueOf(folder), "config.yml"), false, logger);
|
configCache = new ConfigCache(new File(String.valueOf(folder), "config.yml"), false, logger);
|
||||||
else
|
else
|
||||||
configCache.reloadConfig();
|
configCache.reloadConfig();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void reloadConfig(CommandSource source) {
|
public static void reloadConfig(CommandSource source) {
|
||||||
@@ -108,7 +107,7 @@ public class CommandWhitelistVelocity {
|
|||||||
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
||||||
if (s.getKey().equalsIgnoreCase("default"))
|
if (s.getKey().equalsIgnoreCase("default"))
|
||||||
commandList.addAll(s.getValue().getCommands());
|
commandList.addAll(s.getValue().getCommands());
|
||||||
else if (player.hasPermission("commandwhitelist.group." + s.getKey()))
|
else if (player.hasPermission(s.getValue().getPermission()))
|
||||||
commandList.addAll(s.getValue().getCommands());
|
commandList.addAll(s.getValue().getCommands());
|
||||||
}
|
}
|
||||||
return commandList;
|
return commandList;
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ public final class CommandWhitelistWaterfall extends Plugin {
|
|||||||
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
||||||
if (s.getKey().equalsIgnoreCase("default"))
|
if (s.getKey().equalsIgnoreCase("default"))
|
||||||
commandList.addAll(s.getValue().getCommands());
|
commandList.addAll(s.getValue().getCommands());
|
||||||
else if (player.hasPermission("commandwhitelist.group." + s.getKey()))
|
else if (player.hasPermission(s.getValue().getPermission()))
|
||||||
commandList.addAll(s.getValue().getCommands());
|
commandList.addAll(s.getValue().getCommands());
|
||||||
}
|
}
|
||||||
return commandList;
|
return commandList;
|
||||||
|
|||||||
Reference in New Issue
Block a user