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.
  • 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 a BedrockLanWorld record class.
      Parameters:
      transport - the value for the transport record component
      responder - the value for the responder record component
      networkId - the value for the networkId record component
      name - the value for the name record component
      version - the value for the version record component
      protocol - the value for the protocol record component
      players - the value for the players record component
      maxPlayers - the value for the maxPlayers record component
      acceptsOnlineAuth - the value for the acceptsOnlineAuth record component
      acceptsSelfSignedAuth - the value for the acceptsSelfSignedAuth record component
      nonce - the value for the nonce record component
  • Method Details

    • compatible

      public boolean compatible(int supportedProtocol)
    • full

      public boolean full()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • transport

      public BedrockLanWorld.Transport transport()
      Returns the value of the transport record component.
      Returns:
      the value of the transport record component
    • responder

      public InetSocketAddress responder()
      Returns the value of the responder record component.
      Returns:
      the value of the responder record component
    • networkId

      public long networkId()
      Returns the value of the networkId record component.
      Returns:
      the value of the networkId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • protocol

      public int protocol()
      Returns the value of the protocol record component.
      Returns:
      the value of the protocol record component
    • players

      public int players()
      Returns the value of the players record component.
      Returns:
      the value of the players record component
    • maxPlayers

      public int maxPlayers()
      Returns the value of the maxPlayers record component.
      Returns:
      the value of the maxPlayers record component
    • acceptsOnlineAuth

      public boolean acceptsOnlineAuth()
      Returns the value of the acceptsOnlineAuth record component.
      Returns:
      the value of the acceptsOnlineAuth record component
    • acceptsSelfSignedAuth

      public boolean acceptsSelfSignedAuth()
      Returns the value of the acceptsSelfSignedAuth record component.
      Returns:
      the value of the acceptsSelfSignedAuth record component
    • nonce

      @Nullable public @Nullable String nonce()
      Returns the value of the nonce record component.
      Returns:
      the value of the nonce record component