mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-14 05:33:56 +01:00
Fix command signs patch update (#7976)
This commit is contained in:
parent
f9cc088ea4
commit
15181a7c74
1 changed files with 3 additions and 2 deletions
|
@ -70,9 +70,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public SignBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(BlockEntityType.SIGN, pos, state);
|
||||
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
ClickEvent chatclickable = chatmodifier.getClickEvent();
|
||||
|
||||
if (chatclickable != null && chatclickable.getAction() == ClickEvent.Action.RUN_COMMAND) {
|
||||
player.getServer().getCommands().performPrefixedCommand(this.createCommandSourceStack(player), chatclickable.getValue());
|
||||
- player.getServer().getCommands().performPrefixedCommand(this.createCommandSourceStack(player), chatclickable.getValue());
|
||||
+ // Paper start
|
||||
+ String command = chatclickable.getValue().startsWith("/") ? chatclickable.getValue() : "/" + chatclickable.getValue();
|
||||
+ if (org.spigotmc.SpigotConfig.logCommands) {
|
||||
|
@ -82,7 +83,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (!event.callEvent()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ player.getServer().getCommands().performCommand(this.createCommandSourceStack(((org.bukkit.craftbukkit.entity.CraftPlayer) event.getPlayer()).getHandle()), event.getMessage());
|
||||
+ player.getServer().getCommands().performPrefixedCommand(this.createCommandSourceStack(((org.bukkit.craftbukkit.entity.CraftPlayer) event.getPlayer()).getHandle()), event.getMessage());
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue