CraftItemEvent not being called.

Discussion in 'Plugin Development' started by joehot2000, Dec 4, 2013.

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


    Here is my whole class. The CraftItemEvent isnt being called, i do not get the "HII" message (I also tried PrepareItemCraftEvent, same problem):

    The events are registered and i tried compiling the code in 2 separate plugins with no results.
  2. The events are not registered.
    You have to call Bukkit.getPluginManager().registerEvent(this, this);
  3. Offline


    public void onCraftItem (CraftItemEvent e) {
  4. no...

    Bukkit.getPluginManager().registerEvent(this, this);
    in onEnable()
  5. Offline


    But.. I had that already didnt i?

    Doesn't work with @Louis1234567890987654321's code. Also no other events seem to be working... Gah! What am i doing wrong! :mad:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 5, 2016
  6. ohh. i didnt see that! my bad.

    The "HII" didn't get displayed because you are using System.out.println(). It prints a simple message in the logs, and its hard to be found. Use Bukkit.broadcastMessage("HII") instead so you can see the message
  7. Offline


    Lol, i was thinking "what is this numpty going on about as it prints to console", anyway, sure enough, it said the message "HI". Thanks for your help :).
    I also tried that, im honestly not sure which suggestion fixed it.

    But i thank both of you for taking your time :).
Thread Status:
Not open for further replies.

Share This Page