Package net.pinger.disguise
Class DisguiseAPI
java.lang.Object
net.pinger.disguise.DisguiseAPI
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PacketProviderThis method is used to assign a value to thePacketProviderfield which manages sent packets for disguisedstatic org.slf4j.LoggerThis method returns the standard logger of the api.static PacketProviderThis method returns the current provider.static SkinManagerThis method returns the skin manager responsible for fetching skins.static voidregisterProvider(Class<? extends PacketProvider> providerClass)This method registers the given provider.static voidregisterProvider(Class<? extends PacketProvider> providerClass, boolean replace)This method registers the given provider, which will be instantiated once theapplyProvider()is called if the versions match.static voidsetDisguise(Disguise disguise)This method sets the instance of the disguise field.
-
Field Details
-
GSON
public static final com.google.gson.Gson GSON
-
-
Method Details
-
setDisguise
This method sets the instance of the disguise field.- Parameters:
disguise- the disguise instance
-
applyProvider
This method is used to assign a value to thePacketProviderfield which manages sent packets for disguised -
getSkinManager
This method returns the skin manager responsible for fetching skins.- Returns:
- the skin manager
-
registerProvider
public static void registerProvider(Class<? extends PacketProvider> providerClass, boolean replace)This method registers the given provider, which will be instantiated once theapplyProvider()is called if the versions match.If the replace boolean is true, this version will replace any other class that matches the provided version of this one. By default, the value is true.
- Parameters:
providerClass- the class of the providerreplace- whether we should replace any other classes with this noe
-
registerProvider
This method registers the given provider.- Parameters:
providerClass- the given provider
-
getProvider
This method returns the current provider.- Returns:
- the provider
-
getLogger
public static org.slf4j.Logger getLogger()This method returns the standard logger of the api.- Returns:
- the logger
-