Package com.sk89q.worldedit.session
Record Class Placement
java.lang.Object
java.lang.Record
com.sk89q.worldedit.session.Placement
-
Constructor Summary
ConstructorsConstructorDescriptionPlacement(PlacementType placementType, BlockVector3 offset) Creates an instance of aPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeUsedBy(Actor actor) final booleanIndicates whether some other object is "equal to" this one.com.sk89q.worldedit.util.formatting.text.ComponentgetInfo()getPlacementPosition(RegionSelector selector, Actor actor) final inthashCode()Returns a hash code value for this object.offset()Returns the value of theoffsetrecord component.Returns the value of theplacementTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Placement
Creates an instance of aPlacementrecord class.- Parameters:
placementType- the value for theplacementTyperecord componentoffset- the value for theoffsetrecord component
-
-
Method Details
-
getPlacementPosition
public BlockVector3 getPlacementPosition(RegionSelector selector, Actor actor) throws IncompleteRegionException - Throws:
IncompleteRegionException
-
canBeUsedBy
-
getInfo
public com.sk89q.worldedit.util.formatting.text.Component getInfo() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
placementType
Returns the value of theplacementTyperecord component.- Returns:
- the value of the
placementTyperecord component
-
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-