Package net.glowstone.scheduler
Class WorldScheduler
java.lang.Object
net.glowstone.scheduler.WorldScheduler
Manager for world thread pool.
This is a little magical and finnicky, so tread with caution when messing with the phasers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempts to start scheduled ticks for a world.Returns the world with a given name.Returns the world with a given UUID.Returns an immutable list of the currently scheduled worlds.boolean
removeWorld
(GlowWorld world) Stops scheduled ticks for a world.
-
Constructor Details
-
WorldScheduler
public WorldScheduler()
-
-
Method Details
-
getWorlds
Returns an immutable list of the currently scheduled worlds.- Returns:
- the scheduled worlds
-
getWorld
Returns the world with a given name.- Parameters:
name
- the name to look up- Returns:
- the world with that name, or null if none match
-
getWorld
Returns the world with a given UUID.- Parameters:
uid
- the UUID to look up- Returns:
- the world with that UUID, or null if none match
-
addWorld
Attempts to start scheduled ticks for a world.- Parameters:
world
- the world to start ticking- Returns:
world
if it is now ticking; null otherwise
-
removeWorld
Stops scheduled ticks for a world.- Parameters:
world
- the world to stop ticking- Returns:
- whether the world had been scheduled
-
getAdvanceCondition
-