[SPIGOT-7403] Outdated docs Sign#setEditable/isEditable Created: 20/Jun/23  Updated: 25/Dec/24  Resolved: 23/Jun/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: 0
Labels: None

Version: n/a
Plugin: n/a
Guidelines Read: Yes

 Description   

The docs:

https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Sign.html#setEditable(boolean)
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Sign.html#isEditable()

Are both outdated in that they say:
""
This is a special value, which is not persisted. It should only be set if a placed sign is manipulated during the BlockPlaceEvent. Behaviour outside of this event is undefined.
""



 Comments   
Comment by Shane Bee [ 20/Jun/23 ]

yeah, I saw that in CB when I wanted to verify what I was saying was true haha!

Probably best to deprecate and create the new method. I know this isn't what you wanna hear but that is exactly what PaperMC did.

Comment by md_5 [ 20/Jun/23 ]

Current implementation:

    @Override
    public boolean isEditable() {
        return !getSnapshot().isWaxed() && getSnapshot().playerWhoMayEdit != null;
    }    @Override
    public void setEditable(boolean editable) {
        getSnapshot().setWaxed(!editable);
    } 

Probably worth considering whether this would be better served by an is/setWaxed method and deprecation of is/setEditable

Generated at Tue Apr 22 03:57:08 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.