Record Class RequireCaptcha
java.lang.Object
java.lang.Record
com.mrbysco.captcha.network.RequireCaptcha
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, RequireCaptcha> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<RequireCaptcha> -
Constructor Summary
ConstructorsConstructorDescriptionRequireCaptcha(String captchaName, String code, int maxCompletionTime, List<String> configuredWords) Creates an instance of aRequireCaptcharecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecaptchaNamerecord component.code()Returns the value of thecoderecord component.Returns the value of theconfiguredWordsrecord 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 themaxCompletionTimerecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()
-
Field Details
-
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, RequireCaptcha> CODEC -
ID
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<RequireCaptcha> ID
-
-
Constructor Details
-
RequireCaptcha
public RequireCaptcha(String captchaName, String code, int maxCompletionTime, List<String> configuredWords) Creates an instance of aRequireCaptcharecord class.- Parameters:
captchaName- the value for thecaptchaNamerecord componentcode- the value for thecoderecord componentmaxCompletionTime- the value for themaxCompletionTimerecord componentconfiguredWords- the value for theconfiguredWordsrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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. -
captchaName
Returns the value of thecaptchaNamerecord component.- Returns:
- the value of the
captchaNamerecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
maxCompletionTime
public int maxCompletionTime()Returns the value of themaxCompletionTimerecord component.- Returns:
- the value of the
maxCompletionTimerecord component
-
configuredWords
-