Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- get(WorldConfig)
- ensureAndGet(WorldConfig)
- shouldPreventReconnection()
- shouldInheritWorldSettings()
- getRemovalConditions()
- setRemovalConditions(RemovalCondition...)
- getReturnPoint()
- setReturnPoint(WorldReturnPoint)
- getDiscovery()
- setDiscovery(InstanceDiscoveryConfig)
- shouldRespawnWhenTargeted()
- getInstanceKey()
- getInstanceName()
- setInstanceName(String)
- getEventTitleOnRemoval()
- setEventTitleOnRemoval(EventTitleConfig)
- isEditMode()
- setEditMode(boolean)
Class InstanceWorldConfig
java.lang.Object
com.hypixel.hytale.builtin.instances.config.InstanceWorldConfig
The configuration for instance worlds, providing settings specific to instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<InstanceWorldConfig> The codec used to parseInstanceWorldConfiginstances.static final StringThe unique identifier for theInstanceWorldConfigcodec. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InstanceWorldConfigensureAndGet(WorldConfig config) Ensures that the givenWorldConfighas anInstanceWorldConfigand returns it.static InstanceWorldConfigget(WorldConfig config) booleanvoidsetDiscovery(InstanceDiscoveryConfig discovery) Sets the discovery configuration for this instance.voidsetEditMode(boolean editMode) voidsetEventTitleOnRemoval(EventTitleConfig eventTitleOnRemoval) Sets the event title to show while this instance closes.voidsetInstanceName(String instanceName) Called by the spawn flow to record the instance asset this world was spawned from.voidsetRemovalConditions(RemovalCondition... removalConditions) Called to set the removal conditions.voidsetReturnPoint(WorldReturnPoint returnPoint) Called to set the return point.booleanbooleanboolean
-
Field Details
-
ID
The unique identifier for theInstanceWorldConfigcodec.- See Also:
-
CODEC
The codec used to parseInstanceWorldConfiginstances.
-
-
Constructor Details
-
InstanceWorldConfig
public InstanceWorldConfig()
-
-
Method Details
-
get
- Parameters:
config- The world config.- Returns:
- the instance world config, or
nullif not present.
-
ensureAndGet
Ensures that the givenWorldConfighas anInstanceWorldConfigand returns it.- Parameters:
config- The world config.- Returns:
- the instance world config.
-
shouldPreventReconnection
public boolean shouldPreventReconnection()- Returns:
trueif players should be prevented from reconnecting into this instance,falseotherwise.
-
shouldInheritWorldSettings
public boolean shouldInheritWorldSettings()- Returns:
trueif an instance inherits player defined world settings (e.g. fall damage, PvP) of the world it is entered from,falseif it keeps the authored ones.
-
getRemovalConditions
- Returns:
- the conditions that must be met for the instance to be removed.
-
setRemovalConditions
Called to set the removal conditions.- Parameters:
removalConditions- The removal conditions to set.
-
getReturnPoint
- Returns:
- the return point for players leaving this instance.
-
setReturnPoint
Called to set the return point.- Parameters:
returnPoint- The return point to set.
-
getDiscovery
- Returns:
- the discovery configuration for this instance, or
nullif no discovery is configured.
-
setDiscovery
Sets the discovery configuration for this instance.- Parameters:
discovery- The discovery configuration, ornullto disable discovery.
-
shouldRespawnWhenTargeted
public boolean shouldRespawnWhenTargeted()- Returns:
- whether returns targeting a removed copy of this instance reuse a live copy or spawn a fresh one.
-
getInstanceKey
- Returns:
- the fixed world key this instance's single copy lives under, or
nullfor a copy per use.
-
getInstanceName
- Returns:
- the instance asset this world was spawned from, or
nullwhen not spawned as a copy.
-
setInstanceName
Called by the spawn flow to record the instance asset this world was spawned from.- Parameters:
instanceName- The instance asset name.
-
getEventTitleOnRemoval
- Returns:
- the event title to show while this instance closes, or
nullto close immediately.
-
setEventTitleOnRemoval
Sets the event title to show while this instance closes.- Parameters:
eventTitleOnRemoval- The event title, ornullto close immediately.
-
isEditMode
public boolean isEditMode() -
setEditMode
public void setEditMode(boolean editMode)
-