- 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.
		
			
				
	
	
		
			30 lines
		
	
	
		
			604 B
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			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;
 | |
| 	}
 | |
| 
 | |
| }
 |