Files
src
build.gradle
settings.gradle
Code
11 651
src/main/java/com/kodari/gloxyitems/GloxyCustomItems.java
package com.kodari.gloxyitems;
import com.kodari.gloxyitems.command.CustomItemsCommand;
import com.kodari.gloxyitems.item.CustomItemManager;
import com.kodari.gloxyitems.listener.ResourcePackListener;
import com.kodari.gloxyitems.pack.ResourcePackManager;
import com.kodari.gloxyitems.recipe.RecipeManager;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public class GloxyCustomItems extends JavaPlugin {
private CustomItemManager customItemManager;
private ResourcePackManager resourcePackManager;
private RecipeManager recipeManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.customItemManager = new CustomItemManager(this);
this.recipeManager = new RecipeManager(this, customItemManager);
this.recipeManager.registerRecipes();
this.resourcePackManager = new ResourcePackManager(this);
Bukkit.getPluginManager().registerEvents(new ResourcePackListener(resourcePackManager), this);
CustomItemsCommand commandHandler = new CustomItemsCommand(this, customItemManager, resourcePackManager);
PluginCommand command = getCommand("blazeitems");
if (command == null) {
throw new IllegalStateException("The blazeitems command is missing from plugin.yml.");
}
command.setExecutor(commandHandler);
command.setTabCompleter(commandHandler);
}
public CustomItemManager getCustomItemManager() {
return customItemManager;
}
public ResourcePackManager getResourcePackManager() {
return resourcePackManager;
}
}