Hello there! I was wondering, I know how to stop a sign breaking if a player just punches it, but how can I stop the sign breaking if something else happens to it? For instance, if someone broke the block the block that a sign was placed on, the sign would break. How can I stop a player from breaking that block, and therefore stop that sign from breaking? Do I listen for the BlockPhysicsEvent? If so (I have never used that before), how on Earth do I figure out if a sign has broken from that? Can I just continue to listen to the BlockBreakEvent? Sorry if this seems like a stupid question, but I am trully stuck here. Thank you to anyone who can offer help.
There are not currently events for blocks that are attached to other blocks, you just have to know what causes a block to break and stop that from happening. For signs you need to see if the block broken has a protected sign on it, which also means checking which block the sign is actually placed on. You also need to handle pistons moving the bock the sign is on. BlockPhysicsEvent for signs on sand/gravel/anvils/ etc
_LB Okay, thank you. That was very helpful. _LB Does BlocksPhysicsEvent include tnt? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I don't know - most servers don't even let you place TNT so I think it will be pretty rare (and hilarious) to find a sign placed on TNT (is it even possible?)