PandaLib/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/PandaLibBungee.java

50 lines
1.1 KiB
Java
Raw Normal View History

package fr.pandacube.lib.bungee;
import fr.pandacube.lib.bungee.util.BungeeDailyLogRotateFileHandler;
import fr.pandacube.lib.bungee.util.PluginMessagePassthrough;
import net.md_5.bungee.api.plugin.Plugin;
2023-08-27 17:28:12 +02:00
/**
* General class used to initialize some tools of pandalib-bungee, following the bungee plugin's lifecycle.
*/
public class PandaLibBungee {
private static Plugin plugin;
2023-08-27 17:28:12 +02:00
/**
* Method to be called in {@link Plugin#onLoad()} method.
* @param plugin the plugin instance.
*/
public static void onLoad(Plugin plugin) {
PandaLibBungee.plugin = plugin;
}
2023-08-27 17:28:12 +02:00
/**
* Method to be called in {@link Plugin#onEnable()} method.
*/
public static void onEnable() {
PluginMessagePassthrough.init(plugin);
BungeeDailyLogRotateFileHandler.init(true);
}
2023-08-27 17:28:12 +02:00
/**
* Method to be called in {@link Plugin#onDisable()} method.
*/
public static void disable() {
}
2023-08-27 17:28:12 +02:00
/**
* Returns the plugin instance.
* @return the plugin instance.
*/
public static Plugin getPlugin() {
return plugin;
}
private PandaLibBungee() {}
}