[Help] MOTD Problems

Discussion in 'Plugin Development' started by XvBaseballkidvX, Mar 13, 2014.

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

    XvBaseballkidvX

    Hello everyone!

    I am currently making a minigame plugin and was wondering if this is even possible:

    I want to use signs to display game statuses and was wondering if you could get the MOTD set in the ServerListPingEvent.

    Example:
    Code:java
    1. public class Blah implements Listener{
    2.  
    3. @EventHandler
    4. public void onServerPing(ServerListPingEvent event){
    5. event.setMotd("BlahBlah"); // <--- I want to be able to get what I have set there.
    6. }
    7. }


    Is it possible to retrieve that MOTD and display it onto a sign?

    Thank you for reading!
    All help is much appreciated! :D

    EDIT: Fixed silly mistake :3
     
  2. Offline

    The Fancy Whale

    event.getMotd()
    As seen here
    I hope that helped :)
     
  3. XvBaseballkidvX
    Use event.getMotd();

    EDIT: Well, I can't read... seems you fixed it ;)
     
  4. Offline

    The Fancy Whale

    I think that is referring to a different mistake but I could be wrong
     
  5. Offline

    XvBaseballkidvX

  6. Offline

    Borlea

    I think its something like Bukkit.getMotd() to get from server.props
    No way to get that value as it can be set to certain people only and not saved anywhere, gonna have to save it somewhere event.getMotd() will return it cause you set it in the event.
     
Thread Status:
Not open for further replies.

Share This Page