Skip to content

Commit

Permalink
the permission was flipped all those years...
Browse files Browse the repository at this point in the history
  • Loading branch information
YouHaveTrouble committed Jul 14, 2024
1 parent 1872ea8 commit e3c6103
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static HashSet<String> getSuggestions(org.bukkit.entity.Player player) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ else if (player.hasPermission(group.getPermission()))
* @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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static HashSet<String> getSuggestions(ProxiedPlayer player) {
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;
Expand Down

0 comments on commit e3c6103

Please sign in to comment.