Solved Abbord piston moves

Discussion in 'Plugin Development' started by mr_nice1107, Nov 3, 2019.

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


    Hey there,
    I have another question?

    Is it possible to abbord a piston?

    So I want to check if one of the pushed blocks from the pistion is in my list of blocks and if that is true I want to abbord the piston moves

    Wich event is the correct for my usasge?

    BlockPistonReactEvent or BlockPistonExtendEvent
  2. Offline


    You can use all of them. BlockPistonEvent is called everytime a piston changes his state, to get the pushed block get the direction from the event and get the block in this direction relative to the piston. The other two are called on retract or extend (as the name says) they have a method getBlocks which returns a list of blocks affected by the event. They're all cancelable

    If you know the exact name of the events use the documentation, it contains a description of it
  3. Offline


    Thank you that worked for me...
    Sorry that I was to stupid find it out my self.
Thread Status:
Not open for further replies.

Share This Page