Package dev.kitteh.factions
Interface Faction.Zones
- All Known Implementing Classes:
MemoryFaction.Zones
- Enclosing interface:
Faction
public static interface Faction.Zones
Controller for the faction's zones.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a zone.voidDeletes a zone.get()Gets an immutable list of all zones.Gets the zone at a given location.@Nullable Faction.ZoneGets a zone by name.main()Gets the main, default zone.voidset(Faction.Zone zone, FLocation fLocation) Sets the zone for a given location
-
Method Details
-
create
Creates a zone.- Parameters:
name- zone name- Returns:
- new zone
- Throws:
IllegalArgumentException- if the name is already in use
-
delete
Deletes a zone.- Parameters:
name- named zone
-
get
Gets the zone at a given location.- Parameters:
fLocation- location- Returns:
- zone or default zone if not this faction's territory
-
get
Gets a zone by name.- Parameters:
name- zone name- Returns:
- matching zone or null for no match
-
get
List<Faction.Zone> get()Gets an immutable list of all zones.- Returns:
- zones
-
main
Faction.Zone main()Gets the main, default zone.- Returns:
- main zone
-
set
Sets the zone for a given location- Parameters:
zone- zonefLocation- location- Throws:
IllegalArgumentException- if the zone is not an active zone for this faction or if the location is not owned by the faction
-