Stop a sertain block from moving, I Wish to add to it after.

Discussion in 'Plugin Development' started by JigokuSaru, May 6, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    JigokuSaru

    Okay here's the thing, I Want a starting plugin set up something like a "Stop block move class". I want to add a main class to it as well I Just cant figure out how to stop blocks from moving, so i would appreciate it if someone could kind of give me a small class that stops blocks from moving by pistons, falling (like an anvil or sand), and cant be picked up by an Enderman, those thing are annoying. Once again thank you for taking your time to help.
    Oh and i need the block type that cant move be in a config, and the item info like it has a custom name and stuff
     
  2. Online

    timtower Administrator Administrator Moderator

    Moved to plugin development.
     
  3. For the piston moving, there is a BlockPistonExtendEvent which you can use, and for the enderman you can use EntityChangeBlockEvent and check if it's an enderman, but I don't think you can cancel the block to fallingblock event, at least I couldn't find anything about it
     
  4. Offline

    Timbals

    @megamichiel @JigokuSaru
    You can actually cancel it with the use of a BlockPhysicsEvent. It is also called when a ladder or door should drop because there are no more blocks around them. You can cancel it.
     
  5. @Timbals
    Oh right, that event :p, I forgot about that one
     
Thread Status:
Not open for further replies.

Share This Page