Beatrice DellacĂ
a3b4b9ca98
All checks were successful
continuous-integration/drone/push Build is passing
41 lines
1.1 KiB
Java
41 lines
1.1 KiB
Java
package wtf.beatrice.nounspicker;
|
|
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.plugin.PluginManager;
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
import wtf.beatrice.nounspicker.objects.PAPIManager;
|
|
import wtf.beatrice.nounspicker.utils.ConsoleLogger;
|
|
|
|
public class NounsPicker extends JavaPlugin
|
|
{
|
|
private static NounsPicker instance;
|
|
private PluginManager pluginManager;
|
|
private final ConsoleLogger logger = new ConsoleLogger(getClass());
|
|
|
|
@Override
|
|
public void onEnable()
|
|
{
|
|
logger.log("Loading plugin!");
|
|
|
|
pluginManager = getServer().getPluginManager();
|
|
instance = this;
|
|
|
|
|
|
// register PlaceholderAPI
|
|
if(Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
|
new PAPIManager(this).register();
|
|
logger.log("PlaceholderAPI integration loaded!");
|
|
} else {
|
|
logger.err("Missing PlaceholderAPI! The plugin cannot continue.");
|
|
pluginManager.disablePlugin(this);
|
|
return;
|
|
}
|
|
|
|
logger.log("Plugin loaded!");
|
|
}
|
|
|
|
public static NounsPicker getInstance()
|
|
{
|
|
return instance;
|
|
}
|
|
} |