Package org.geysermc.floodgate.core.util
Class Utils
java.lang.Object
org.geysermc.floodgate.core.util.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UUIDfromShortUniqueId(String uuid) static StringgenerateCode(int length) static charstatic UUIDgetJavaUuid(long xuid) static UUIDgetJavaUuid(String xuid) static Stringstatic StringgetStackTrace(Throwable throwable) static booleanisUniquePrefix(String prefix) static PropertiesreadProperties(String resourceFile) Reads a properties resource filestatic intreadVarInt(io.netty.buffer.ByteBuf buffer) static voidremoveHandler(io.netty.channel.ChannelPipeline pipeline, String handler) This method is used in Addons.
Most addons can be removed once the player associated to the channel has been logged in, but they should also be removed once the inject is removed.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
removeHandler
This method is used in Addons.
Most addons can be removed once the player associated to the channel has been logged in, but they should also be removed once the inject is removed. Because of how Netty works it will throw an exception and we don't want that. This method removes those handlers safely.- Parameters:
pipeline- the pipelinehandler- the name of the handler to remove
-
readProperties
Reads a properties resource file- Parameters:
resourceFile- the resource file to read- Returns:
- the properties file if the resource exists, otherwise null
- Throws:
AssertionError- if something went wrong while readin the resource file
-
getLocale
-
getJavaUuid
-
getJavaUuid
-
fromShortUniqueId
-
isUniquePrefix
-
generateCode
-
generateCodeChar
public static char generateCodeChar() -
readVarInt
public static int readVarInt(io.netty.buffer.ByteBuf buffer) -
getStackTrace
-