示例#1
0
 @Override
 public void run() {
   if (this.plugin.getBrManager().getGameStatus().equals(BRGameStatus.END)) {
     Bukkit.shutdown();
     return;
   }
   this.plugin.getBrManager().setGameStatus(BRGameStatus.END);
   BRUtils.announce(plugin, "¥µ©`¥Ð¤ò10Ãëáá¤ËÔÙÆð„Ó¤·¤Þ¤¹¡£");
   Player[] players = CommonUtil.getOnlinePlayers();
   for (int i = 0; i < players.length; i++) {
     for (int j = 0; j < players.length; j++) {
       players[i].showPlayer(players[j]);
     }
   }
   for (int i = 10; i > 0; i--) {
     try {
       if (i <= 5 || i == 10) BRUtils.announce(plugin, String.format("ÔÙÆð„Ó¤Þ¤Ç%dÃë", i));
       Thread.sleep(1000);
     } catch (InterruptedException e) {
       System.out.println(e);
     }
   }
   // Bukkit.shutdown();
   stopServer();
 }
示例#2
0
 /** kickAllPlayer */
 void clearServer() {
   Player[] players = CommonUtil.getOnlinePlayers();
   for (Player player : players) {
     player.kickPlayer("Good Bye!!!");
   }
 }