Solved -

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

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

    PlayFriik

  2. Online

    timtower Administrator Administrator Moderator

    PlayFriik You never registered the event.
     
  3. PlayFriik
    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

    PlayFriik

    Sorry, but how I can register an event?
    (I know that is noobiest question ever, but then I can learn.)
     
  5. PlayFriik In the main class in the onEnable method do getServer().getPluginManager().registerEvents(new Class(), this);

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

    PlayFriik

    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. PlayFriik getServer().getPluginManager().registerEvents(this, this);
     
  8. Offline

    PlayFriik

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

Share This Page