Interface WorldProperties
- All Superinterfaces:
DataHolder
,DataHolder.Mutable
,ValueContainer
,WeatherUniverse
- All Known Subinterfaces:
ClientWorldProperties
,ServerWorldProperties
Represents the properties of a
World
which are persisted across runtime instances.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
Nested classes/interfaces inherited from interface org.spongepowered.api.world.weather.WeatherUniverse
WeatherUniverse.Mutable
-
Method Summary
Modifier and TypeMethodDescriptiondayTime()
Gets the time of day.default Difficulty
Gets theDifficulty
.gameTime()
Gets theMinecraftDayTime
since the world was created.default boolean
hardcore()
Gets if this is in hardcore mode.default void
setSpawnPosition
(Vector3i position) Sets the default spawn position.default Vector3i
Gets the default spawn position.Methods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
Methods inherited from interface org.spongepowered.api.data.value.ValueContainer
get, getDouble, getInt, getKeys, getLong, getOrElse, getOrNull, getValue, getValues, require, requireValue, supports, supports
Methods inherited from interface org.spongepowered.api.world.weather.WeatherUniverse
weather
-
Method Details
-
spawnPosition
Gets the default spawn position.- Returns:
- The spawn position
-
setSpawnPosition
Sets the default spawn position.- Parameters:
position
- The spawn position
-
gameTime
MinecraftDayTime gameTime()Gets theMinecraftDayTime
since the world was created.- Returns:
- The total time
-
dayTime
MinecraftDayTime dayTime()Gets the time of day.- Returns:
- The time of day
-
hardcore
default boolean hardcore()Gets if this is in hardcore mode.- Returns:
- Is hardcore
-
difficulty
Gets theDifficulty
.- Returns:
- The difficulty
-