Package ac.boar.geyser.model
Record Class GeyserNetworkSession
java.lang.Object
java.lang.Record
ac.boar.geyser.model.GeyserNetworkSession
- All Implemented Interfaces:
ac.boar.api.anticheat.model.Identifiable,ac.boar.api.anticheat.model.MessageRecipient,ac.boar.api.anticheat.model.NetworkSession,ac.boar.api.anticheat.model.Permissible
public record GeyserNetworkSession(org.geysermc.geyser.session.GeyserSession session)
extends Record
implements ac.boar.api.anticheat.model.NetworkSession
-
Constructor Summary
ConstructorsConstructorDescriptionGeyserNetworkSession(org.geysermc.geyser.session.GeyserSession session) Creates an instance of aGeyserNetworkSessionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisconnect(String reason) booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanhasPermission(String permission) booleanisClosed()name()intbooleanvoidsendMessage(String message) org.geysermc.geyser.session.GeyserSessionsession()Returns the value of thesessionrecord component.final StringtoString()Returns a string representation of this record class.uuid()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ac.boar.api.anticheat.model.NetworkSession
disconnectFromServer
-
Constructor Details
-
GeyserNetworkSession
public GeyserNetworkSession(org.geysermc.geyser.session.GeyserSession session) Creates an instance of aGeyserNetworkSessionrecord class.- Parameters:
session- the value for thesessionrecord component
-
-
Method Details
-
name
- Specified by:
namein interfaceac.boar.api.anticheat.model.Identifiable
-
uuid
- Specified by:
uuidin interfaceac.boar.api.anticheat.model.Identifiable
-
sendMessage
- Specified by:
sendMessagein interfaceac.boar.api.anticheat.model.MessageRecipient
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceac.boar.api.anticheat.model.NetworkSession
-
disconnect
- Specified by:
disconnectin interfaceac.boar.api.anticheat.model.NetworkSession
-
requiresPingMagnitude
public boolean requiresPingMagnitude()- Specified by:
requiresPingMagnitudein interfaceac.boar.api.anticheat.model.NetworkSession
-
protocolVersion
public int protocolVersion()- Specified by:
protocolVersionin interfaceac.boar.api.anticheat.model.NetworkSession
-
hasPermission
- Specified by:
hasPermissionin interfaceac.boar.api.anticheat.model.Permissible
-
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. -
session
public org.geysermc.geyser.session.GeyserSession session()Returns the value of thesessionrecord component.- Returns:
- the value of the
sessionrecord component
-