Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help

Comments in 'Plugin Development' started by Legomite, Mar 19, 2014.

  1. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    Does anyone know the code to find the amount of players in a single world?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Well you meant number or count of players, not amount.

    Anyway you can get an array of player objects by PlayerAPI::getAll(Level). Call it in a non-static manner. Use LevelAPI::get($name) non-statically to get the level object. Count the elements in the array to vet the number if platers.

Share This Page

Advertisement