mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
SPIGOT-4677: Add minecraft.admin.command_feedback permission
This commit is contained in:
parent
c3749a2358
commit
9ead700959
2 changed files with 11 additions and 0 deletions
|
@ -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<ICompletionProvider.a> a(boolean flag) {
|
||||
return Collections.singleton(ICompletionProvider.a.b);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue