@Override public int[] getPluginVersion() { PluginContainer plugin = game.getPluginManager().getPlugin("PlotSquared").get(); String version = plugin.getVersion(); log("Checking plugin version: PlotSquared: "); String[] split = version.split("\\."); return new int[] { Integer.parseInt(split[0]), Integer.parseInt(split[1]), (split.length == 3) ? Integer.parseInt(split[2]) : 0 }; }
@Override public Logger getLogger(PluginContainer plugin) { return LoggerFactory.getLogger("Plugin:" + plugin.getInstance().getClass().getName()); }
private void registerPlugin(PluginContainer plugin) { this.plugins.put(plugin.getId(), plugin); plugin.getInstance().ifPresent(instance -> this.pluginInstances.put(instance, plugin)); }
@Override public Logger getLogger(PluginContainer plugin) { return plugin.getLogger(); }