Essentials api JailStatusChangeEvent is not working.

Discussion in 'Plugin Development' started by shellljx, Jan 31, 2015.

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

    shellljx

    Last edited: Jan 31, 2015
  2. Offline

    nverdier

    @shellljx Have you registered the event?
     
  3. @nverdier
    @shellljx

    I do have the same issue.

    I tried:
    Code:
    @EventHandler // Just for testing purpose
    public void onMuted(MuteStatusChangeEvent evt) {
        LOGGER.log(Level.INFO, evt.toString() + ": " + evt.getValue());
    }
    and
    Code:
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onSanctionned(StatusChangeEvent evt) {
        LOGGER.log(Level.INFO, evt.toString() + ": " + evt.getValue());
        [REDACTED]
    }
    (the second one is supposed to be fired when the first one is fired, as it is his parent)

    I register the class here:
    Code:
    EvListener listener = new EvListener();
    @Override
    public void onEnable() {
        [REDACTED]
        getServer().getPluginManager().registerEvents(listener, this);
    }
    I get other events (like a PlayerKickEvent, which is a "vanilla" bukkit one) correctly while it is used in the same listener, so I don't think that's where the problem is.

    Is there something I forgot to do to be able to hook into these events?

    Thanks in advance ;)
     
  4. Does anyone have an idea?
    It's the only thing missing in my plugin, but I need it :p
     
  5. Okay, I found another way around.
    In case anyone is interested:
    I listen to ServerCommandEvent and PlayerCommandPreprocessEvent, check for permissions, syntax and so on, and only assume the command went successfull after that - I never got any problems with that while testing.
     
Thread Status:
Not open for further replies.

Share This Page