Exemplo n.º 1
0
 public void onEnable() {
   final Plugin apiplugin = this.getServer().getPluginManager().getPlugin("CodCraftAPI");
   if (apiplugin != null) {
     api = (CCAPI) apiplugin;
   } else {
     System.out.println("Did Not Get Plugin");
   }
   getCommand("CaC").setExecutor(new CacComamnd(this));
   getCommand("EndRound").setExecutor(new EndRoundCommand(this));
   getCommand("Spec").setExecutor(new SpecCommand(this));
   getCommand("vote").setExecutor(new VoteCommand(this));
   getCommand("a").setExecutor(new AdminCommands(this));
   getCommand("team").setExecutor(new TeamsCommand(this));
   getCommand("Gui").setExecutor(new GuiCommand(this));
   getCommand("buddy").setExecutor(new BuddyCommand(this));
   getCommand("switch").setExecutor(new SwitchCommand(this));
   new MapLoader();
   api.getModuleForClass(GameManager.class).SetCurrentWorld("Nuketown");
   PluginManager pm = this.getServer().getPluginManager();
   pm.registerEvents(new PlayerListener(this), this);
   pm.registerEvents(new BlockListener(this), this);
   game = new Game(this);
   game.Lobby();
   game.MainTimer();
   spawnLoad();
   api.getModuleForClass(Teleport.class).setLocations1(Teamone);
   api.getModuleForClass(Teleport.class).setLocations2(Teamtwo);
   api.getModuleForClass(Cac.class).usedefaultspawns();
   api.getModuleForClass(Weapons.class).LoadGuns();
   api.getModuleForClass(GameManager.class).setAmmontofTeams(2);
 }
Exemplo n.º 2
0
 @Override
 public void makeGame(String[] name) {
   DRGame game = new DRGame(this);
   game.setName(name[0]);
   api.getModuleForClass(GameManager.class).registerGame(game);
 }
Exemplo n.º 3
0
 @Override
 public void makegame(String name) {
   GameModel game = new GameModel(this);
   game.setName(name);
   api.getModuleForClass(GameManager.class).registerGame(game);
 }