Factions/src/com/massivecraft/factions/entity/BoardInterface.java

51 lines
1.3 KiB
Java
Raw Normal View History

2013-04-22 09:37:53 +02:00
package com.massivecraft.factions.entity;
2013-04-22 09:37:53 +02:00
import com.massivecraft.factions.RelationParticipator;
import com.massivecraft.factions.TerritoryAccess;
2014-06-04 14:02:23 +02:00
import com.massivecraft.massivecore.ps.PS;
2017-03-24 13:05:58 +01:00
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface BoardInterface
{
// GET
2017-03-24 14:03:29 +01:00
TerritoryAccess getTerritoryAccessAt(PS ps);
Faction getFactionAt(PS ps);
// SET
2017-03-24 14:03:29 +01:00
void setTerritoryAccessAt(PS ps, TerritoryAccess territoryAccess);
void setFactionAt(PS ps, Faction faction);
// REMOVE
2017-03-24 14:03:29 +01:00
void removeAt(PS ps);
void removeAll(Faction faction);
2017-03-24 20:19:04 +01:00
int clean();
// CHUNKS
2017-03-24 14:03:29 +01:00
Set<PS> getChunks(Faction faction);
Set<PS> getChunks(String factionId);
Map<Faction, Set<PS>> getFactionToChunks();
// COUNT
2017-03-24 14:03:29 +01:00
int getCount(Faction faction);
int getCount(String factionId);
Map<Faction, Integer> getFactionToCount();
2016-04-19 17:57:28 +02:00
// CLAIMED
2017-03-24 14:03:29 +01:00
boolean hasClaimed(Faction faction);
boolean hasClaimed(String factionId);
2016-04-19 17:57:28 +02:00
// NEARBY DETECTION
2017-03-24 14:03:29 +01:00
boolean isBorderPs(PS ps);
boolean isAnyBorderPs(Set<PS> pss);
boolean isConnectedPs(PS ps, Faction faction);
boolean isAnyConnectedPs(Set<PS> pss, Faction faction);
// MAP
// TODO: Could the degrees be embedded in centerPs yaw instead?
2017-03-24 14:03:29 +01:00
List<Object> getMap(RelationParticipator observer, PS centerPs, double inDegrees, int width, int height);
}