diff --git a/nms-patches/CommandListenerWrapper.patch b/nms-patches/CommandListenerWrapper.patch index de1d751c20..5f069a42cb 100644 --- a/nms-patches/CommandListenerWrapper.patch +++ b/nms-patches/CommandListenerWrapper.patch @@ -39,6 +39,15 @@ public Vec3D getPosition() { return this.d; } +@@ -183,7 +198,7 @@ + while (iterator.hasNext()) { + EntityPlayer entityplayer = (EntityPlayer) iterator.next(); + +- if (entityplayer != this.base && this.i.getPlayerList().isOp(entityplayer.getProfile())) { ++ if (entityplayer != this.base && entityplayer.getBukkitEntity().hasPermission("minecraft.admin.command_feedback")) { // CraftBukkit + entityplayer.sendMessage(ichatbasecomponent1); + } + } @@ -232,4 +247,10 @@ public Collection a(boolean flag) { return Collections.singleton(ICompletionProvider.a.b); 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 031f0ecff2..2d6153d0da 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java @@ -32,6 +32,8 @@ public final class CommandPermissions { DefaultPermissions.registerPermission(PREFIX + "selector", "Allows the use of selectors", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(PREFIX + "trigger", "Allows the use of the trigger command", PermissionDefault.TRUE, commands); + DefaultPermissions.registerPermission("minecraft.admin.command_feedback", "Receive command broadcasts when sendCommandFeedback is true", PermissionDefault.OP, commands); + commands.recalculatePermissibles(); return commands; }