Class NetherNetAddress

java.lang.Object
java.net.SocketAddress
org.cloudburstmc.netty.channel.nethernet.config.NetherNetAddress
All Implemented Interfaces:
Serializable

public class NetherNetAddress extends SocketAddress
See Also:
  • Constructor Details

    • NetherNetAddress

      public NetherNetAddress(long networkId)
      Creates a NetherNetAddress from a numeric Network ID.
      Parameters:
      networkId - The numeric Network ID.
    • NetherNetAddress

      public NetherNetAddress(String networkId)
      Creates a NetherNetAddress from a string Network ID.
      Parameters:
      networkId - The string Network ID.
  • Method Details

    • getNetworkId

      public String getNetworkId()
      Gets the Network ID as a String.
      Returns:
      the Network ID
    • getNetworkIdAsLong

      public long getNetworkIdAsLong()
      Tries to parse the Network ID as a long.
      Returns:
      the long value
      Throws:
      NumberFormatException - if the ID is not a valid unsigned long string (e.g. Realms ID).
    • toString

      public String toString()
      Returns the string representation of the Network ID.
      Overrides:
      toString in class Object
      Returns:
      the Network ID as a string