Solved Event.Type HELP!

Discussion in 'Plugin Development' started by TheEpicButterStudios, Oct 14, 2013.

Thread Status:
Not open for further replies.
  1. Code:java
    1. PluginManager pm = getServer().getPluginManager();
    2. pm.registerEvent(Event.Type.BLOCK_PLACE.TypeId(46), blockListener, EventPriority.NORMAL, this);

    It is showing an error with Event.Type.BLOCK_PLACE
    Help!
     
  2. Offline

    Wingzzz

    TheEpicButterStudios
    Please read over Bukkit Event API and then reply with any questions you may have. This will help you to understand events in the Bukkit API and how to properly use them in your plugins.
     
  3. Wingzzz Thanks for the reference, however I still have an error. Can you identify the error in my code?
    Thanks.
     
  4. Offline

    WauloK

    You can't register a listener for this: Event.Type.BLOCK_PLACE.TypeId(46)
    You have to register a listener for the block placing and write a class to detect what kind of block was placed.
     
  5. Offline

    Tirelessly

    TheEpicButterStudios That is an old use of the registerEvents. Consider checking a newer tutorial.
     
Thread Status:
Not open for further replies.

Share This Page