Message Channel Help

Discussion in 'Spigot Plugin Development' started by Gianluca, Jun 14, 2015.

  1. Gianluca

    Gianluca Retired Resource Staff
    Retired Patron

    Hey guys,

    I'm trying to make a GUI Server Selector plugin. I've got it all set up and working. I was just wondering how I could use the Message Channel to receive the player count of the specific server, and display it in the lore. I've left an example below.

    Let's say a player right clicks the Compass to open up the GUI window, because they want to play on our KitPvP server. Then, they hover over the items in the inventory to find the one pertaining to the KitPvP server. The items name will be something like "KitPvP", and the lore gives a brief description of what the game type is. However, I'd like to add another lore line to show something like "There are <onlinePlayers> out of <maxPlayers> online"

    I'm not sure how I'd go about doing that.. Any help is greatly appreciated!

    Thanks,
    Gian
     
  2. This video (not mine) uses the EXACT method you need to use to get the player count:

    It gets the amount of players online but I am not sure how to receive the maximum players.