Package org.spongepowered.api.util
Class RespawnLocation.Builder
java.lang.Object
org.spongepowered.api.data.persistence.AbstractDataBuilder<RespawnLocation>
org.spongepowered.api.util.RespawnLocation.Builder
- All Implemented Interfaces:
- AbstractBuilder<RespawnLocation>,- DataBuilder<RespawnLocation>,- Builder<RespawnLocation,,- RespawnLocation.Builder> - CopyableBuilder<RespawnLocation,,- RespawnLocation.Builder> - ResettableBuilder<RespawnLocation,- RespawnLocation.Builder> 
- Enclosing class:
- RespawnLocation
public static final class RespawnLocation.Builder
extends AbstractDataBuilder<RespawnLocation>
implements Builder<RespawnLocation,RespawnLocation.Builder>, CopyableBuilder<RespawnLocation,RespawnLocation.Builder>  
A helper class to build 
RespawnLocations.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Creates a newRespawnLocationfrom this builder.protected Optional<RespawnLocation>buildContent(DataView container) Builds the currentlyAbstractDataBuilder.supportedVersionvariant of the intendedDataSerializable, such that all content upgrades have already been handled byAbstractDataBuilder.build(DataView).forceSpawn(boolean isForced) Sets whether the position to respawn at is forced or can be varied for safety.from(RespawnLocation value) Resets this builder to the values of the given built object.location(ServerLocation location) Sets theVector3dposition of where to respawn at.reset()Resets this builder to a "default" state such that there is no remaining data to set.world(ResourceKey key) Sets thekeytied to the desiredServerWorld.world(ServerWorld world) Sets thekeyof the providedServerWorldonto this builder.Methods inherited from class org.spongepowered.api.data.persistence.AbstractDataBuilderbuild
- 
Constructor Details- 
Builderpublic Builder()Creates a newRespawnLocation.Builder.
 
- 
- 
Method Details- 
worldSets thekeyof the providedServerWorldonto this builder.- Parameters:
- world- The world
- Returns:
- This builder, for chaining
 
- 
worldSets thekeytied to the desiredServerWorld.- Parameters:
- key- The key
- Returns:
- This builder, for chaining
 
- 
location- Parameters:
- location- The location desired
- Returns:
- This builder, for chaining
 
- 
positionSets theVector3dposition of where to respawn at.- Parameters:
- position- The position to respawn at
- Returns:
- This builder, for chaining
 
- 
forceSpawnSets whether the position to respawn at is forced or can be varied for safety.- Parameters:
- isForced- If the respawn position is forced
- Returns:
- This builder, for chaining
 
- 
buildContentDescription copied from class:AbstractDataBuilderBuilds the currentlyAbstractDataBuilder.supportedVersionvariant of the intendedDataSerializable, such that all content upgrades have already been handled byAbstractDataBuilder.build(DataView). This otherwise follows the same contract asDataBuilder.build(DataView).- Specified by:
- buildContentin class- AbstractDataBuilder<RespawnLocation>
- Parameters:
- container- The container with data to build from
- Returns:
- The deserialized data serializable, if possible
- Throws:
- InvalidDataException- If there's issues of invalid data formats or invalid data
 
- 
resetDescription copied from interface:BuilderResets this builder to a "default" state such that there is no remaining data to set. This is to be the presumed "default" state.- Specified by:
- resetin interface- Builder<RespawnLocation,- RespawnLocation.Builder> 
- Specified by:
- resetin interface- ResettableBuilder<RespawnLocation,- RespawnLocation.Builder> 
- Returns:
- This builder, for chaining
 
- 
fromDescription copied from interface:CopyableBuilderResets this builder to the values of the given built object.- Specified by:
- fromin interface- CopyableBuilder<RespawnLocation,- RespawnLocation.Builder> 
- Parameters:
- value- The built object
- Returns:
- This builder, for chaining
 
- 
buildCreates a newRespawnLocationfrom this builder.- Specified by:
- buildin interface- AbstractBuilder<RespawnLocation>
- Returns:
- The new respawn location
 
 
-