mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
the permission was flipped all those years...
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ public class CommandWhitelistBukkit extends JavaPlugin {
|
||||
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
||||
if (s.getKey().equalsIgnoreCase("default"))
|
||||
suggestionList.addAll(s.getValue().getSubCommands());
|
||||
if (player.hasPermission(s.getValue().getPermission())) continue;
|
||||
if (!player.hasPermission(s.getValue().getPermission())) continue;
|
||||
suggestionList.addAll(s.getValue().getSubCommands());
|
||||
}
|
||||
return suggestionList;
|
||||
|
||||
+3
-2
@@ -127,12 +127,13 @@ public class CommandWhitelistVelocity {
|
||||
* @param player Velocity Player
|
||||
* @return subcommands unavailable for the player
|
||||
*/
|
||||
public HashSet<String> getSuggestions(Player player, HashMap<String, CWGroup> groups) {
|
||||
public HashSet<String> getSuggestions(Player player) {
|
||||
HashSet<String> suggestionList = new HashSet<>();
|
||||
HashMap<String, CWGroup> groups = configCache.getGroupList();
|
||||
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
||||
if (s.getKey().equalsIgnoreCase("default"))
|
||||
suggestionList.addAll(s.getValue().getSubCommands());
|
||||
if (player.hasPermission(s.getValue().getPermission())) continue;
|
||||
if (!player.hasPermission(s.getValue().getPermission())) continue;
|
||||
suggestionList.addAll(s.getValue().getSubCommands());
|
||||
}
|
||||
return suggestionList;
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ public final class CommandWhitelistWaterfall extends Plugin {
|
||||
for (Map.Entry<String, CWGroup> s : groups.entrySet()) {
|
||||
if (s.getKey().equalsIgnoreCase("default"))
|
||||
suggestionList.addAll(s.getValue().getSubCommands());
|
||||
if (player.hasPermission(s.getValue().getPermission())) continue;
|
||||
if (!player.hasPermission(s.getValue().getPermission())) continue;
|
||||
suggestionList.addAll(s.getValue().getSubCommands());
|
||||
}
|
||||
return suggestionList;
|
||||
|
||||
Reference in New Issue
Block a user