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;
|
2014-11-07 18:49:54 +01:00
|
|
|
import com.massivecraft.factions.util.LazyLocation;
|
2018-01-04 10:36:51 +01:00
|
|
|
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.*;
|
2014-11-07 18:49:54 +01:00
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public interface Faction extends EconomyParticipator {
|
|
|
|
public HashMap<String, List<String>> getAnnouncements();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-11-07 18:49:54 +01: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);
|
|
|
|
|
2014-11-07 18:49:54 +01:00
|
|
|
public boolean removeWarp(String name);
|
|
|
|
|
|
|
|
public void clearWarps();
|
|
|
|
|
2016-05-31 01:22:45 +02:00
|
|
|
public int getMaxVaults();
|
|
|
|
|
|
|
|
public void setMaxVaults(int value);
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void addAnnouncement(FPlayer fPlayer, String msg);
|
2014-08-05 17:17:27 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void sendUnreadAnnouncements(FPlayer fPlayer);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void removeAnnouncements(FPlayer fPlayer);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public Set<String> getInvites();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getId();
|
2014-10-18 10:54:45 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void invite(FPlayer fplayer);
|
2014-10-18 10:54:45 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void deinvite(FPlayer fplayer);
|
2014-10-18 10:54:45 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isInvited(FPlayer fplayer);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean getOpen();
|
2011-02-06 13:36:11 +01:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setOpen(boolean isOpen);
|
2011-02-06 13:36:11 +01:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isPeaceful();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setPeaceful(boolean isPeaceful);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setPeacefulExplosionsEnabled(boolean val);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean getPeacefulExplosionsEnabled();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean noExplosionsInTerritory();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +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();
|
2015-05-12 18:20:11 +02:00
|
|
|
|
|
|
|
public long getFoundedDate();
|
|
|
|
|
|
|
|
public void setFoundedDate(long newDate);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void confirmValidHome();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getAccountId();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public Integer getPermanentPower();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setPermanentPower(Integer permanentPower);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean hasPermanentPower();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public double getPowerBoost();
|
|
|
|
|
|
|
|
public void setPowerBoost(double powerBoost);
|
|
|
|
|
|
|
|
public boolean noPvPInTerritory();
|
|
|
|
|
|
|
|
public boolean noMonstersInTerritory();
|
|
|
|
|
|
|
|
public boolean isNormal();
|
|
|
|
|
2015-09-08 18:39:21 +02:00
|
|
|
@Deprecated
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isNone();
|
|
|
|
|
2015-09-08 18:39:21 +02:00
|
|
|
public boolean isWilderness();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isSafeZone();
|
|
|
|
|
|
|
|
public boolean isWarZone();
|
|
|
|
|
|
|
|
public boolean isPlayerFreeType();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2015-01-28 17:13:23 +01:00
|
|
|
public boolean isPowerFrozen();
|
|
|
|
|
|
|
|
public void setLastDeath(long time);
|
|
|
|
|
2015-08-06 23:53:00 +02:00
|
|
|
public int getKills();
|
|
|
|
|
|
|
|
public int getDeaths();
|
|
|
|
|
2018-01-04 10:36:51 +01:00
|
|
|
public Access hasPerm(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
|
2014-10-19 07:37:25 +02:00
|
|
|
public String describeTo(RelationParticipator that, boolean ucfirst);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
@Override
|
2014-10-19 07:37:25 +02:00
|
|
|
public String describeTo(RelationParticipator that);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
@Override
|
2014-10-19 07:37:25 +02:00
|
|
|
public Relation getRelationTo(RelationParticipator rp);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
@Override
|
2014-10-19 07:37:25 +02:00
|
|
|
public Relation getRelationTo(RelationParticipator rp, boolean ignorePeaceful);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
@Override
|
2014-10-19 07:37:25 +02:00
|
|
|
public ChatColor getColorTo(RelationParticipator rp);
|
|
|
|
|
|
|
|
public Relation getRelationWish(Faction otherFaction);
|
|
|
|
|
|
|
|
public void setRelationWish(Faction otherFaction, Relation relation);
|
|
|
|
|
2015-01-27 16:33:47 +01:00
|
|
|
public int getRelationCount(Relation relation);
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
// ----------------------------------------------//
|
2014-04-04 20:55:21 +02:00
|
|
|
// Power
|
2014-10-19 07:37:25 +02:00
|
|
|
// ----------------------------------------------//
|
|
|
|
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
|
2014-10-19 07:37:25 +02:00
|
|
|
public void refreshFPlayers();
|
|
|
|
|
|
|
|
public boolean addFPlayer(FPlayer fplayer);
|
|
|
|
|
|
|
|
public boolean removeFPlayer(FPlayer fplayer);
|
|
|
|
|
2015-01-03 01:33:34 +01:00
|
|
|
public int getSize();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
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
|
2014-10-19 07:37:25 +02:00
|
|
|
// ----------------------------------------------//
|
|
|
|
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-10-19 07:37:25 +02:00
|
|
|
// ----------------------------------------------//
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public Map<FLocation, Set<String>> getClaimOwnership();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +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
|
|
|
|
2014-10-19 07:37:25 +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
|
|
|
|
2015-04-26 07:02:30 +02:00
|
|
|
public Set<FLocation> getAllClaims();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setId(String id);
|
2011-02-06 13:36:11 +01:00
|
|
|
}
|