[SPIGOT-6541] When getting the block data from a sign(or wall_sign) there is no way to get the lines of the sign. Created: 13/Jun/21 Updated: 13/Jun/21 Resolved: 13/Jun/21 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Major |
Reporter: | MoritzR200 | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | Essentials, Sign, bug |
Version: | Definitly 1.13-1.16 (but might be all versions) |
Guidelines Read: | Yes |
Description |
When retrieving a BlockData object (of type org.bukkit.block.data.type.Sign) from an Sign block(org.bukkit.block.Sign), the returned BlockData has no method to get or set the lines of the sign-data, even though this would be expected. //This basically serves as a minimal reproduction plugin. Block b = null; // Initialized with a valid sign-block BlockData blockData = b.getBlockData(); String blockDataString = blockData.getAsString(); Bukkit.getLogger().info(blockDataString); This code logs: while F3+I returns: ],"text":""}',Text3:'{"extra":[ {"text":"t3"}],"text":""}',Text2:'{"extra":[ {"text":"t2"}],"text":""}',Text1:'{"extra":[ {"text":"t1"}],"text":""}'} Resolving this issue would also be a good opportunity to add an API to set click-actions for signs to, but that is by no means needed to resolve the bug addressed in this issue. |
Comments |
Comment by MoritzR200 [ 13/Jun/21 ] |
Thanks for your time |
Comment by md_5 [ 13/Jun/21 ] |
You use BlockState and associated APIs for accessing tile info. |