Class WorldScheduler

java.lang.Object
net.glowstone.scheduler.WorldScheduler

public class WorldScheduler extends Object
Manager for world thread pool.

This is a little magical and finnicky, so tread with caution when messing with the phasers

  • Constructor Details

    • WorldScheduler

      public WorldScheduler()
  • Method Details

    • getWorlds

      public List<GlowWorld> getWorlds()
      Returns an immutable list of the currently scheduled worlds.
      Returns:
      the scheduled worlds
    • getWorld

      public GlowWorld getWorld(String name)
      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

      public GlowWorld getWorld(UUID uid)
      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

      public GlowWorld addWorld(GlowWorld world)
      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

      public boolean removeWorld(GlowWorld world)
      Stops scheduled ticks for a world.
      Parameters:
      world - the world to stop ticking
      Returns:
      whether the world had been scheduled
    • getAdvanceCondition

      public Object getAdvanceCondition()