Fix cmd permission levels for command blocks

This commit is contained in:
Jake Potrebic
2022-01-24 15:32:02 -08:00
parent 4bb84c46ac
commit b0579722db
4 changed files with 60 additions and 35 deletions

View File

@@ -1,6 +1,14 @@
--- a/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
+++ b/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
@@ -135,5 +135,12 @@
@@ -128,12 +128,19 @@
@Override
public CommandSourceStack createCommandSourceStack() {
- return new CommandSourceStack(this, MinecartCommandBlock.this.position(), MinecartCommandBlock.this.getRotationVector(), this.getLevel(), 2, this.getName().getString(), MinecartCommandBlock.this.getDisplayName(), this.getLevel().getServer(), MinecartCommandBlock.this);
+ return new CommandSourceStack(this, MinecartCommandBlock.this.position(), MinecartCommandBlock.this.getRotationVector(), this.getLevel(), this.getLevel().paperConfig().commandBlocks.permissionsLevel, this.getName().getString(), MinecartCommandBlock.this.getDisplayName(), this.getLevel().getServer(), MinecartCommandBlock.this); // Paper - configurable command block perm level
}
@Override
public boolean isValid() {
return !MinecartCommandBlock.this.isRemoved();
}