コード例 #1
0
ファイル: CodCraft.java プロジェクト: Joby890/CodCraftPlugins
 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);
 }
コード例 #2
0
 @Override
 public void makeGame(String[] name) {
   DRGame game = new DRGame(this);
   game.setName(name[0]);
   api.getModuleForClass(GameManager.class).registerGame(game);
 }
コード例 #3
0
ファイル: SAJGMP.java プロジェクト: Joby890/CodCraftPlugins
 @Override
 public void makegame(String name) {
   GameModel game = new GameModel(this);
   game.setName(name);
   api.getModuleForClass(GameManager.class).registerGame(game);
 }