Contents
Class EarlyPluginLoader
java.lang.Object
com.hypixel.hytale.plugin.early.EarlyPluginLoader
Loads early plugins (class transformers) from the
earlyplugins/ directory
before HytaleServer is constructed.
Uses Java's standard ServiceLoader mechanism for discovery.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PathA path to the default early plugins directory. -
Method Summary
Modifier and TypeMethodDescriptionstatic URLClassLoaderstatic List<ClassTransformer> static booleanstatic voidloadEarlyPlugins(String[] args) Loads all class transformers from theearlyplugins/directory.
-
Field Details
-
EARLY_PLUGINS_PATH
A path to the default early plugins directory.
-
-
Method Details
-
loadEarlyPlugins
Loads all class transformers from theearlyplugins/directory. This should be called inMain.main()before HytaleServer is constructed.Manually parses args to avoid loading Options class before TransformingClassLoader.
- Parameters:
args- command line arguments (to check for --early-plugins, --singleplayer, --accept-early-plugins)
-
hasTransformers
public static boolean hasTransformers()- Returns:
trueif any transformers were loaded,falseotherwise.
-
getTransformers
- Returns:
- a list of loaded
ClassTransformerinstances, sorted by priority. (highest first)
-
getPluginClassLoader
- Returns:
- the classloader used to load early plugin JARs, or
nullif no plugins were found.
-