Record Class StealContext
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.steal.StealContext
public record StealContext(@NotNull org.bukkit.entity.Player thief, @NotNull UUID victimId, @NotNull StoredBlockView targetBlock, @NotNull String arenaId, int plotNumber)
extends Record
Context provided to
StealRules when a player attempts to steal a rival's block.-
Constructor Summary
ConstructorsConstructorDescriptionStealContext(@NotNull org.bukkit.entity.Player thief, @NotNull UUID victimId, @NotNull StoredBlockView targetBlock, @NotNull String arenaId, int plotNumber) Creates an instance of aStealContextrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringarenaId()Returns the value of thearenaIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theplotNumberrecord component.@NotNull StoredBlockViewReturns the value of thetargetBlockrecord component.@NotNull org.bukkit.entity.Playerthief()Returns the value of thethiefrecord component.final StringtoString()Returns a string representation of this record class.@NotNull UUIDvictimId()Returns the value of thevictimIdrecord component.
-
Constructor Details
-
StealContext
public StealContext(@NotNull @NotNull org.bukkit.entity.Player thief, @NotNull @NotNull UUID victimId, @NotNull @NotNull StoredBlockView targetBlock, @NotNull @NotNull String arenaId, int plotNumber) Creates an instance of aStealContextrecord class.- Parameters:
thief- the value for thethiefrecord componentvictimId- the value for thevictimIdrecord componenttargetBlock- the value for thetargetBlockrecord componentarenaId- the value for thearenaIdrecord componentplotNumber- the value for theplotNumberrecord 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. -
thief
@NotNull public @NotNull org.bukkit.entity.Player thief()Returns the value of thethiefrecord component.- Returns:
- the value of the
thiefrecord component
-
victimId
Returns the value of thevictimIdrecord component.- Returns:
- the value of the
victimIdrecord component
-
targetBlock
Returns the value of thetargetBlockrecord component.- Returns:
- the value of the
targetBlockrecord component
-
arenaId
Returns the value of thearenaIdrecord component.- Returns:
- the value of the
arenaIdrecord component
-
plotNumber
public int plotNumber()Returns the value of theplotNumberrecord component.- Returns:
- the value of the
plotNumberrecord component
-