Is it possible to get the amount of players online in a multiverse world?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mapzman

Member
Mar 26, 2017
11
0
1
Skript Version: Skript 2.2 (dev25)
Minecraft Version: 1.11.2

Is it possible to get the amount of players online in only 1 multiverse world?
 
Last edited:
code_language.skript:
loop all players in world "worldname":
    add loop-player to {_players::*}
    set {_online} to size of {_players::*}
    message "&aOnline&8: &7(&b%{_online}%&7)"
 
code_language.skript:
set {Count.WorldExample} to 0   
loop all players:
    if loop-player is in world "Example":
        add 1 to {Count.WorldExample}
 
For the love of God, keep it simple guys:
code_language.skript:
set {_amount} to amount of players in world "world name here"
 
There's a syntax for that? :emoji_astonished:
Talk about efficient. xD
There isn't a syntax for it, its a combination of multiple.
code_language.skript:
(size|amount) of %objects%
which gives you the size of any list, and:
code_language.skript:
players in world %string%
which returns a list, so by combining the two you can do what @Snow-Pyon did.
 
Status
Not open for further replies.