Solved PingAPI Not working

Discussion in 'Plugin Development' started by Aephout14, Mar 19, 2015.

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

    Aephout14

  2. @The_FrosTy_Clan You aren't implementing PingListener. Read the whole tutorial before coming to a conclusion.
     
    OfficerDeveloper likes this.
  3. Offline

    Aephout14

  4. Offline

    Aephout14

    @CodePlaysMinecraft I know, I implemented it that has nothing to do wirth it, There is an error with the brackets
     
  5. @The_FrosTy_Clan Learn Java before trying to learn Bukkit. There's a problem with the curly brackets because you don't know the proper syntax.
     
    OfficerDeveloper likes this.
  6. Offline

    Aephout14

    ...
     
    Last edited: Mar 19, 2015
  7. @The_FrosTy_Clan Easy dude, when people say that there is something wrong with their curly brackets, I can only assume they don't know the proper syntax. Anyway, what error is it giving you?
     
  8. Offline

    Aephout14

    3rd curly bracket, Syntax error, insert ';' to complete blockstatements.

    @CodePlaysMinecraft Sorry for freaking out, Under alot of stress as It Is.
     
  9. Offline

    Aephout14

  10. Offline

    RainoBoy97

    He doesnt need to implement anything as the listener he registered is an anonymous class.
     
  11. Offline

    teej107

    @The_FrosTy_Clan
    From what I see in your classes, you are trying to register a PingListener in a Ping event.......... see the problem now? Also you have a PingListener that you are not using.
     
    Aephout14 and CodePlaysMinecraft like this.
  12. Offline

    ElliottOlson

    1. public void onPing(PingEvent pingEvent) {
    2. PingAPI.registerListener(new PingListener() {
    3. public void onPing(PingEvent event) {
    4. event.getReply().setMOTD("This is an MOTD");

    5. }
    6. });
    7. }
    This should fix any errors.
     
    Aephout14 likes this.
  13. Offline

    Skionz

    @The_FrosTy_Clan Your logic is a bit off. You need to register the listener when the plugin is enabled, but you registered it in an 'onPing' method which you never invoked.
     
    Aephout14 likes this.
  14. Offline

    Aephout14

    @Skionz God, I feel stupid, Sorry for bothering you.
     
    Skionz likes this.
  15. @The_FrosTy_Clan Glad that your problem is solved. Please set this thread to solved by going to Thread Tools > Edit Title > Prefix > Solved. :)
     
  16. Offline

    Aephout14

    @CodePlaysMinecraft Great Idea, Also sorry for freaking out at you.

    PROBLEM SOLVEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
     
Thread Status:
Not open for further replies.

Share This Page