Interface WorldProperties
- All Superinterfaces:
DataHolder,DataHolder.Mutable,GameRuleHolder,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.MutableNested classes/interfaces inherited from interface org.spongepowered.api.world.weather.WeatherUniverse
WeatherUniverse.Mutable -
Method Summary
Modifier and TypeMethodDescriptiondayTime()Gets the time of day.default DifficultyGets theDifficulty.gameTime()Gets theMinecraftDayTimesince the world was created.default booleanhardcore()Gets if this is in hardcore mode.default voidsetSpawnPosition(Vector3i position) Sets the default spawn position.default Vector3iGets 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, undoMethods inherited from interface org.spongepowered.api.world.gamerule.GameRuleHolder
gameRule, gameRules, setGameRuleMethods inherited from interface org.spongepowered.api.data.value.ValueContainer
get, getDouble, getInt, getKeys, getLong, getOrElse, getOrNull, getValue, getValues, require, requireValue, supports, supportsMethods 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 theMinecraftDayTimesince 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
-