Solved ServerListPingEvent questions

Discussion in 'Plugin Development' started by Ungemonstert, May 27, 2015.

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

    Ungemonstert

    Hey,
    I'm coding a maintance plugin. I solved everything, but now I wanna edit the Ping next to the "users / max. slots". I have seen on some Servers, that they have a text there and changed the Ping to "Maintance". Now I wanna ask how I do that. Anyone can help me?

    Thanks,
    Ungemonstert
     
  2. Offline

    techboy291

    I think you mean the message of the day, which you can change by calling setMOTD(String) on the ServerListPingEvent object.
     
  3. Offline

    killerzz1

  4. Offline

    I Al Istannen

  5. Offline

    Ungemonstert

    @killerzz1 yes, I mean the message, if I go with my mouse over the count.

    @I Al Istannen Is there any tutorial that you know its good?

    Sorry if you understand that bad :/
     
  6. Offline

    I Al Istannen

  7. Offline

    Ungemonstert

    @I Al Istannen I don't understand that. Whatever I do is wrong. You can help me with an example code?
    Google, Youtube etc doesn't help much..
     
  8. Offline

    techboy291

    @killerzz1 Yeah, I don't know why I thought he meant that.

    Could you give an example of what you're wanting?
     
  9. Offline

    Ungemonstert

  10. Offline

    mine-care

    This has been done by @Skionz he has made an awesome Ali found on the resources section, I think it is called fancy ping :- )
     
  11. Offline

    Ungemonstert

    Thank you @mine-care I would try if that works for me ;)

    Okay. I've got an error, but I never seen that one before. Did anyone know how to fix?

    Code:
    @Override
        public void onPing(PingEvent event) {
           
            PingReply reply = event.getReply();
           
            List<String> sample = new LinkedList<String>();
            sample.add("§4Thats red!");
            sample.add("§3Thats orange!");
            reply.setPlayerSample(sample);
        }
    Error is in line:
    Code:
    reply.setPlayerSample(sample);
    It says:
    The type com.mojang.authlib.GameProfile cannot be resolved. It is indirectly referenced from required .class files

    <Edit by mrCookieSlime: Merged posts. Please don't double post. There is an Edit Button right next to the Date.>
     
    Last edited by a moderator: May 30, 2015
  12. Offline

    mine-care

    @Ungemonstert
    Umm i assume you use the API externally and not directly by passing the code to your project, umm what server type and version are you running? (by type i mean: Spigot, bukkit, whatev)
     
  13. Offline

    Ungemonstert

    @mine-care i downloaded the new version and it worked :) but thanks :)
     
  14. Offline

    mine-care

Thread Status:
Not open for further replies.

Share This Page