[SPIGOT-7452] Player#openSign cannot edit Created: 07/Aug/23  Updated: 25/Dec/24  Resolved: 10/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: Fixed Votes: 1
Labels: None

Attachments: File Test-1.0-SNAPSHOT.jar    
Issue Links:
Cloners
is cloned by SPIGOT-7454 Player#openSign cannot open from far ... Resolved
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.
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;
}


 Comments   
Comment by Y2K_ [ 07/Aug/23 ]

I have opened a pull request associated with fixing this issue

Comment by Shane Bee [ 07/Aug/23 ]

possibly. Im not sure what Mojang did/didn't change, I'm just reporting a bug in the API we're provided to use.

Comment by Y2K_ [ 07/Aug/23 ]

is it possible mojang changed how the sign tile entity acts from further away ranges now with the introduction of right click to edit vs before where there was no ingame way to edit the sign?

Comment by Shane Bee [ 07/Aug/23 ]

back on 1.19.x, I was able to open a sign that was extremely high in the Sky.

It doesn't work anymore, hence reporting this bug.

Comment by Y2K_ [ 07/Aug/23 ]

I meant sign there was a typo

Comment by Shane Bee [ 07/Aug/23 ]

what inventory are you referring to?

I'm unsure how I would test a Player#openSign on a chest/tileEntity.

Sorry, I don't understand your comment.

Comment by Y2K_ [ 07/Aug/23 ]

"move about 20(ish) blocks away from the sign in any direction"
are you sure the exiting the inventory from far away isn't intended? Is this behavior replicated by chests and other TileEntities?

Generated at Fri Apr 11 16:22:32 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.