I would like to work on a Minecraft Pvp plugin soon. However, it shouldn't be for bungee cord, but for spigot. So that means: I can't determine when the game starts via the players who are online. So you have to use a separate world for e.g. The lobby. Then I plan to count the players in the world and as soon as the players are above a certain value (e.g. 8) the game should start. Now the problem is that I don't know how to get the players told in a world. Can anyone help me?
Bukkit.getOnlinePlayers ()
Gives you all the players who are online on the server. Then you can query the world of each and then proceed.
So you could do it like this:
all = Bukkit.getonlineplayers ()
if (all.getWorld == diegesuchtewelt) {
p.sendMessage ("This is where the process happens")
}
Can it work like that?
Something like that, yes. But you'd have to do a for loop around the players.
So:
for (int i = 0; i <8) {
if (all.getWorld () == world) {
i ++;
}
}
Can it work like that? Or do I have a board right now?