Solved OnPlayerJoin double..

Discussion in 'Plugin Development' started by AppleMen, Nov 8, 2013.

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

    hellboyPS

    You're not reacting to anything we said. This way you won't get any help here. I'm sorry.
     
  2. Offline

    AppleMen

    I don't have a duplicate Method in any other Listeners.
     
  3. Offline

    The_Doctor_123

    AppleMen
    Okay, I'm giving you one last reply. Answer my two questions or I'm out of here. In case you forgot, here are my questions:

     
  4. Offline

    AppleMen

    I tested it, and yes, the OnQuitEvent is working. And not the OnPlayerJoinEvent.

    So the message that someone left is working.
     
  5. Offline

    The_Doctor_123

    AppleMen
    I'm done. You failed to fully read what I said. Wish others luck in dealing with you(if there will be any).
     
  6. Offline

    geNAZt

    what is AutoMessage ? can you post it or post a link to your whole code ?
     
  7. Offline

    AppleMen

    I answered your question!

    I made a new code, it doesn't have the AutoMessage anymore.

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

    The_Doctor_123

    AppleMen
     
  9. Offline

    AppleMen

    I'm asking you to test out ANY other event besides the PlayerJoinEvent and see if it runs twice just like your PlayerJoinEvent

    It doesn't run twice.
     
  10. Offline

    The_Doctor_123

    AppleMen
    It's unbelievable how oblivious you are..
     
  11. Offline

    AppleMen

    I just don't understand your question..
     
  12. Offline

    MrSparkzz

    AppleMen
    Us developers take time out of our days to assist people asking for help like yourself. But when you don't listen, take advice or you don't do what's asked of you, then we wont want to help you any further than we already have, as The_Doctor_123 has displayed here.
     
  13. Offline

    AppleMen

    I didn't understand the question, and i didn't want to ask it again..
     
  14. Offline

    The_Doctor_123

  15. Offline

    AppleMen

    I know it a little bit. Plugins with this worked before, but now this one doesn't.
     
  16. Offline

    geNAZt

    as long as you dont login twice or havent registered your listeners twice you can not get a playerjoinevent twice.

    its easy as that. try to add a playermoveevent and check if it also gets fired twice. if yes then its your fault, if bot it probably a bukkit bug
     
  17. Offline

    AppleMen

    I didn't logged in twice, and I registered the events.
     
  18. Offline

    geNAZt

    do you get the signchangevent in coloredsigns twice ?
     
  19. Offline

    AppleMen

    nop. this is my sign class:
    Code:java
    1. @EventHandler
    2. public void onSign(SignChangeEvent e)
    3. {
    4. if(e.getPlayer().hasPermission("perm.ission"))
    5. {
    6. e.setLine(0, ChatColor.translateAlternateColorCodes('&', e.getLine(0)));
    7. e.setLine(1, ChatColor.translateAlternateColorCodes('&', e.getLine(1)));
    8. e.setLine(2, ChatColor.translateAlternateColorCodes('&', e.getLine(2)));
    9. e.setLine(3, ChatColor.translateAlternateColorCodes('&', e.getLine(3)));
    10. }
    11. }
    12. }
     
  20. Offline

    MrSparkzz

    AppleMen
    I think it'd just be best to post all of the code in all your classes so we can scour through it for errors. Probably your best bet at this point.
     
  21. Offline

    The_Doctor_123

    MrSparkzz
    I've only been trying to ask that this whole entire time..
     
  22. Offline

    AppleMen

  23. Offline

    The_Doctor_123

    AppleMen
    Ugh...
     
  24. Offline

    geNAZt

  25. Offline

    AppleMen

  26. Offline

    The_Doctor_123

    AppleMen
    Ummmmmmmm.... Yeah. You're extending Main and.. implementing JavaPlugin?!
     
  27. Offline

    AppleMen

    :D, now it works. I made that class once, and then never looked at it anymore because I thought that couldn't be problem.. But yeah, its working now :)

    Thanks for the help!

    [​IMG]
     
  28. Offline

    ZachBora

    AppleMen Why is your plugin named "Main"? You should name your JavaPlugin class the same as your plugin.


    As for the problem, it's simple. AutoMesage extends Main. This means it has all the same properties INCLUDING listeners.

    Edit: Replied too late :/
     
  29. Offline

    MrSparkzz

    AppleMen
    Two of your classes: Main & RewardSign.

    are both extending JavaPlugin. You can only have one class extend JavaPlugin. Fix this and many of your problems should be solved!

    Edit: Didn't refresh the page before seeing the new posts.
     
Thread Status:
Not open for further replies.

Share This Page