Interface IDhApiWorldProxy
public interface IDhApiWorldProxy
Used to interact with Distant Horizons' current world.
A world is equivalent to a single server connection or a singleplayer world.
A world is equivalent to a single server connection or a singleplayer world.
- Since:
- API 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiongetAllLoadedLevelsForDimensionType
(IDhApiDimensionTypeWrapper dimensionTypeWrapper) In the case of servers running multiverse there may be multiple levels for the same dimensionType.getAllLoadedLevelsWithDimensionNameLike
(String dimensionName) Returns any dimensions that have names containing the given string (case-insensitive).boolean
In singleplayer this will return the level the player is currently in.void
setReadOnly
(boolean readOnly) Defaults to false.boolean
Returns true if a world is loaded.
-
Method Details
-
worldLoaded
boolean worldLoaded()Returns true if a world is loaded. -
setReadOnly
Defaults to false.
Setting this to true will prevent DH from updating or creating new LODs.- Throws:
IllegalStateException
- if no world is loaded- Since:
- API 4.0.0
- See Also:
-
getReadOnly
- Throws:
IllegalStateException
- if no world is loaded- Since:
- API 4.0.0
- See Also:
-
getSinglePlayerLevel
In singleplayer this will return the level the player is currently in.
In multiplayer this will return null.- Throws:
IllegalStateException
- if no world is loaded
-
getAllLoadedLevelWrappers
- Throws:
IllegalStateException
- if no world is loaded
-
getAllLoadedLevelsForDimensionType
Iterable<IDhApiLevelWrapper> getAllLoadedLevelsForDimensionType(IDhApiDimensionTypeWrapper dimensionTypeWrapper) throws IllegalStateException In the case of servers running multiverse there may be multiple levels for the same dimensionType.- Throws:
IllegalStateException
- if no world is loaded
-
getAllLoadedLevelsWithDimensionNameLike
Iterable<IDhApiLevelWrapper> getAllLoadedLevelsWithDimensionNameLike(String dimensionName) throws IllegalStateException Returns any dimensions that have names containing the given string (case-insensitive).
In the case of servers running multiverse there may be multiple levels for the same dimensionType.- Throws:
IllegalStateException
- if no world is loaded
-