Allow filtering of sudo commands by permission node

This commit is contained in:
cswhite2000 2017-12-30 23:47:52 -08:00 committed by Ashcon Partovi
parent 4cd978788a
commit af58ad70a6
1 changed files with 2 additions and 0 deletions

View File

@ -246,6 +246,8 @@ public class MiscCommands implements Commands {
case "color":
ChatColor color = CommandUtils.getEnum(value, sender, ChatColor.class, ChatColor.WHITE);
return players.filter(p -> getFuzzyColor(p).equals(color));
case "perm":
return players.filter(p -> p.hasPermission(value));
case "*":
return Streams.shuffle(players);
default: