diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch index 5e6e053a99..7e1e7f52fa 100644 --- a/nms-patches/EntityPlayer.patch +++ b/nms-patches/EntityPlayer.patch @@ -481,17 +481,20 @@ return true; } else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) { if (this.server.getPlayerList().isOp(this.getProfile())) { -@@ -781,6 +963,9 @@ +@@ -781,6 +963,12 @@ } else { return true; } + */ ++ if ("@".equals(s)) { ++ return getBukkitEntity().hasPermission("minecraft.command.selector"); ++ } + return true; + // CraftBukkit end } public String w() { -@@ -867,6 +1052,129 @@ +@@ -867,6 +1055,129 @@ } public IChatBaseComponent getPlayerListName() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java index d0377466d1..1c54b7d649 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java @@ -28,6 +28,7 @@ public final class CommandPermissions { DefaultPermissions.registerPermission(PREFIX + "defaultgamemode", "Allows the user to change the default gamemode of the server", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(PREFIX + "effect", "Allows the user to add/remove effects on players", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(PREFIX + "selector", "Allows the use of selectors", PermissionDefault.OP, commands); commands.recalculatePermissibles(); return commands;