Record Class ConveyorBlockView
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.conveyor.ConveyorBlockView
@AnyThread
public record ConveyorBlockView(@NotNull String arenaId, @NotNull BlockType blockType, @NotNull String state, boolean mysteryBlock, @Nullable UUID claimedOwnerId, int targetPlotNumber, double speedMultiplier, @Nullable org.bukkit.Location currentLocation)
extends Record
Immutable snapshot of a block currently moving on a conveyor or being delivered to a plot.
-
Constructor Summary
ConstructorsConstructorDescriptionConveyorBlockView(@NotNull String arenaId, @NotNull BlockType blockType, @NotNull String state, boolean mysteryBlock, @Nullable UUID claimedOwnerId, int targetPlotNumber, double speedMultiplier, @Nullable org.bukkit.Location currentLocation) Creates an instance of aConveyorBlockViewrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringarenaId()Returns the value of thearenaIdrecord component.@NotNull BlockTypeReturns the value of theblockTyperecord component.@Nullable UUIDReturns the value of theclaimedOwnerIdrecord component.@Nullable org.bukkit.LocationReturns the value of thecurrentLocationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themysteryBlockrecord component.doubleReturns the value of thespeedMultiplierrecord component.@NotNull Stringstate()Returns the value of thestaterecord component.intReturns the value of thetargetPlotNumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConveyorBlockView
public ConveyorBlockView(@NotNull @NotNull String arenaId, @NotNull @NotNull BlockType blockType, @NotNull @NotNull String state, boolean mysteryBlock, @Nullable @Nullable UUID claimedOwnerId, int targetPlotNumber, double speedMultiplier, @Nullable @Nullable org.bukkit.Location currentLocation) Creates an instance of aConveyorBlockViewrecord class.- Parameters:
arenaId- the value for thearenaIdrecord componentblockType- the value for theblockTyperecord componentstate- the value for thestaterecord componentmysteryBlock- the value for themysteryBlockrecord componentclaimedOwnerId- the value for theclaimedOwnerIdrecord componenttargetPlotNumber- the value for thetargetPlotNumberrecord componentspeedMultiplier- the value for thespeedMultiplierrecord componentcurrentLocation- the value for thecurrentLocationrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
arenaId
Returns the value of thearenaIdrecord component.- Returns:
- the value of the
arenaIdrecord component
-
blockType
Returns the value of theblockTyperecord component.- Returns:
- the value of the
blockTyperecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
mysteryBlock
public boolean mysteryBlock()Returns the value of themysteryBlockrecord component.- Returns:
- the value of the
mysteryBlockrecord component
-
claimedOwnerId
Returns the value of theclaimedOwnerIdrecord component.- Returns:
- the value of the
claimedOwnerIdrecord component
-
targetPlotNumber
public int targetPlotNumber()Returns the value of thetargetPlotNumberrecord component.- Returns:
- the value of the
targetPlotNumberrecord component
-
speedMultiplier
public double speedMultiplier()Returns the value of thespeedMultiplierrecord component.- Returns:
- the value of the
speedMultiplierrecord component
-
currentLocation
@Nullable public @Nullable org.bukkit.Location currentLocation()Returns the value of thecurrentLocationrecord component.- Returns:
- the value of the
currentLocationrecord component
-