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-09-24 12:04:49 +02:00
|
|
|
import com.massivecraft.factions.struct.ChatMode;
|
2011-07-18 22:06:02 +02:00
|
|
|
import com.massivecraft.factions.struct.Relation;
|
|
|
|
import com.massivecraft.factions.struct.Role;
|
2015-05-25 06:42:31 +02:00
|
|
|
import com.massivecraft.factions.util.WarmUpUtil;
|
2018-02-11 00:59:21 +01:00
|
|
|
import mkremins.fanciful.FancyMessage;
|
2014-04-04 20:55:21 +02:00
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.Location;
|
2018-02-16 03:02:59 +01:00
|
|
|
import org.bukkit.command.CommandSender;
|
2014-04-04 20:55:21 +02:00
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2014-11-06 01:36:47 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2011-02-06 13:36:11 +01:00
|
|
|
|
2011-03-22 15:45:41 +01:00
|
|
|
/**
|
2014-04-04 20:55:21 +02:00
|
|
|
* Logged in players always have exactly one FPlayer instance. Logged out players may or may not have an FPlayer
|
|
|
|
* instance. They will always have one if they are part of a faction. This is because only players with a faction are
|
|
|
|
* saved to disk (in order to not waste disk space).
|
|
|
|
* <p/>
|
2011-03-23 12:00:38 +01:00
|
|
|
* The FPlayer is linked to a minecraft player using the player name.
|
2014-04-04 20:55:21 +02:00
|
|
|
* <p/>
|
|
|
|
* The same instance is always returned for the same player. This means you can use the == operator. No .equals method
|
|
|
|
* necessary.
|
2011-03-22 15:45:41 +01:00
|
|
|
*/
|
|
|
|
|
2014-11-06 01:36:47 +01:00
|
|
|
public interface FPlayer extends EconomyParticipator {
|
2015-08-06 23:53:00 +02:00
|
|
|
public void login();
|
|
|
|
|
|
|
|
public void logout();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public Faction getFaction();
|
|
|
|
|
|
|
|
public String getFactionId();
|
|
|
|
|
|
|
|
public boolean hasFaction();
|
|
|
|
|
|
|
|
public void setFaction(Faction faction);
|
|
|
|
|
2016-05-30 02:33:46 +02:00
|
|
|
public boolean willAutoLeave();
|
|
|
|
|
|
|
|
public void setAutoLeave(boolean autoLeave);
|
|
|
|
|
2016-06-12 01:49:33 +02:00
|
|
|
public long getLastFrostwalkerMessage();
|
|
|
|
|
|
|
|
public void setLastFrostwalkerMessage();
|
|
|
|
|
2015-01-06 23:06:46 +01:00
|
|
|
public void setMonitorJoins(boolean monitor);
|
|
|
|
|
|
|
|
public boolean isMonitoringJoins();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public Role getRole();
|
|
|
|
|
|
|
|
public void setRole(Role role);
|
|
|
|
|
2018-03-05 02:27:48 +01:00
|
|
|
public boolean shouldTakeFallDamage();
|
|
|
|
|
|
|
|
public void setTakeFallDamage(boolean fallDamage);
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public double getPowerBoost();
|
|
|
|
|
|
|
|
public void setPowerBoost(double powerBoost);
|
|
|
|
|
|
|
|
public Faction getAutoClaimFor();
|
|
|
|
|
|
|
|
public void setAutoClaimFor(Faction faction);
|
|
|
|
|
|
|
|
public boolean isAutoSafeClaimEnabled();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setIsAutoSafeClaimEnabled(boolean enabled);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isAutoWarClaimEnabled();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setIsAutoWarClaimEnabled(boolean enabled);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isAdminBypassing();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-11-07 19:08:57 +01:00
|
|
|
public boolean isVanished();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setIsAdminBypassing(boolean val);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setChatMode(ChatMode chatMode);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public ChatMode getChatMode();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2015-02-25 15:38:03 +01:00
|
|
|
public void setIgnoreAllianceChat(boolean ignore);
|
|
|
|
|
|
|
|
public boolean isIgnoreAllianceChat();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setSpyingChat(boolean chatSpying);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isSpyingChat();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2015-05-18 21:32:12 +02:00
|
|
|
public boolean showScoreboard();
|
|
|
|
|
|
|
|
public void setShowScoreboard(boolean show);
|
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
// FIELD: account
|
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 void resetFactionData(boolean doSpoutUpdate);
|
|
|
|
|
|
|
|
public void resetFactionData();
|
|
|
|
|
|
|
|
public long getLastLoginTime();
|
|
|
|
|
|
|
|
public void setLastLoginTime(long lastLoginTime);
|
|
|
|
|
|
|
|
public boolean isMapAutoUpdating();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setMapAutoUpdating(boolean mapAutoUpdating);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean hasLoginPvpDisabled();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public FLocation getLastStoodAt();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void setLastStoodAt(FLocation flocation);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getTitle();
|
|
|
|
|
2018-02-16 03:02:59 +01:00
|
|
|
public void setTitle(CommandSender sender, String title);
|
2014-10-19 07:37:25 +02:00
|
|
|
|
|
|
|
public String getName();
|
|
|
|
|
|
|
|
public String getTag();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
// Base concatenations:
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getNameAndSomething(String something);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getNameAndTitle();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getNameAndTag();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
// Colored concatenations:
|
|
|
|
// These are used in information messages
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getNameAndTitle(Faction faction);
|
|
|
|
|
|
|
|
public String getNameAndTitle(FPlayer fplayer);
|
2012-03-13 15:48:31 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
// Chat Tag:
|
|
|
|
// These are injected into the format of global chat messages.
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getChatTag();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
// Colored Chat Tag
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getChatTag(Faction faction);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public String getChatTag(FPlayer fplayer);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2015-08-06 23:53:00 +02:00
|
|
|
public int getKills();
|
|
|
|
|
|
|
|
public int getDeaths();
|
|
|
|
|
2018-03-29 02:33:10 +02:00
|
|
|
public void takeMoney(int amt);
|
|
|
|
|
|
|
|
public boolean hasMoney(int amt);
|
2015-08-06 23:53:00 +02:00
|
|
|
|
2018-04-09 05:13:41 +02:00
|
|
|
//inspect Stuff
|
|
|
|
|
|
|
|
public boolean isInspectMode();
|
|
|
|
|
|
|
|
public void setInspectMode(boolean status);
|
|
|
|
|
2018-03-31 04:22:06 +02:00
|
|
|
|
|
|
|
// Fly Checks
|
|
|
|
|
|
|
|
public Boolean canflyinWilderness();
|
|
|
|
|
|
|
|
public Boolean canflyinWarzone();
|
|
|
|
|
|
|
|
public Boolean canflyinSafezone();
|
|
|
|
|
|
|
|
public Boolean canflyinEnemy();
|
|
|
|
|
|
|
|
public Boolean canflyinAlly();
|
|
|
|
|
|
|
|
public Boolean canflyinTruce();
|
|
|
|
|
|
|
|
public Boolean canflyinNeutral();
|
|
|
|
|
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
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public Relation getRelationToLocation();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
@Override
|
2014-10-19 07:37:25 +02:00
|
|
|
public ChatColor getColorTo(RelationParticipator rp);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2018-03-27 15:17:55 +02:00
|
|
|
|
|
|
|
public String getRolePrefix();
|
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
//----------------------------------------------//
|
|
|
|
// Health
|
|
|
|
//----------------------------------------------//
|
2014-10-19 07:37:25 +02:00
|
|
|
public void heal(int amnt);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------//
|
|
|
|
// Power
|
|
|
|
//----------------------------------------------//
|
2014-10-19 07:37:25 +02:00
|
|
|
public double getPower();
|
|
|
|
|
|
|
|
public void alterPower(double delta);
|
|
|
|
|
|
|
|
public double getPowerMax();
|
|
|
|
|
|
|
|
public double getPowerMin();
|
|
|
|
|
|
|
|
public int getPowerRounded();
|
|
|
|
|
|
|
|
public int getPowerMaxRounded();
|
|
|
|
|
|
|
|
public int getPowerMinRounded();
|
|
|
|
|
|
|
|
public void updatePower();
|
|
|
|
|
|
|
|
public void losePowerFromBeingOffline();
|
|
|
|
|
|
|
|
public void onDeath();
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
//----------------------------------------------//
|
|
|
|
// Territory
|
|
|
|
//----------------------------------------------//
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isInOwnTerritory();
|
|
|
|
|
|
|
|
public boolean isInOthersTerritory();
|
|
|
|
|
|
|
|
public boolean isInAllyTerritory();
|
|
|
|
|
|
|
|
public boolean isInNeutralTerritory();
|
|
|
|
|
|
|
|
public boolean isInEnemyTerritory();
|
|
|
|
|
2015-05-13 05:25:28 +02:00
|
|
|
public void sendFactionHereMessage(Faction from);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
// -------------------------------
|
|
|
|
// Actions
|
|
|
|
// -------------------------------
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void leave(boolean makePay);
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean canClaimForFaction(Faction forFaction);
|
|
|
|
|
|
|
|
public boolean canClaimForFactionAtLocation(Faction forFaction, Location location, boolean notifyFailure);
|
|
|
|
|
2018-02-13 03:09:02 +01:00
|
|
|
public boolean canClaimForFactionAtLocation(Faction forFaction, FLocation location, boolean notifyFailure);
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean attemptClaim(Faction forFaction, Location location, boolean notifyFailure);
|
|
|
|
|
2018-02-13 03:09:02 +01:00
|
|
|
public boolean attemptClaim(Faction forFaction, FLocation location, boolean notifyFailure);
|
|
|
|
|
2018-03-26 23:43:15 +02:00
|
|
|
public void setInVault(boolean status);
|
|
|
|
|
|
|
|
public boolean isInVault();
|
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public void msg(String str, Object... args);
|
|
|
|
|
|
|
|
public String getId();
|
|
|
|
|
|
|
|
public Player getPlayer();
|
|
|
|
|
|
|
|
public boolean isOnline();
|
|
|
|
|
|
|
|
public void sendMessage(String message);
|
|
|
|
|
|
|
|
public void sendMessage(List<String> messages);
|
|
|
|
|
2018-02-11 00:59:21 +01:00
|
|
|
public void sendFancyMessage(FancyMessage message);
|
|
|
|
|
|
|
|
public void sendFancyMessage(List<FancyMessage> message);
|
|
|
|
|
2018-02-11 01:20:13 +01:00
|
|
|
public int getMapHeight();
|
|
|
|
|
|
|
|
public void setMapHeight(int height);
|
2018-02-11 00:59:21 +01:00
|
|
|
|
2014-10-19 07:37:25 +02:00
|
|
|
public boolean isOnlineAndVisibleTo(Player me);
|
|
|
|
|
|
|
|
public void remove();
|
|
|
|
|
|
|
|
public boolean isOffline();
|
|
|
|
|
|
|
|
public void setId(String id);
|
2015-05-25 06:42:31 +02:00
|
|
|
|
2018-03-04 23:13:32 +01:00
|
|
|
public boolean isFlying();
|
|
|
|
|
|
|
|
public void setFlying(boolean fly);
|
|
|
|
|
|
|
|
public void setFFlying(boolean fly, boolean damage);
|
|
|
|
|
|
|
|
public boolean canFlyAtLocation();
|
|
|
|
|
|
|
|
public boolean canFlyAtLocation(FLocation location);
|
|
|
|
|
2018-03-26 23:43:15 +02:00
|
|
|
public boolean isEnteringPassword();
|
|
|
|
|
|
|
|
public void setEnteringPassword(boolean toggle, String warp);
|
|
|
|
|
|
|
|
public String getEnteringWarp();
|
|
|
|
|
|
|
|
public boolean checkIfNearbyEnemies();
|
|
|
|
|
|
|
|
|
2015-05-25 06:42:31 +02:00
|
|
|
// -------------------------------
|
|
|
|
// Warmups
|
|
|
|
// -------------------------------
|
|
|
|
|
|
|
|
public boolean isWarmingUp();
|
|
|
|
|
|
|
|
public WarmUpUtil.Warmup getWarmupType();
|
|
|
|
|
|
|
|
public void addWarmup(WarmUpUtil.Warmup warmup, int taskId);
|
|
|
|
|
|
|
|
public void stopWarmup();
|
|
|
|
|
|
|
|
public void clearWarmup();
|
|
|
|
|
2018-03-26 23:43:15 +02:00
|
|
|
}
|