1. Welcome to LilyPad. Download the project, explore the forums, and create your own LilyPad network.


    If you use the software and enjoy it or have a question, or would like to contribute to the future of the software directly or through resources, please sign up and join our little community.

LilyPad grabbing server info

Discussion in 'Support' started by JABBZxLILJAY320, Oct 10, 2014.

  1. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    I am new to lily pad and I was wondering how would I get server info of a server thats connected to a lilypad network? Ok so say we have server A and server B if we want /test on server A to show how many online players are on server B how would I do that? - Thanks
  2. e_n_d_b_o_s_s

    e_n_d_b_o_s_s New Member

    Assuming you mean seeing who is online the other server? there are awesome resources which enable features like this, for things like you said above for listing people on other servers I suggest LilyEssentials
    it offers something similar where you type /Glist to see who is online each server, it also has fully customizable text and other awesome commands, if I misunderstood your request let me know and i'll try to help you.
  3. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    Well, I kind of meant something along the lines of it returning an int for the number of online players I want to make a scoreboard on hub which shows the amount of online players on the other servers. If that makes sense.
  4. e_n_d_b_o_s_s

    e_n_d_b_o_s_s New Member

    I think I understand what you mean, There is probably a Bukkit Bungee plugin out there for it, I will send a link here if I find one, you will need LilypadCombatBungee in order to use bungeecord bukkit plugins.
  5. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    No no no I dont want bungeecord plugins I want to make a plugin well using Lily-Pad
  6. e_n_d_b_o_s_s

    e_n_d_b_o_s_s New Member

    You want to make this plugin? I must not understand what you're trying to say ... I can't tell if your suggesting / requesting a plugin or stating your making a plugin :p
  7. e_n_d_b_o_s_s

    e_n_d_b_o_s_s New Member

    If you are looking to create a LP plugin there is a API under download's :)
  8. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    Let me try and explain this in another way. Ok so say I have a lily pad network with 3 servers (A,B,C) server A is the HUB server B is Prison and server C is factions. On the HUB (server A) i want to create a plugin were when you join a scoreboard comes up on the right and it says : Prison <amount of online players> Factions <amount of online players>. If this makes any sense at all. Also I seen a thread about this and wasn't sure what they were saying since I'm new to LilyPad to I will link it and maybe it will help you understand what I' saying. http://www.lilypadmc.org/threads/getting-the-amount-of-players-on-another-server.451/
  9. Tzeentchful

    Tzeentchful Member Contributor

    You can query the connect server to get all online players.
    Take the time to read the java docs and look at examples.

    PHP:
            Connect connect = Bukkit.getServicesManager().getRegistration(Connect.class).getProvider();
            int playerCount = 0;
            try {
                playerCount = connect.request(new GetPlayersRequest()).await(500L).getCurrentPlayers();
            } catch (RequestException e) {
                e.printStackTrace();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
  10. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    Ok thank you for that but now how would I determine which server it is getting the players from?
  11. Tzeentchful

    Tzeentchful Member Contributor

    That will get the player count for the whole network not just one server.
    If you want to get per server player count you will have to use lilypad's messaging system.
  12. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    Yes I want to get it per server, How would I do that?
  13. The_Zip

    The_Zip Active Member Resource Contributor

    There is multiple ways in which you can do it. Though, if your interested in the scoreboard showing it I started a project for it awhile back and would be happy to share it with you. Add me on Skype, connor.shaw1441 and Ill explain everything and send it over.
  14. Tzeentchful

    Tzeentchful Member Contributor

  15. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    Im sorry, Im new to Lily-Pad can you explain more, or give an example.
  16. Tzeentchful

    Tzeentchful Member Contributor

    There are examples in the thread I linked and the rest is basic bukkit stuff. If you want to look at someone else's implementation there are a few plugins in the resource section that are open source that use this system.
  17. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    Ok cool, Ill check it out. Thanks
  18. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    I still seem to be lost, can I get an example code?
  19. The_Zip

    The_Zip Active Member Resource Contributor

    Check the resource section as Tzeentchful said, I believe almost all of the plugins are open source.
  20. JABBZxLILJAY320

    JABBZxLILJAY320 New Member

    I cant seem to find what Im looking for/need help with. Can you just help me with a sample code?

Share This Page