Package net.winmister332.libs.world
Class WorldBridge
java.lang.Object
net.winmister332.libs.world.WorldBridge
This class is a wrapper for worlds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.World[]Get all the worlds associated with the server.static org.bukkit.WorldGet the first world which is configured by the server as the main world.static org.bukkit.WorldGet a world by the specified name if the world exists.static booleanisPlayerChunkLoaded(org.bukkit.World world, org.bukkit.entity.Player player) Checks if the world chunk that the player is in is loaded.static booleanisSpawnChunkLoaded(org.bukkit.World world) Checks if the world spawn chunks are loaded.static booleanisWorldLoaded(org.bukkit.World world, org.bukkit.entity.Player player) Checks if the world spawn chunks and the player chunks are loaded.
-
Constructor Details
-
WorldBridge
public WorldBridge()
-
-
Method Details
-
getAllWorlds
public static org.bukkit.World[] getAllWorlds()Get all the worlds associated with the server.- Returns:
- A collection of worlds on the server.
-
getMainWorld
public static org.bukkit.World getMainWorld()Get the first world which is configured by the server as the main world.- Returns:
- The main world.
-
getWorld
Get a world by the specified name if the world exists.- Parameters:
worldName- The name of the world to check.- Returns:
- The world with the specified name.
-
isPlayerChunkLoaded
public static boolean isPlayerChunkLoaded(org.bukkit.World world, org.bukkit.entity.Player player) Checks if the world chunk that the player is in is loaded.- Parameters:
world- The world to check.player- The player within the world to check.- Returns:
- True if the chunk is loaded.
-
isSpawnChunkLoaded
public static boolean isSpawnChunkLoaded(org.bukkit.World world) Checks if the world spawn chunks are loaded.- Parameters:
world- The world to check.- Returns:
- True if the spawn chunks are loaded.
-
isWorldLoaded
public static boolean isWorldLoaded(org.bukkit.World world, org.bukkit.entity.Player player) Checks if the world spawn chunks and the player chunks are loaded.- Parameters:
world- The world to check.player- The player to check.- Returns:
- True if the world is loaded.
-