Package de.chojo.universalis.worlds
Class Worlds
java.lang.Object
de.chojo.universalis.worlds.Worlds
Class containing the currently valid regions, datacenters and worlds.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The 中国 regionstatic final class
The european regionstatic final class
The japanese regionstatic final class
The north american regionstatic final class
The oceanian region -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Worlds.China
china()
The 中国 regionstatic @Nullable DataCenter
datacenterById
(int id) Retrieves a data center by idstatic @Nullable DataCenter
datacenterByName
(@Nullable String name) Retrieves a data center by namestatic Worlds.Europe
europe()
The european regionstatic Worlds.Japan
japan()
The japanese regionstatic Worlds.NorthAmerica
The north american regionstatic Worlds.Oceania
oceania()
The oceanian regionregionByName
(@Nullable String name) Retrieves a region by nameregions()
Returns all valid regionsstatic World
Transforms a world entity to an internal richer world modelstatic World
worldById
(int id) Gets a world by its id.worldByName
(@Nullable String name) Retrieve a world by its name
-
Constructor Details
-
Worlds
public Worlds()
-
-
Method Details
-
europe
The european region- Returns:
- europe region
-
northAmerica
The north american region- Returns:
- north american region
-
oceania
The oceanian region- Returns:
- oceanian region
-
japan
The japanese region- Returns:
- japanese region
-
china
The 中国 region- Returns:
- 中国 region
-
regions
Returns all valid regions- Returns:
- unmodifiable list of regions
-
worldById
Gets a world by its id.- Parameters:
id
- world id- Returns:
- world if valid or a dummy world with the matching ID
-
datacenterByName
@Nullable @Contract("null -> null") public static @Nullable DataCenter datacenterByName(@Nullable @Nullable String name) Retrieves a data center by name- Parameters:
name
- data center name case-insensitive- Returns:
- data center
-
datacenterById
Retrieves a data center by id- Parameters:
id
- data center id- Returns:
- data center
-
regionByName
@Nullable @Contract("null -> null") public static @Nullable Region regionByName(@Nullable @Nullable String name) Retrieves a region by name- Parameters:
name
- region name case-insensitive- Returns:
- region
-
worldByName
@Nullable @Contract("null -> null") public static @Nullable World worldByName(@Nullable @Nullable String name) Retrieve a world by its name- Parameters:
name
- name case-insensitive- Returns:
- world
-
toWorld
Transforms a world entity to an internal richer world model- Parameters:
world
- world entity- Returns:
- world
-