PluginHotSwapRoutine

public final class PluginHotSwapRoutine implements Runnable

Replaces a running plugin with the jar staged in Bukkit's update folder, cycling the plugins that depend on it.

NightbreakPluginHotSwap loads this class from a copy of its bytecode through a separate class loader whose parent is the server's, because disabling the target closes the class loader of the plugin that scheduled the swap. Once that happens, the old plugin can no longer load classes from its jar. This class therefore may only reference JDK and Bukkit types: no lambdas, nested classes, enums, or other MagmaCore classes.

Constructors

Link copied to clipboard
public void PluginHotSwapRoutine(String targetName, Array<String> unloadOrder, Array<String> loadOrder, Array<File> loadFiles, File stagedJar, Array<File> heldBack, File workDirectory, File routineDirectory, CommandSender sender)

Functions

Link copied to clipboard
public void run()