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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
Constructs a pretty one line version of aThrowable
.static String
Constructs a pretty one line version of aThrowable
.static String
Deprecated.static SocketAddress
Method to transform human readable addresses into usable address objects.static UUID
Converts a String to a UUIDstatic String
hex
(int i) Formats an integer as a hex value.static String
unicode
(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.useString
join 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
-
String
join methods