예제 #1
0
파일: teamUtil.java 프로젝트: MCME/MCMEPVP
 public static String getPlayerTeam(Player player) {
   String status = "spectator";
   if (MCMEPVP.PlayerStatus.containsKey(player.getName())) {
     status = MCMEPVP.PlayerStatus.get(player.getName());
   }
   return status;
 }
예제 #2
0
파일: teamUtil.java 프로젝트: MCME/MCMEPVP
 public static boolean isOnTeam(Player player) {
   boolean check = true;
   if (MCMEPVP.PlayerStatus.containsKey(player.getName())) {
     String status = teamUtil.getPlayerTeam(player);
     if (status.equals("spectator")) {
       check = false;
     }
     if (status.equals("participant")) {
       check = false;
     }
   } else {
     check = false;
   }
   return check;
 }
예제 #3
0
파일: teamUtil.java 프로젝트: MCME/MCMEPVP
 public static void setPlayerTeam(Player player, String status) {
   player.getInventory().clear();
   player.getInventory().setArmorContents(null);
   MCMEPVP.PlayerStatus.put(player.getName(), status);
   if (status.equals("spectator") || status.equals("participant")) {
     player.setMetadata("god", new FixedMetadataValue(MCMEPVP.inst(), true));
   }
   if (!(status.equals("spectator") || status.equals("participant"))) {
     player.setMetadata("god", new FixedMetadataValue(MCMEPVP.inst(), false));
   }
   if (status != "spectator") {
     spectatorUtil.setParticipant(player);
   }
   if (status == "spectator") {
     spectatorUtil.setSpectator(player);
   }
 }