Right click block from a plugin

Discussion in 'Plugin Development' started by DoppelRR, Apr 13, 2015.

Thread Status:
Not open for further replies.
  1. So the first thread I made for this a couple of minutes ago, was closed because of a missunderstanding, which is why I will prevent this directly to happen again. The plugin I am making for this, is tested on a Server with ONLY craftbukkit installed. The project hast ONLY Java and craftbukkit added as libraries. So this is definetly related to bukkit and so I think this is the right place to ask. So to get to the topic: I want to be able to rightclick any block from a plugin. I am just trying arround with calling PlayerInteractEvent myself but cannot get it to work. Has anyone else an idea for this?

    Greetings
    DoppelRR
     
  2. Offline

    mythbusterma

    @DoppelRR

    Already told you last time.

    1. You'd be better off using a mod to do this
    2. just change the data of the block. That's all you need to do.
     
  3. @mythbusterma
    I got the point with the mod already earlier and just wanted to know, if there is an easy way to do this with plugins, and for the second, since not every block (even vanilla) uses the same data this could be getting difficult, because you would need to write this for every single blocksort.

    EDIT: I think i found the problem, calling a InteractEvent will only let other plugins reactions on this occure, not the servers own reactions(at least that is what i suppose) because when i let my plugin react on this particulary event situation, it works.
     
  4. Offline

    mythbusterma

    @DoppelRR

    You said lever. It's not hard to do it with one block. A button wouldn't be hard to add either.

    Alternatively, you can just turn on redstone for a block and make it generate a signal.
     
Thread Status:
Not open for further replies.

Share This Page