Record Class RateLimitConfig
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.configuration.RateLimitConfig
-
Constructor Summary
ConstructorsConstructorDescriptionRateLimitConfig(boolean enabled, int maxRate, String maxRateKickMessage, int warningRate, int maxWarnings, long trackingPeriodNanos, String warningKickMessage, String ratePlaceholder) Creates an instance of aRateLimitConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxRate()Returns the value of themaxRaterecord component.Returns the value of themaxRateKickMessagerecord component.intReturns the value of themaxWarningsrecord component.Returns the value of theratePlaceholderrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetrackingPeriodNanosrecord component.Returns the value of thewarningKickMessagerecord component.intReturns the value of thewarningRaterecord component.
-
Constructor Details
-
RateLimitConfig
public RateLimitConfig(boolean enabled, int maxRate, String maxRateKickMessage, int warningRate, int maxWarnings, long trackingPeriodNanos, String warningKickMessage, String ratePlaceholder) Creates an instance of aRateLimitConfigrecord class.- Parameters:
enabled- the value for theenabledrecord componentmaxRate- the value for themaxRaterecord componentmaxRateKickMessage- the value for themaxRateKickMessagerecord componentwarningRate- the value for thewarningRaterecord componentmaxWarnings- the value for themaxWarningsrecord componenttrackingPeriodNanos- the value for thetrackingPeriodNanosrecord componentwarningKickMessage- the value for thewarningKickMessagerecord componentratePlaceholder- the value for theratePlaceholderrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
maxRate
public int maxRate()Returns the value of themaxRaterecord component.- Returns:
- the value of the
maxRaterecord component
-
maxRateKickMessage
Returns the value of themaxRateKickMessagerecord component.- Returns:
- the value of the
maxRateKickMessagerecord component
-
warningRate
public int warningRate()Returns the value of thewarningRaterecord component.- Returns:
- the value of the
warningRaterecord component
-
maxWarnings
public int maxWarnings()Returns the value of themaxWarningsrecord component.- Returns:
- the value of the
maxWarningsrecord component
-
trackingPeriodNanos
public long trackingPeriodNanos()Returns the value of thetrackingPeriodNanosrecord component.- Returns:
- the value of the
trackingPeriodNanosrecord component
-
warningKickMessage
Returns the value of thewarningKickMessagerecord component.- Returns:
- the value of the
warningKickMessagerecord component
-
ratePlaceholder
Returns the value of theratePlaceholderrecord component.- Returns:
- the value of the
ratePlaceholderrecord component
-