PandaLib/pandalib-paper/src/main/java/fr/pandacube/lib/paper/PandaLibPaper.java
Marc Baloup b2f5770461 Improved Json record support (Gson 2.10 natively supports it) + Added ItemStack Json support
- Extract RecordTypeAdapter to its own file + only use it if Gson library does not support it (it does since 2.10, but we are unsure of which version is actually used in paper/bungee/other)
- new ItemStackAdapter to support Json (de)serializing of Bukkit ItemStack.
2023-03-12 14:14:17 +01:00

30 lines
604 B
Java

package fr.pandacube.lib.paper;
import fr.pandacube.lib.paper.json.PaperJson;
import fr.pandacube.lib.paper.modules.PerformanceAnalysisManager;
import org.bukkit.plugin.Plugin;
public class PandaLibPaper {
private static Plugin plugin;
public static void onLoad(Plugin plugin) {
PandaLibPaper.plugin = plugin;
PaperJson.init();
}
public static void onEnable() {
PerformanceAnalysisManager.getInstance(); // initialize
}
public static void disable() {
PerformanceAnalysisManager.getInstance().cancelInternalBossBar();
}
public static Plugin getPlugin() {
return plugin;
}
}