Package net.md_5.bungee
Class Util
java.lang.Object
net.md_5.bungee.Util
Series of utility classes to perform various operations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringConstructs a pretty one line version of aThrowable.static StringConstructs a pretty one line version of aThrowable.static StringDeprecated.static SocketAddressMethod to transform human readable addresses into usable address objects.static UUIDConverts a String to a UUIDstatic Stringhex(int i) Formats an integer as a hex value.static Stringunicode(char c) Formats an char as a unicode value.
-
Field Details
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getAddr
Method to transform human readable addresses into usable address objects.- Parameters:
hostline- in the format of 'host:port'- Returns:
- the constructed hostname + port.
-
hex
Formats an integer as a hex value.- Parameters:
i- the integer to format- Returns:
- the hex representation of the integer
-
unicode
Formats an char as a unicode value.- Parameters:
c- the character to format- Returns:
- the unicode representation of the character
-
exception
Constructs a pretty one line version of aThrowable. Useful for debugging. -
exception
Constructs a pretty one line version of aThrowable. Useful for debugging. -
csv
-
format
Deprecated.useStringjoin methodsReturns a string of objects, each separated by a separator.- Parameters:
objects- the objects to joinseparators- the separator- Returns:
- joined string
- See Also:
-
getUUID
Converts a String to a UUID- Parameters:
uuid- The string to be converted- Returns:
- The result
-
Stringjoin methods