Record Class BedrockLanWorld
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.lan.BedrockLanWorld
public record BedrockLanWorld(BedrockLanWorld.Transport transport, InetSocketAddress responder, long networkId, String name, String version, int protocol, int players, int maxPlayers, boolean acceptsOnlineAuth, boolean acceptsSelfSignedAuth, @Nullable String nonce)
extends Record
A verified LAN reply and the connection details supplied by that reply.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionBedrockLanWorld(BedrockLanWorld.Transport transport, InetSocketAddress responder, long networkId, String name, String version, int protocol, int players, int maxPlayers, boolean acceptsOnlineAuth, boolean acceptsSelfSignedAuth, @Nullable String nonce) Creates an instance of aBedrockLanWorldrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theacceptsOnlineAuthrecord component.booleanReturns the value of theacceptsSelfSignedAuthrecord component.booleancompatible(int supportedProtocol) final booleanIndicates whether some other object is "equal to" this one.booleanfull()final inthashCode()Returns a hash code value for this object.intReturns the value of themaxPlayersrecord component.name()Returns the value of thenamerecord component.longReturns the value of thenetworkIdrecord component.@Nullable Stringnonce()Returns the value of thenoncerecord component.intplayers()Returns the value of theplayersrecord component.intprotocol()Returns the value of theprotocolrecord component.Returns the value of theresponderrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
BedrockLanWorld
public BedrockLanWorld(BedrockLanWorld.Transport transport, InetSocketAddress responder, long networkId, String name, String version, int protocol, int players, int maxPlayers, boolean acceptsOnlineAuth, boolean acceptsSelfSignedAuth, @Nullable @Nullable String nonce) Creates an instance of aBedrockLanWorldrecord class.- Parameters:
transport- the value for thetransportrecord componentresponder- the value for theresponderrecord componentnetworkId- the value for thenetworkIdrecord componentname- the value for thenamerecord componentversion- the value for theversionrecord componentprotocol- the value for theprotocolrecord componentplayers- the value for theplayersrecord componentmaxPlayers- the value for themaxPlayersrecord componentacceptsOnlineAuth- the value for theacceptsOnlineAuthrecord componentacceptsSelfSignedAuth- the value for theacceptsSelfSignedAuthrecord componentnonce- the value for thenoncerecord component
-
-
Method Details
-
compatible
public boolean compatible(int supportedProtocol) -
full
public boolean full() -
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. -
transport
Returns the value of thetransportrecord component.- Returns:
- the value of the
transportrecord component
-
responder
Returns the value of theresponderrecord component.- Returns:
- the value of the
responderrecord component
-
networkId
public long networkId()Returns the value of thenetworkIdrecord component.- Returns:
- the value of the
networkIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
protocol
public int protocol()Returns the value of theprotocolrecord component.- Returns:
- the value of the
protocolrecord component
-
players
public int players()Returns the value of theplayersrecord component.- Returns:
- the value of the
playersrecord component
-
maxPlayers
public int maxPlayers()Returns the value of themaxPlayersrecord component.- Returns:
- the value of the
maxPlayersrecord component
-
acceptsOnlineAuth
public boolean acceptsOnlineAuth()Returns the value of theacceptsOnlineAuthrecord component.- Returns:
- the value of the
acceptsOnlineAuthrecord component
-
acceptsSelfSignedAuth
public boolean acceptsSelfSignedAuth()Returns the value of theacceptsSelfSignedAuthrecord component.- Returns:
- the value of the
acceptsSelfSignedAuthrecord component
-
nonce
Returns the value of thenoncerecord component.- Returns:
- the value of the
noncerecord component
-