Package com.sk89q.worldedit.session
Record Class Placement
java.lang.Object
java.lang.Record
com.sk89q.worldedit.session.Placement
-
Constructor Summary
ConstructorDescriptionPlacement
(PlacementType placementType, BlockVector3 offset) Creates an instance of aPlacement
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeUsedBy
(Actor actor) final boolean
Indicates whether some other object is "equal to" this one.com.sk89q.worldedit.util.formatting.text.Component
getInfo()
getPlacementPosition
(RegionSelector selector, Actor actor) final int
hashCode()
Returns a hash code value for this object.offset()
Returns the value of theoffset
record component.Returns the value of theplacementType
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Placement
Creates an instance of aPlacement
record class.- Parameters:
placementType
- the value for theplacementType
record componentoffset
- the value for theoffset
record 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 theplacementType
record component.- Returns:
- the value of the
placementType
record component
-
offset
Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-