Interface Faction.Zones

All Known Implementing Classes:
MemoryFaction.Zones
Enclosing interface:
Faction

public static interface Faction.Zones
Controller for the faction's zones.
  • Method Details

    • create

      Faction.Zone create(String name)
      Creates a zone.
      Parameters:
      name - zone name
      Returns:
      new zone
      Throws:
      IllegalArgumentException - if the name is already in use
    • delete

      void delete(String name)
      Deletes a zone.
      Parameters:
      name - named zone
    • get

      Faction.Zone get(FLocation fLocation)
      Gets the zone at a given location.
      Parameters:
      fLocation - location
      Returns:
      zone or default zone if not this faction's territory
    • get

      @Nullable Faction.Zone get(String name)
      Gets a zone by name.
      Parameters:
      name - zone name
      Returns:
      matching zone or null for no match
    • get

      Gets an immutable list of all zones.
      Returns:
      zones
    • main

      Faction.Zone main()
      Gets the main, default zone.
      Returns:
      main zone
    • set

      void set(Faction.Zone zone, FLocation fLocation)
      Sets the zone for a given location
      Parameters:
      zone - zone
      fLocation - location
      Throws:
      IllegalArgumentException - if the zone is not an active zone for this faction or if the location is not owned by the faction