Solved Quit message help

Discussion in 'Plugin Development' started by bubblefat_, Dec 20, 2014.

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

    bubblefat_

    Im still a noob to coding. Why is there an error here.

    Screen Shot 2014-12-20 at 12.53.44 PM.png
     
  2. Offline

    tcvs

    @bubblefat_ You don't have a player reference in onPlayerQuit. so add Player player = event.getPlayer();. I would recommend you learn java before trying to code a plugin.
     
    mine-care likes this.
  3. Offline

    timtower Administrator Administrator Moderator

    Moved to plugin development.
     
  4. Offline

    SuperOriginal

    That ^, and you also need an @EventHandler notation above the quit event as well.
     
  5. Offline

    ChipDev

    Wait, was this already solved? If so, put 'solved' before its title.
    SOLUTION:
    You have Player player = event.getPlayer() (Good job :D) INSIDE of the blocks of the join event. All the variables you create in a {} method will be removed in the next block, so you have to create them again, (Or use the hard hash map way :p)
     
  6. Offline

    mine-care

    @tcvs is so right... Please proceed to the Java world before coding plugins, this is not because we are mean but because this way it will take u half the time to make plugins and u will open the horizons to what u can do with it. From personal experience I learned Java just to CDs plugins but then I fell in love with it and now I can code swing apps,console apps and many man more
    If u need help feel free to ask us :)
     
Thread Status:
Not open for further replies.

Share This Page