Saber-Factions/src/main/java/com/massivecraft/factions/Faction.java

268 lines
6.7 KiB
Java
Raw Normal View History

2011-07-18 22:06:02 +02:00
package com.massivecraft.factions;
2011-02-06 13:36:11 +01:00
2011-10-12 17:25:01 +02:00
import com.massivecraft.factions.iface.EconomyParticipator;
import com.massivecraft.factions.iface.RelationParticipator;
2011-07-18 22:06:02 +02:00
import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.LazyLocation;
import com.massivecraft.factions.zcore.fperms.Access;
import com.massivecraft.factions.zcore.fperms.Action;
2014-04-04 20:55:21 +02:00
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
2014-04-04 20:55:21 +02:00
public interface Faction extends EconomyParticipator {
public HashMap<String, List<String>> getAnnouncements();
2014-04-04 20:55:21 +02:00
public ConcurrentHashMap<String, LazyLocation> getWarps();
public LazyLocation getWarp(String name);
public void setWarp(String name, LazyLocation loc);
public boolean isWarp(String name);
2017-12-19 11:10:52 +01:00
public boolean hasWarpPassword(String warp);
public boolean isWarpPassword(String warp, String password);
public void setWarpPassword(String warp, String password);
public boolean removeWarp(String name);
public void clearWarps();
public int getMaxVaults();
public void setMaxVaults(int value);
public void addAnnouncement(FPlayer fPlayer, String msg);
public void sendUnreadAnnouncements(FPlayer fPlayer);
2014-04-04 20:55:21 +02:00
public void removeAnnouncements(FPlayer fPlayer);
2014-04-04 20:55:21 +02:00
public Set<String> getInvites();
2014-04-04 20:55:21 +02:00
public String getId();
public void invite(FPlayer fplayer);
public void deinvite(FPlayer fplayer);
public boolean isInvited(FPlayer fplayer);
2014-04-04 20:55:21 +02:00
public boolean getOpen();
2011-02-06 13:36:11 +01:00
public void setOpen(boolean isOpen);
2011-02-06 13:36:11 +01:00
public boolean isPeaceful();
2014-04-04 20:55:21 +02:00
public void setPeaceful(boolean isPeaceful);
2014-04-04 20:55:21 +02:00
public void setPeacefulExplosionsEnabled(boolean val);
2014-04-04 20:55:21 +02:00
public boolean getPeacefulExplosionsEnabled();
2014-04-04 20:55:21 +02:00
public boolean noExplosionsInTerritory();
2014-04-04 20:55:21 +02:00
public boolean isPermanent();
public void setPermanent(boolean isPermanent);
public String getTag();
public String getTag(String prefix);
public String getTag(Faction otherFaction);
public String getTag(FPlayer otherFplayer);
public void setTag(String str);
public String getComparisonTag();
public String getDescription();
public void setDescription(String value);
public void setHome(Location home);
public boolean hasHome();
public Location getHome();
public long getFoundedDate();
public void setFoundedDate(long newDate);
2014-04-04 20:55:21 +02:00
public void confirmValidHome();
2014-04-04 20:55:21 +02:00
public String getAccountId();
2014-04-04 20:55:21 +02:00
public Integer getPermanentPower();
2014-04-04 20:55:21 +02:00
public void setPermanentPower(Integer permanentPower);
2014-04-04 20:55:21 +02:00
public boolean hasPermanentPower();
2014-04-04 20:55:21 +02:00
public double getPowerBoost();
public void setPowerBoost(double powerBoost);
public boolean noPvPInTerritory();
public boolean noMonstersInTerritory();
public boolean isNormal();
@Deprecated
public boolean isNone();
public boolean isWilderness();
public boolean isSafeZone();
public boolean isWarZone();
public boolean isPlayerFreeType();
2014-04-04 20:55:21 +02:00
public boolean isPowerFrozen();
public void setLastDeath(long time);
public int getKills();
public int getDeaths();
public Access getAccess(FPlayer fPlayer, Action perm);
public void setPermission(Relation relation, Action action, Access access);
public void resetPerms();
2014-04-04 20:55:21 +02:00
// -------------------------------
// Relation and relation colors
// -------------------------------
@Override
public String describeTo(RelationParticipator that, boolean ucfirst);
2014-04-04 20:55:21 +02:00
@Override
public String describeTo(RelationParticipator that);
2014-04-04 20:55:21 +02:00
@Override
public Relation getRelationTo(RelationParticipator rp);
2014-04-04 20:55:21 +02:00
@Override
public Relation getRelationTo(RelationParticipator rp, boolean ignorePeaceful);
2014-04-04 20:55:21 +02:00
@Override
public ChatColor getColorTo(RelationParticipator rp);
public Relation getRelationWish(Faction otherFaction);
public void setRelationWish(Faction otherFaction, Relation relation);
public int getRelationCount(Relation relation);
// ----------------------------------------------//
2014-04-04 20:55:21 +02:00
// Power
// ----------------------------------------------//
public double getPower();
public double getPowerMax();
public int getPowerRounded();
public int getPowerMaxRounded();
public int getLandRounded();
public int getLandRoundedInWorld(String worldName);
public boolean hasLandInflation();
2014-04-04 20:55:21 +02:00
// -------------------------------
// FPlayers
// -------------------------------
// maintain the reference list of FPlayers in this faction
public void refreshFPlayers();
public boolean addFPlayer(FPlayer fplayer);
public boolean removeFPlayer(FPlayer fplayer);
2015-01-03 01:33:34 +01:00
public int getSize();
public Set<FPlayer> getFPlayers();
public Set<FPlayer> getFPlayersWhereOnline(boolean online);
public FPlayer getFPlayerAdmin();
public ArrayList<FPlayer> getFPlayersWhereRole(Role role);
public ArrayList<Player> getOnlinePlayers();
// slightly faster check than getOnlinePlayers() if you just want to see if
// there are any players online
public boolean hasPlayersOnline();
public void memberLoggedOff();
// used when current leader is about to be removed from the faction;
// promotes new leader, or disbands faction if no other members left
public void promoteNewLeader();
// ----------------------------------------------//
2014-04-04 20:55:21 +02:00
// Messages
// ----------------------------------------------//
public void msg(String message, Object... args);
public void sendMessage(String message);
public void sendMessage(List<String> messages);
// ----------------------------------------------//
2014-04-04 20:55:21 +02:00
// Ownership of specific claims
// ----------------------------------------------//
2014-04-04 20:55:21 +02:00
public Map<FLocation, Set<String>> getClaimOwnership();
2014-04-04 20:55:21 +02:00
public void clearAllClaimOwnership();
public void clearClaimOwnership(FLocation loc);
public void clearClaimOwnership(FPlayer player);
public int getCountOfClaimsWithOwners();
public boolean doesLocationHaveOwnersSet(FLocation loc);
2014-04-04 20:55:21 +02:00
public boolean isPlayerInOwnerList(FPlayer player, FLocation loc);
public void setPlayerAsOwner(FPlayer player, FLocation loc);
public void removePlayerAsOwner(FPlayer player, FLocation loc);
public Set<String> getOwnerList(FLocation loc);
public String getOwnerListString(FLocation loc);
public boolean playerHasOwnershipRights(FPlayer fplayer, FLocation loc);
// ----------------------------------------------//
// Persistance and entity management
// ----------------------------------------------//
public void remove();
2014-04-04 20:55:21 +02:00
public Set<FLocation> getAllClaims();
public void setId(String id);
2011-02-06 13:36:11 +01:00
}