Files
src
Code
11 789
src/main/java/com/kodari/customgear/CustomGearPlugin.java
package com.kodari.customgear;
import com.kodari.customgear.command.CustomGearCommand;
import com.kodari.customgear.gui.CustomGearMenuListener;
import com.kodari.customgear.items.CustomGearItemFactory;
import com.kodari.customgear.listener.GearListener;
import com.kodari.customgear.manager.AbilityManager;
import com.kodari.customgear.manager.ArmorSetManager;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public final class CustomGearPlugin extends JavaPlugin {
private CustomGearItemFactory itemFactory;
private AbilityManager abilityManager;
@Override
public void onEnable() {
saveDefaultConfig();
itemFactory = new CustomGearItemFactory(this);
abilityManager = new AbilityManager(this, itemFactory);
getServer().getPluginManager().registerEvents(new GearListener(this, itemFactory, abilityManager), this);
getServer().getPluginManager().registerEvents(new CustomGearMenuListener(itemFactory), this);
new ArmorSetManager(this, itemFactory);
PluginCommand command = getCommand("customgear");
if (command != null) {
CustomGearCommand executor = new CustomGearCommand(itemFactory);
command.setExecutor(executor);
}
}
public CustomGearItemFactory getItemFactory() {
return itemFactory;
}
}