-
Type:
Bug
-
Resolution: Done
-
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 #2 - can't open from far away:
- move about 20(ish) blocks away from the sign in any direction
- run command "/test open" (the sign will not open, you may see it open for a tick and close immediately)
- 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; }
- clones
-
SPIGOT-7452 Player#openSign cannot edit
-
- Resolved
-