Solved -

Discussion in 'Plugin Development' started by PlayFriik, Nov 29, 2014.

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


  2. Offline

    timtower Moderator Moderator

    PlayFriik You never registered the event.
  3. Offline


    You haven't registered your events. Also by doing x + y + z, you'll be sending them the result number of x + y + z rather than their respective coordinates. For example, if your x, y and z were all 1, the result would be 3. You need to add an empty string (or preferably a space) between the coordinates.
  4. Offline


    Sorry, but how I can register an event?
    (I know that is noobiest question ever, but then I can learn.)
  5. Offline

    bwfcwalshy Retired Staff

    PlayFriik In the main class in the onEnable method do getServer().getPluginManager().registerEvents(new Class(), this);

    Replace Class() with the Listener class.
  6. Offline


    Okay, thank you so much. <3

    One more question:
    If I made this Event in my Main class file then how I register it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 29, 2016
  7. Offline

    bwfcwalshy Retired Staff

    PlayFriik getServer().getPluginManager().registerEvents(this, this);
  8. Offline


    Okay, that's it, I put this thread as Solved.
Thread Status:
Not open for further replies.

Share This Page