Check out example codes for "bukkit for every player". It will help you in understanding the concepts better.

Code Example 1

for(Player all : Bukkit.getServer().getOnlinePlayers())
{
    all.something(something)
}

Learn ReactJs, React Native from akashmittal.com