Examples of FlagReturn


Examples of com.tommytony.war.config.FlagReturn

          return;
        }
      }
           
      LoadoutSelection loadoutSelectionState = playerWarzone.getLoadoutSelections().get(player.getName());
      FlagReturn flagReturn = playerTeam.getTeamConfig().resolveFlagReturn();
      if (!playerTeam.isSpawnLocation(playerLoc)) {
        if (!playerWarzone.isEnoughPlayers() && loadoutSelectionState != null && loadoutSelectionState.isStillInSpawn()) {
          // Be sure to keep only players that just respawned locked inside the spawn for minplayer/minteams restrictions - otherwise
          // this will conflict with the can't-renter-spawn bump just a few lines below 
          War.war.badMsg(player, "zone.spawn.minplayers", playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINPLAYERS),
              playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINTEAMS));
          event.setTo(playerTeam.getRandomSpawn());
          return;
        }
        if (playerWarzone.isRespawning(player)) {
          int rt = playerTeam.getTeamConfig().resolveInt(TeamConfig.RESPAWNTIMER);
          War.war.badMsg(player, "zone.spawn.timer", rt);
          event.setTo(playerTeam.getRandomSpawn());
          return;
        }
        if (playerWarzone.isReinitializing()) {
          // don't let players wander about outside spawns during reset
          // (they could mess up the blocks that have already been reset
          // before the start of the new battle)
          War.war.msg(player, "zone.battle.reset");
          event.setTo(playerTeam.getRandomSpawn());
          return;
        }
      } else if (loadoutSelectionState != null && !loadoutSelectionState.isStillInSpawn()
          && !playerWarzone.isCakeThief(player.getName())
          && (flagReturn.equals(FlagReturn.BOTH) || flagReturn.equals(FlagReturn.SPAWN))
          && !playerWarzone.isFlagThief(player.getName())) {
       
        // player is in spawn, but has left already: he should NOT be let back in - kick him out gently
        // if he sticks around too long.
        // (also, be sure you aren't preventing the flag or cake from being captured)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.