Events

Discussion in 'Plugin Development' started by cnniillaa, Jan 15, 2014.

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

    cnniillaa

    For some reason i cant get
    Code:
    Event.Type.BLOCK_DAMAGE
    to work like i have done so in the past..... Nor can i get
    Code:
    Event.Priority.Normal
    to work either this is a little portion of my Main Class --->
    Code:
    log.info("[NAME] Has Been Enabled");
            PluginManager pm = getServer().getPluginManager();
            pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);
     
  2. cnniillaa
    You should just use
    Code:
    pm.registerEvents(blockListener, this);
    This will register all of the events inside the target class (blockListener).

    also, just saying "this won't work" doesn't help you nor us at all, we can't read your mind, we can't know what the error/problem is if you don't describe it.
     
Thread Status:
Not open for further replies.

Share This Page