I wanted to ask if you know how to query if a world is a nether or an end?
(Spigot 1.8.8)
Usually with the world name if you use the standard worlds, since the normal world is called world, the nether world_nether and the ending world_end.
But if you create a new world with Multiverse-Core, for example, with a different name
World world;
if (world.getEnvironment () == World.Environment.NETHER)
if (world.getEnvironment () == World.Environment.THE_END)
Thanks that worked.
Yes, Ludwig's answer should have done it.
If (world.getEnvironment () == Environment.NETHER) {…}
if (world.getEnvironment () == Environment.END) {…}
Instead of "world" you can also use "event.getTo (). GetWorld ()" or "player.getWorld ()" if you want to check the world in which the command was executed / the player is.