I desperately need to know how to get the text a sign is holding. Could anybody help me please? - Raeon
Sign s = (Sign)event.getBlock().getState() if I recall that properly. then go s.getLine(0) to get the first line, and so on.
Thank you very much! I'll try it right away! EDIT: What do I have to import? 1. 'Sign' (org.bukkit.Block) 2. 'Sign' (org.bukkit.Material)
The method Lolmewn used is right, but I advise using: Code: if (event.getBlock().getState() instanceof Sign) { //Lolmewn's part //rest of the script } to prevent errors in case you try to read from a block that isn't a sign
Yeah you're right, thanks for reminding me! But do I have to import Sign from 'org.bukkit.Block' or 'org.bukkit.Material'?