[SPIGOT-7454] Player#openSign cannot open from far away Created: 10/Aug/23 Updated: 25/Dec/24 Resolved: 17/Aug/23 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Shane Bee | Assignee: | Unassigned |
Resolution: | Done | Votes: | 0 |
Labels: | None |
Issue Links: |
|
||||||||
Version: | CraftBukkit version 3853-Spigot-3bce793-d91e5aa (MC: 1.20.1) | ||||||||
Plugin: | just the included test plugin | ||||||||
Guidelines Read: | Yes |
Description |
I noticed recently when using Player#openSign, the player can no longer edit. With the included jar file, I will explain the two issues
Issue #2 - can't open from far away:
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; } |
Comments |
Comment by Shane Bee [ 13/Aug/23 ] |
we can close this. After digging thru the client code, I've come to the conclusion the client handles the distance. |