Total online

Discussion in 'Spigot Help' started by AlexMiller, Jul 20, 2018.

  1. Hi! How to AnimatedMenu display online multiple servers in a shared?
    For example bedwars-1 and bedwars-2 show their total number of players?

    Or advise such plugin.

    In PlaceholdersAPI only a single server can be used.
  2. Haven’t looked into it but perhaps you could use a JavaScript placeholder to retrieve both valued and return the combined value?
  3. I believe as @Heraldry said above, using PlaceholderAPI you can should be able to do this:
    Code (Text):
    /papi ecloud download JavaScript
    /papi ecloud download Bungee
    /papi reload
    Go to /plugins/PlaceholderAPI/javascripts/ create a file named bedwars.js
    Write something similar to this inside bedwars.js:
    Replacing Server1 and Server2 with the names of your bedwars servers inside bungeecord.
    Code (Text):
       type: %bungee_Server1% + %bungee_Server2%
    Then go to /plugins/PlaceholderAPI/javascript_placeholders.yml and add this:
    Code (Text):
      file: bedwars.js
      engine: javascript
    Reload PlaceholderAPI /papi reload
    You can test to make sure it's working by using this command:
    Code (Text):
    /papi parse %javascript_bedwars%
    Then you should be able to use the placeholder %javascript_bedwars% inside AnimatedMenus config.

    If you want the server's player counts to update faster
    inside /plugins/PlaceholderAPI/config.yml
    You need to lower this value:
    Code (Text):
        check_interval: 30
    • Informative Informative x 1
  4. Why are you here, this is not okay
  5. I love you too. <3