Record Class ModifierContext.StandardContext
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.modifier.ModifierContext.StandardContext
- All Implemented Interfaces:
ModifierContext
- Enclosing interface:
ModifierContext
public static record ModifierContext.StandardContext(double baseValue, @Nullable UUID playerId, @Nullable UUID targetPlayerId, @Nullable String arenaId, int plotNumber, @Nullable String subjectId)
extends Record
implements ModifierContext
Generic context implementation covering income, steal duration, fusion odds,
conveyor speed, rarity weights, and progression/shop costs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ModifierContext
ModifierContext.StandardContext -
Constructor Summary
ConstructorsConstructorDescriptionStandardContext(double baseValue, @Nullable UUID playerId, @Nullable UUID targetPlayerId, @Nullable String arenaId, int plotNumber, @Nullable String subjectId) Creates an instance of aStandardContextrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringarenaId()Returns the value of thearenaIdrecord component.doubleReturns the value of thebaseValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static @NotNull ModifierContext.StandardContextstatic @NotNull ModifierContext.StandardContextofPlayerSubject(double baseValue, @Nullable UUID playerId, @Nullable String subjectId) static @NotNull ModifierContext.StandardContextofSteal(double baseValue, @NotNull UUID thiefId, @NotNull UUID victimId, @Nullable String arenaId, int plotNumber, @Nullable String blockId) @Nullable UUIDplayerId()Returns the value of theplayerIdrecord component.intReturns the value of theplotNumberrecord component.@Nullable StringReturns the value of thesubjectIdrecord component.@Nullable UUIDReturns the value of thetargetPlayerIdrecord component.final StringtoString()Returns a string representation of this record class.@NotNull ModifierContext.StandardContextwithBase(double newBase)
-
Constructor Details
-
StandardContext
public StandardContext(double baseValue, @Nullable @Nullable UUID playerId, @Nullable @Nullable UUID targetPlayerId, @Nullable @Nullable String arenaId, int plotNumber, @Nullable @Nullable String subjectId) Creates an instance of aStandardContextrecord class.- Parameters:
baseValue- the value for thebaseValuerecord componentplayerId- the value for theplayerIdrecord componenttargetPlayerId- the value for thetargetPlayerIdrecord componentarenaId- the value for thearenaIdrecord componentplotNumber- the value for theplotNumberrecord componentsubjectId- the value for thesubjectIdrecord component
-
-
Method Details
-
ofPlayer
@NotNull public static @NotNull ModifierContext.StandardContext ofPlayer(double baseValue, @NotNull @NotNull UUID playerId) -
ofPlayerSubject
@NotNull public static @NotNull ModifierContext.StandardContext ofPlayerSubject(double baseValue, @Nullable @Nullable UUID playerId, @Nullable @Nullable String subjectId) -
ofSteal
@NotNull public static @NotNull ModifierContext.StandardContext ofSteal(double baseValue, @NotNull @NotNull UUID thiefId, @NotNull @NotNull UUID victimId, @Nullable @Nullable String arenaId, int plotNumber, @Nullable @Nullable String blockId) -
withBase
-
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. -
baseValue
public double baseValue()Returns the value of thebaseValuerecord component.- Specified by:
baseValuein interfaceModifierContext- Returns:
- the value of the
baseValuerecord component
-
playerId
Returns the value of theplayerIdrecord component.- Specified by:
playerIdin interfaceModifierContext- Returns:
- the value of the
playerIdrecord component
-
targetPlayerId
Returns the value of thetargetPlayerIdrecord component.- Returns:
- the value of the
targetPlayerIdrecord 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
-
subjectId
Returns the value of thesubjectIdrecord component.- Returns:
- the value of the
subjectIdrecord component
-