Worlds

public class Worlds

Contains utility methods for accessing worlds

Functions

getAll
Link copied to clipboard
static List<WorldgetAll()
Gets a list of all worlds
static List<WorldgetAll(Predicate<World> filter)
Gets a list of all worlds matching the specified filter
getCurrent
Link copied to clipboard
static Optional<WorldgetCurrent()
Gets the current world
getFirst
Link copied to clipboard
static Optional<WorldgetFirst(Array<int> worldNumber)
Gets the first world with one of the specified world numbers
static Optional<WorldgetFirst(Predicate<World> filter)
Gets the first world matching the specified filter
getRandom
Link copied to clipboard
static Optional<WorldgetRandom(Array<int> worldNumber)
Gets a random world with one of the specified world numbers
static Optional<WorldgetRandom(Predicate<World> filter)
Gets a random world that matches the specified filter
getRandomMembers
Link copied to clipboard
static Optional<WorldgetRandomMembers()
Gets a random members world, where the worlds types is exactly MEMBERS (won't match pvp worlds and so on)
getRandomNonMembers
Link copied to clipboard
static Optional<WorldgetRandomNonMembers()
Gets a random non members world, where the world has exactly no types (won't match pvp worlds and so on)