Record Class PaperPacketBridge.Decision
java.lang.Object
java.lang.Record
dev.shamoo.runtime.platform.paper.packet.PaperPacketBridge.Decision
- Enclosing class:
PaperPacketBridge
public static record PaperPacketBridge.Decision(boolean cancelled, PacketHandle replacement, boolean allowCrossRegistration)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDecision(boolean cancelled, PacketHandle replacement) Decision(boolean cancelled, PacketHandle replacement, boolean allowCrossRegistration) Creates an instance of aDecisionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowCrossRegistrationrecord component.static PaperPacketBridge.Decisioncancel()booleanReturns the value of thecancelledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static PaperPacketBridge.Decisionpass()static PaperPacketBridge.DecisionreplaceAcrossRegistrations(PacketHandle replacement) Returns the value of thereplacementrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Decision
-
Decision
Creates an instance of aDecisionrecord class.- Parameters:
cancelled- the value for thecancelledrecord componentreplacement- the value for thereplacementrecord componentallowCrossRegistration- the value for theallowCrossRegistrationrecord component
-
-
Method Details
-
pass
-
cancel
-
replaceAcrossRegistrations
-
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 '=='. -
cancelled
public boolean cancelled()Returns the value of thecancelledrecord component.- Returns:
- the value of the
cancelledrecord component
-
replacement
Returns the value of thereplacementrecord component.- Returns:
- the value of the
replacementrecord component
-
allowCrossRegistration
public boolean allowCrossRegistration()Returns the value of theallowCrossRegistrationrecord component.- Returns:
- the value of the
allowCrossRegistrationrecord component
-