Solved EventHandler Doing NOTHING!

Discussion in 'Plugin Development' started by TheSilentPvP, Sep 11, 2016.

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

    TheSilentPvP

    Hello, I am very new to coding plugins and I decided to make a test plugin with the EventHandler function. Im the plugin, I implemented some anti-glitch mechanics (if a player gets in a vehicle the plugin cancels the event etc.) However, I tried performing the event both with and without OP but it didn't prevent me from getting in the minecart. I don't have any errors in the console or in eclipse. Please help!

    pastebin of PlayerListener: http://pastebin.com/AySPJCag
    pastebin of EventHandle: http://pastebin.com/ZAt1Nu24
    pastebin of plugin.yml: http://pastebin.com/Vz4Wjbtk

    NOTE: When I add @Override it just gives me an error saying that it must "Override a superclass"
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    Zombie_Striker

    @TheSilentPvP
    That error is there for a reason. It is saying that the OnEnable method does not exist. The "O" Needs to be lower case. Changing that should fix your problem.
     
  4. @TheSilentPvP And this is why you follow naming conventions.
     
  5. Offline

    TheSilentPvP

    @timtower
    Thanks, now I can add @Override without errors.
    Also, Everything works perfectly now. Thanks!
     
    Last edited: Sep 11, 2016
  6. Offline

    Zombie_Striker

    @TheSilentPvP
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page