Class NetherNetAddress
java.lang.Object
java.net.SocketAddress
org.cloudburstmc.netty.channel.nethernet.config.NetherNetAddress
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNetherNetAddress(long networkId) Creates a NetherNetAddress from a numeric Network ID.NetherNetAddress(String networkId) Creates a NetherNetAddress from a string Network ID. -
Method Summary
Modifier and TypeMethodDescriptionGets the Network ID as a String.longTries to parse the Network ID as a long.toString()Returns the string representation of the Network ID.
-
Constructor Details
-
NetherNetAddress
public NetherNetAddress(long networkId) Creates a NetherNetAddress from a numeric Network ID.- Parameters:
networkId- The numeric Network ID.
-
NetherNetAddress
Creates a NetherNetAddress from a string Network ID.- Parameters:
networkId- The string Network ID.
-
-
Method Details
-
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
Returns the string representation of the Network ID.
-