예제 #1
0
 public static void setupStandardFlags() {
   getFlagOpen();
   getFlagMonsters();
   getFlagPowerloss();
   getFlagPvp();
   getFlagFriendlyire();
   getFlagExplosions();
   getFlagOfflineexplosions();
   getFlagFirespread();
   getFlagEndergrief();
   getFlagPermanent();
   getFlagPeaceful();
   getFlagInfpower();
 }
  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;
  }