Improves code structure, and performs some necessary work for commands
This commit is contained in:
@ -2,8 +2,14 @@ package net.knarcraft.blacksmith;
|
||||
|
||||
import net.citizensnpcs.api.CitizensAPI;
|
||||
import net.knarcraft.blacksmith.command.BlackSmithCommand;
|
||||
import net.knarcraft.blacksmith.command.BlackSmithTabCompleter;
|
||||
import net.knarcraft.blacksmith.config.GlobalSettings;
|
||||
import net.knarcraft.blacksmith.listener.NPCClickListener;
|
||||
import net.knarcraft.blacksmith.listener.PlayerListener;
|
||||
import net.knarcraft.blacksmith.manager.EconomyManager;
|
||||
import net.knarcraft.blacksmith.trait.BlacksmithTrait;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.logging.Level;
|
||||
@ -69,8 +75,13 @@ public class BlacksmithPlugin extends JavaPlugin {
|
||||
PluginCommand blacksmithCommand = this.getCommand("blacksmith");
|
||||
if (blacksmithCommand != null) {
|
||||
blacksmithCommand.setExecutor(new BlackSmithCommand());
|
||||
blacksmithCommand.setTabCompleter(new BlackSmithTabCompleter());
|
||||
}
|
||||
|
||||
PluginManager pluginManager = getServer().getPluginManager();
|
||||
pluginManager.registerEvents(new PlayerListener(), this);
|
||||
pluginManager.registerEvents(new NPCClickListener(), this);
|
||||
|
||||
getLogger().log(Level.INFO, " v" + getDescription().getVersion() + " enabled.");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user