Record Class RespawnPoint
java.lang.Object
java.lang.Record
fr.fidorial.entity.RespawnPoint
- Record Components:
world- the world to respawn inlocation- the position and orientation to respawn at
The place a player comes back to after dying.
A point is bound to a World: when that world is no longer loaded at respawn time the
server silently falls back to the configured world spawn and clears the point.
- Since:
- 0.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRespawnPoint(World world, Location location) Creates an instance of aRespawnPointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.static RespawnPointstatic RespawnPointstatic RespawnPointfinal StringtoString()Returns a string representation of this record class.world()Returns the value of theworldrecord component.
-
Constructor Details
-
RespawnPoint
-
-
Method Details
-
of
- Parameters:
world- the world to respawn inlocation- the position to respawn at- Returns:
- a point at that position
-
of
- Parameters:
world- the world to respawn inx- the x coordinatey- the y coordinatez- the z coordinate- Returns:
- a point at those coordinates, facing south
-
of
- Parameters:
entity- the entity whose current placement is captured- Returns:
- a point at that entity's world and location
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
world
-
location
-