public void econLandRewardRoutine() {
    if (!Econ.isEnabled()) return;

    double econLandReward = MConf.get().econLandReward;
    if (econLandReward == 0.0) return;

    Factions.get().log("Running econLandRewardRoutine...");
    for (Faction faction : this.getAll()) {
      int landCount = faction.getLandCount();
      if (!faction.getFlag(MFlag.getFlagPeaceful()) && landCount > 0) {
        List<MPlayer> players = faction.getMPlayers();
        int playerCount = players.size();
        double reward = econLandReward * landCount / playerCount;
        for (MPlayer player : players) {
          Econ.modifyMoney(
              player,
              reward,
              "own " + landCount + " faction land divided among " + playerCount + " members");
        }
      }
    }
  }
  public Faction getNone() {
    String id = Factions.ID_NONE;
    Faction faction = this.get(id);
    if (faction != null) return faction;

    faction = this.create(id);

    faction.setName(Factions.NAME_NONE_DEFAULT);
    faction.setDescription(null);

    faction.setFlag(MFlag.getFlagOpen(), false);
    faction.setFlag(MFlag.getFlagPermanent(), true);
    faction.setFlag(MFlag.getFlagPeaceful(), false);
    faction.setFlag(MFlag.getFlagInfpower(), true);
    faction.setFlag(MFlag.getFlagPowerloss(), true);
    faction.setFlag(MFlag.getFlagPvp(), true);
    faction.setFlag(MFlag.getFlagFriendlyire(), false);
    faction.setFlag(MFlag.getFlagMonsters(), true);
    faction.setFlag(MFlag.getFlagExplosions(), true);
    faction.setFlag(MFlag.getFlagOfflineexplosions(), true);
    faction.setFlag(MFlag.getFlagFirespread(), true);
    faction.setFlag(MFlag.getFlagEndergrief(), true);

    faction.setPermittedRelations(
        MPerm.getPermBuild(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermDoor(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermContainer(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermButton(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermLever(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermDeposit(),
        Rel.LEADER,
        Rel.OFFICER); // Wilderness deposit should be limited as an anti spam meassure.

    return faction;
  }
  public Faction getWarzone() {
    String id = Factions.ID_WARZONE;
    Faction faction = this.get(id);
    if (faction != null) return faction;

    faction = this.create(id);

    faction.setName(Factions.NAME_WARZONE_DEFAULT);
    faction.setDescription("Not the safest place to be");

    faction.setFlag(MFlag.getFlagOpen(), false);
    faction.setFlag(MFlag.getFlagPermanent(), true);
    faction.setFlag(MFlag.getFlagPeaceful(), true);
    faction.setFlag(MFlag.getFlagInfpower(), true);
    faction.setFlag(MFlag.getFlagPowerloss(), true);
    faction.setFlag(MFlag.getFlagPvp(), true);
    faction.setFlag(MFlag.getFlagFriendlyire(), true);
    faction.setFlag(MFlag.getFlagMonsters(), true);
    faction.setFlag(MFlag.getFlagExplosions(), true);
    faction.setFlag(MFlag.getFlagOfflineexplosions(), true);
    faction.setFlag(MFlag.getFlagFirespread(), true);
    faction.setFlag(MFlag.getFlagEndergrief(), true);

    faction.setPermittedRelations(
        MPerm.getPermDoor(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermContainer(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermButton(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(
        MPerm.getPermLever(),
        Rel.LEADER,
        Rel.OFFICER,
        Rel.MEMBER,
        Rel.RECRUIT,
        Rel.ALLY,
        Rel.TRUCE,
        Rel.NEUTRAL,
        Rel.ENEMY);
    faction.setPermittedRelations(MPerm.getPermTerritory(), Rel.LEADER, Rel.OFFICER, Rel.MEMBER);

    return faction;
  }