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.
  • 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 a StandardContext record class.
      Parameters:
      baseValue - the value for the baseValue record component
      playerId - the value for the playerId record component
      targetPlayerId - the value for the targetPlayerId record component
      arenaId - the value for the arenaId record component
      plotNumber - the value for the plotNumber record component
      subjectId - the value for the subjectId record 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

      @NotNull public @NotNull ModifierContext.StandardContext withBase(double newBase)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • baseValue

      public double baseValue()
      Returns the value of the baseValue record component.
      Specified by:
      baseValue in interface ModifierContext
      Returns:
      the value of the baseValue record component
    • playerId

      @Nullable public @Nullable UUID playerId()
      Returns the value of the playerId record component.
      Specified by:
      playerId in interface ModifierContext
      Returns:
      the value of the playerId record component
    • targetPlayerId

      @Nullable public @Nullable UUID targetPlayerId()
      Returns the value of the targetPlayerId record component.
      Returns:
      the value of the targetPlayerId record component
    • arenaId

      @Nullable public @Nullable String arenaId()
      Returns the value of the arenaId record component.
      Returns:
      the value of the arenaId record component
    • plotNumber

      public int plotNumber()
      Returns the value of the plotNumber record component.
      Returns:
      the value of the plotNumber record component
    • subjectId

      @Nullable public @Nullable String subjectId()
      Returns the value of the subjectId record component.
      Returns:
      the value of the subjectId record component