Handle a missed case with our vanilla permissions override

This commit is contained in:
Thinkofdeath 2015-05-30 00:06:18 +01:00
parent 5084899747
commit 8c14eb49ef
2 changed files with 6 additions and 2 deletions

View file

@ -481,17 +481,20 @@
return true; return true;
} else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) { } else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) {
if (this.server.getPlayerList().isOp(this.getProfile())) { if (this.server.getPlayerList().isOp(this.getProfile())) {
@@ -781,6 +963,9 @@ @@ -781,6 +963,12 @@
} else { } else {
return true; return true;
} }
+ */ + */
+ if ("@".equals(s)) {
+ return getBukkitEntity().hasPermission("minecraft.command.selector");
+ }
+ return true; + return true;
+ // CraftBukkit end + // CraftBukkit end
} }
public String w() { public String w() {
@@ -867,6 +1052,129 @@ @@ -867,6 +1055,129 @@
} }
public IChatBaseComponent getPlayerListName() { public IChatBaseComponent getPlayerListName() {

View file

@ -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 + "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 + "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 + "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(); commands.recalculatePermissibles();
return commands; return commands;