Files
src
pom.xml
README.md
Code
14 862
src/main/java/com/kodari/customweapons/CustomWeaponsPlugin.java
package com.kodari.customweapons;
import com.kodari.customweapons.ability.AbilityManager;
import com.kodari.customweapons.command.CustomWeaponsCommand;
import com.kodari.customweapons.command.CustomWeaponsTabCompleter;
import com.kodari.customweapons.listener.CombatListener;
import com.kodari.customweapons.recipe.RecipeManager;
import com.kodari.customweapons.util.CooldownManager;
import com.kodari.customweapons.weapon.WeaponManager;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public final class CustomWeaponsPlugin extends JavaPlugin {
private WeaponManager weaponManager;
private CooldownManager cooldownManager;
private AbilityManager abilityManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.weaponManager = new WeaponManager(this);
this.cooldownManager = new CooldownManager();
this.abilityManager = new AbilityManager(this, cooldownManager);
Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
new RecipeManager(this, weaponManager).registerRecipes();
PluginCommand command = getCommand("customweapons");
if (command == null) {
getLogger().severe("The customweapons command is missing from plugin.yml.");
return;
}
command.setExecutor(new CustomWeaponsCommand(this));
command.setTabCompleter(new CustomWeaponsTabCompleter(this));
}
public WeaponManager getWeaponManager() {
return weaponManager;
}
public CooldownManager getCooldownManager() {
return cooldownManager;
}
public AbilityManager getAbilityManager() {
return abilityManager;
}
}