use of mc.dragons.tools.content.command.CommunityObjectiveCommands in project DragonsOnline by UniverseCraft.
the class DragonsContentTools method onEnable.
public void onEnable() {
enableDebugLogging();
saveDefaultConfig();
PUSH_FOLDER = getConfig().getString("push-folder", "C:\\DragonsPush\\");
Dragons dragons = getDragonsInstance();
COLoader coLoader = new COLoader(dragons);
dragons.getLightweightLoaderRegistry().register(new AuditLogLoader(dragons.getMongoConfig()));
dragons.getLightweightLoaderRegistry().register(new HologramLoader(dragons.getMongoConfig()));
dragons.getLightweightLoaderRegistry().register(coLoader);
dragons.getUserHookRegistry().registerHook(new ContentUserHook(coLoader));
getCommand("region").setExecutor(new RegionCommand());
getCommand("npc").setExecutor(new NPCCommand());
getCommand("item").setExecutor(new ItemCommand());
getCommand("floor").setExecutor(new FloorCommand());
getCommand("clear").setExecutor(new ClearInventoryCommand());
getCommand("testquest").setExecutor(new TestQuestCommand());
getCommand("quest").setExecutor(new QuestCommand());
getCommand("rename").setExecutor(new RenameCommand());
getCommand("relore").setExecutor(new ReloreCommand());
getCommand("restat").setExecutor(new RestatCommand());
getCommand("resetprofile").setExecutor(new ResetProfileCommand());
getCommand("placeholder").setExecutor(new PlaceholderCommand());
getCommand("fixed").setExecutor(new FixedCommand());
getCommand("objmeta").setExecutor(new ObjectMetadataCommand());
getCommand("deletenpc").setExecutor(new DeleteNPCCommand());
getCommand("hologram").setExecutor(new HologramCommand(this));
getCommand("sign").setExecutor(new SignCommand());
CommandExecutor gamemodeCommandExecutor = new GamemodeCommand();
getCommand("gamemode").setExecutor(gamemodeCommandExecutor);
getCommand("gma").setExecutor(gamemodeCommandExecutor);
getCommand("gmc").setExecutor(gamemodeCommandExecutor);
getCommand("gms").setExecutor(gamemodeCommandExecutor);
getCommand("gotofloor").setExecutor(new GoToFloorCommand());
getCommand("updatestats").setExecutor(new UpdateStatsCommand());
CommandExecutor speedCommand = new SpeedCommand();
getCommand("speed").setExecutor(speedCommand);
getCommand("flyspeed").setExecutor(speedCommand);
getCommand("walkspeed").setExecutor(speedCommand);
CommandExecutor warpCommandsExecutor = new WarpCommands();
getCommand("delwarp").setExecutor(warpCommandsExecutor);
getCommand("setwarp").setExecutor(warpCommandsExecutor);
getCommand("warp").setExecutor(warpCommandsExecutor);
getCommand("warps").setExecutor(warpCommandsExecutor);
CommandExecutor coCommandsExecutor = new CommunityObjectiveCommands(coLoader);
getCommand("createobjective").setExecutor(coCommandsExecutor);
getCommand("listobjectives").setExecutor(coCommandsExecutor);
getCommand("unlockobjective").setExecutor(coCommandsExecutor);
getCommand("lockobjective").setExecutor(coCommandsExecutor);
getCommand("completeobjective").setExecutor(coCommandsExecutor);
getCommand("failobjective").setExecutor(coCommandsExecutor);
getCommand("deleteobjective").setExecutor(coCommandsExecutor);
getCommand("reloadobjectives").setExecutor(coCommandsExecutor);
Addon npcIdentifierAddon = new NPCIdentifierAddon();
dragons.getAddonRegistry().register(npcIdentifierAddon);
npcIdentifierAddon.apply();
Bukkit.getPluginManager().registerEvents(new ContentToolsListeners(), this);
}
Aggregations