-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
CraftBukkit version 3853-Spigot-3bce793-d91e5aa (MC: 1.20.1)
-
just the included test plugin
-
Yes
I noticed recently when using Player#openSign, the player can no longer edit.
There is kind of 2 issues here.
With the included jar file, I will explain the two issues
setup:
- place a sign down in the world
- while looking at the sign, run command "/test set" (this just caches the block for later)
Issue #1 - can't edit:
- run command "/test open" (this will open the sign)
- type stuff in editor
- close sign editor
- At this point you shall see no changes to the sign, and in console you shall see:
"Player <YourName> just tried to change non-editable sign"
test code (which is in the provided plugin):
@Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { if (sender instanceof Player player && args.length == 1) { if (args[0].equalsIgnoreCase("set")) { block = player.getTargetBlockExact(50); } else if (args[0].equalsIgnoreCase("open")) { if (block != null && block.getState() instanceof Sign sign) { player.openSign(sign); } } } return true; }
- is cloned by
-
SPIGOT-7454 Player#openSign cannot open from far away
-
- Resolved
-