Files
src
build.gradle
settings.gradle
Code
13 645
src/main/java/com/kodari/perklives/PerkLivesPlugin.java
package com.kodari.perklives;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public class PerkLivesPlugin extends JavaPlugin {
private ProfileManager profiles;
private PerkManager perks;
private ItemFactory items;
@Override
public void onEnable() {
saveDefaultConfig();
items = new ItemFactory(this);
profiles = new ProfileManager(this);
perks = new PerkManager(this, profiles, items);
new RecipeManager(this, items).register();
getServer().getPluginManager().registerEvents(new GameListener(this, profiles, perks, items), this);
PluginCommand command = getCommand("perklives");
if (command != null) {
PerkCommand perkCommand = new PerkCommand(profiles);
command.setExecutor(perkCommand);
command.setTabCompleter(perkCommand);
}
}
@Override
public void onDisable() {
if (profiles != null) {
profiles.save();
}
}
}