Format. Haven't done this in awhile. Just sneak it in.
This commit is contained in:
parent
f019c4f833
commit
5c2abb34de
@ -287,19 +287,19 @@ public class Conf {
|
||||
|
||||
// Format for popup - substitute values for macros
|
||||
public static String dynmapDescription =
|
||||
"<div class=\"infowindow\">\n"
|
||||
+ "<span style=\"font-weight: bold; font-size: 150%;\">%name%</span><br>\n"
|
||||
+ "<span style=\"font-style: italic; font-size: 110%;\">%description%</span><br>"
|
||||
+ "<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Leader:</span> %players.leader%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Admins:</span> %players.admins.count%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Moderators:</span> %players.moderators.count%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Members:</span> %players.normals.count%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">TOTAL:</span> %players.count%<br>\n"
|
||||
+ "</br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Bank:</span> %money%<br>\n"
|
||||
+ "<br>\n"
|
||||
+ "</div>";
|
||||
"<div class=\"infowindow\">\n"
|
||||
+ "<span style=\"font-weight: bold; font-size: 150%;\">%name%</span><br>\n"
|
||||
+ "<span style=\"font-style: italic; font-size: 110%;\">%description%</span><br>"
|
||||
+ "<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Leader:</span> %players.leader%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Admins:</span> %players.admins.count%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Moderators:</span> %players.moderators.count%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Members:</span> %players.normals.count%<br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">TOTAL:</span> %players.count%<br>\n"
|
||||
+ "</br>\n"
|
||||
+ "<span style=\"font-weight: bold;\">Bank:</span> %money%<br>\n"
|
||||
+ "<br>\n"
|
||||
+ "</div>";
|
||||
|
||||
// Enable the %money% macro. Only do this if you know your economy manager is thread-safe.
|
||||
public static boolean dynmapDescriptionMoney = false;
|
||||
|
@ -22,7 +22,8 @@ public class FLocation implements Serializable {
|
||||
try {
|
||||
Class.forName("org.bukkit.WorldBorder");
|
||||
worldBorderClassPresent = true;
|
||||
} catch (ClassNotFoundException ignored) {}
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
|
||||
worldBorderSupport = worldBorderClassPresent;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class P extends MPlugin {
|
||||
try {
|
||||
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
||||
if (rsp != null) {
|
||||
perms = rsp.getProvider();
|
||||
perms = rsp.getProvider();
|
||||
}
|
||||
} catch (NoClassDefFoundError ex) {
|
||||
return false;
|
||||
|
@ -18,7 +18,6 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
|
||||
* Get the player involved in the event.
|
||||
*
|
||||
* @return Player involved in the event.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -30,7 +29,6 @@ public class FactionRenameEvent extends FactionPlayerEvent implements Cancellabl
|
||||
* Get the faction tag before it was renamed.
|
||||
*
|
||||
* @return old faction tag.
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -33,7 +33,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -45,7 +44,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -57,7 +55,6 @@ public class LandClaimEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the Player involved in this event.
|
||||
*
|
||||
* @return player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -16,7 +16,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -28,7 +27,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -40,7 +38,6 @@ public class LandUnclaimAllEvent extends FactionPlayerEvent implements Cancellab
|
||||
* Get the Player involved in the event.
|
||||
*
|
||||
* @return Player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -28,7 +28,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -40,7 +39,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -52,7 +50,6 @@ public class LandUnclaimEvent extends FactionPlayerEvent implements Cancellable
|
||||
* Get the Player involved in the event.
|
||||
*
|
||||
* @return Player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -21,7 +21,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the id of the faction.
|
||||
*
|
||||
* @return id of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getId() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -33,7 +32,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the tag of the faction.
|
||||
*
|
||||
* @return tag of faction as String
|
||||
*
|
||||
* @deprecated use getFaction().getTag() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ -45,7 +43,6 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
* Get the Player involved in the event.
|
||||
*
|
||||
* @return Player from FPlayer.
|
||||
*
|
||||
* @deprecated use getfPlayer().getPlayer() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -91,9 +91,9 @@ public class Worldguard {
|
||||
// False: No regions found within chunk
|
||||
|
||||
public static boolean checkForRegionsInChunk(FLocation floc) {
|
||||
Chunk chunk = floc.getWorld().getChunkAt((int) floc.getX(), (int) floc.getZ());
|
||||
Chunk chunk = floc.getWorld().getChunkAt((int) floc.getX(), (int) floc.getZ());
|
||||
|
||||
return checkForRegionsInChunk(chunk);
|
||||
return checkForRegionsInChunk(chunk);
|
||||
}
|
||||
|
||||
public static boolean checkForRegionsInChunk(Location loc) {
|
||||
|
@ -574,9 +574,9 @@ public class EngineDynmap {
|
||||
PlayerSet set = this.markerApi.getPlayerSet(setId);
|
||||
if (set == null) {
|
||||
set = this.markerApi.createPlayerSet(setId, // id
|
||||
true, // symmetric
|
||||
playerIds, // players
|
||||
false // persistent
|
||||
true, // symmetric
|
||||
playerIds, // players
|
||||
false // persistent
|
||||
);
|
||||
}
|
||||
if (set == null) {
|
||||
|
@ -72,8 +72,8 @@ public class TempAreaMarker {
|
||||
|
||||
// Line Style
|
||||
if (marker.getLineWeight() != this.lineWeight ||
|
||||
marker.getLineOpacity() != this.lineOpacity ||
|
||||
marker.getLineColor() != this.lineColor) {
|
||||
marker.getLineOpacity() != this.lineOpacity ||
|
||||
marker.getLineColor() != this.lineColor) {
|
||||
marker.setLineStyle(this.lineWeight, this.lineOpacity, this.lineColor);
|
||||
}
|
||||
|
||||
|
@ -95,11 +95,11 @@ public class FactionsBlockListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* note that I originally was testing the territory of each affected block, but since I found that pistons can only push
|
||||
* up to 12 blocks and the width of any territory is 16 blocks, it should be safe (and much more lightweight) to test
|
||||
* only the final target block as done above
|
||||
*/
|
||||
* up to 12 blocks and the width of any territory is 16 blocks, it should be safe (and much more lightweight) to test
|
||||
* only the final target block as done above
|
||||
*/
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||
|
@ -151,23 +151,23 @@ public class FactionsEntityListener implements Listener {
|
||||
|
||||
//TODO: :(
|
||||
if (boomer instanceof Creeper && ((faction.isWilderness() && Conf.wildernessBlockCreepers && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName())) ||
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockCreepers : Conf.territoryBlockCreepersWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockCreepers) ||
|
||||
faction.isSafeZone())) {
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockCreepers : Conf.territoryBlockCreepersWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockCreepers) ||
|
||||
faction.isSafeZone())) {
|
||||
// creeper which needs prevention
|
||||
event.setCancelled(true);
|
||||
} else if (
|
||||
// it's a bit crude just using fireball protection for Wither boss too, but I'd rather not add in a whole new set of xxxBlockWitherExplosion or whatever
|
||||
(boomer instanceof Fireball || boomer instanceof WitherSkull || boomer instanceof Wither) && ((faction.isWilderness() && Conf.wildernessBlockFireballs && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName())) ||
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockFireballs : Conf.territoryBlockFireballsWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockFireballs) ||
|
||||
faction.isSafeZone())) {
|
||||
(boomer instanceof Fireball || boomer instanceof WitherSkull || boomer instanceof Wither) && ((faction.isWilderness() && Conf.wildernessBlockFireballs && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName())) ||
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockFireballs : Conf.territoryBlockFireballsWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockFireballs) ||
|
||||
faction.isSafeZone())) {
|
||||
// ghast fireball which needs prevention
|
||||
event.setCancelled(true);
|
||||
} else if ((boomer instanceof TNTPrimed || boomer instanceof ExplosiveMinecart) && ((faction.isWilderness() && Conf.wildernessBlockTNT && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName())) ||
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockTNT : Conf.territoryBlockTNTWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockTNT) ||
|
||||
(faction.isSafeZone() && Conf.safeZoneBlockTNT))) {
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockTNT : Conf.territoryBlockTNTWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockTNT) ||
|
||||
(faction.isSafeZone() && Conf.safeZoneBlockTNT))) {
|
||||
// TNT which needs prevention
|
||||
event.setCancelled(true);
|
||||
} else if ((boomer instanceof TNTPrimed || boomer instanceof ExplosiveMinecart) && Conf.handleExploitTNTWaterlog) {
|
||||
@ -464,9 +464,9 @@ public class FactionsEntityListener implements Listener {
|
||||
boolean online = faction.hasPlayersOnline();
|
||||
|
||||
if ((faction.isWilderness() && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName()) && (Conf.wildernessBlockCreepers || Conf.wildernessBlockFireballs || Conf.wildernessBlockTNT)) ||
|
||||
(faction.isNormal() && (online ? (Conf.territoryBlockCreepers || Conf.territoryBlockFireballs || Conf.territoryBlockTNT) : (Conf.territoryBlockCreepersWhenOffline || Conf.territoryBlockFireballsWhenOffline || Conf.territoryBlockTNTWhenOffline))) ||
|
||||
(faction.isWarZone() && (Conf.warZoneBlockCreepers || Conf.warZoneBlockFireballs || Conf.warZoneBlockTNT)) ||
|
||||
faction.isSafeZone()) {
|
||||
(faction.isNormal() && (online ? (Conf.territoryBlockCreepers || Conf.territoryBlockFireballs || Conf.territoryBlockTNT) : (Conf.territoryBlockCreepersWhenOffline || Conf.territoryBlockFireballsWhenOffline || Conf.territoryBlockTNTWhenOffline))) ||
|
||||
(faction.isWarZone() && (Conf.warZoneBlockCreepers || Conf.warZoneBlockFireballs || Conf.warZoneBlockTNT)) ||
|
||||
faction.isSafeZone()) {
|
||||
// explosion which needs prevention
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -512,9 +512,9 @@ public class FactionsEntityListener implements Listener {
|
||||
Faction faction = Board.getInstance().getFactionAt(new FLocation(loc));
|
||||
// it's a bit crude just using fireball protection, but I'd rather not add in a whole new set of xxxBlockWitherExplosion or whatever
|
||||
if ((faction.isWilderness() && Conf.wildernessBlockFireballs && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName())) ||
|
||||
(faction.isNormal() && (faction.hasPlayersOnline() ? Conf.territoryBlockFireballs : Conf.territoryBlockFireballsWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockFireballs) ||
|
||||
faction.isSafeZone()) {
|
||||
(faction.isNormal() && (faction.hasPlayersOnline() ? Conf.territoryBlockFireballs : Conf.territoryBlockFireballsWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockFireballs) ||
|
||||
faction.isSafeZone()) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
@ -554,10 +554,10 @@ public class FactionsEntityListener implements Listener {
|
||||
}
|
||||
// quick check to see if all Enderman deny options are enabled; if so, no need to check location
|
||||
if (Conf.wildernessDenyEndermanBlocks &&
|
||||
Conf.territoryDenyEndermanBlocks &&
|
||||
Conf.territoryDenyEndermanBlocksWhenOffline &&
|
||||
Conf.safeZoneDenyEndermanBlocks &&
|
||||
Conf.warZoneDenyEndermanBlocks) {
|
||||
Conf.territoryDenyEndermanBlocks &&
|
||||
Conf.territoryDenyEndermanBlocksWhenOffline &&
|
||||
Conf.safeZoneDenyEndermanBlocks &&
|
||||
Conf.warZoneDenyEndermanBlocks) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -468,9 +468,9 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
Location home = me.getFaction().getHome();
|
||||
if (Conf.homesEnabled &&
|
||||
Conf.homesTeleportToOnDeath &&
|
||||
home != null &&
|
||||
(Conf.homesRespawnFromNoPowerLossWorlds || !Conf.worldsNoPowerLoss.contains(event.getPlayer().getWorld().getName()))) {
|
||||
Conf.homesTeleportToOnDeath &&
|
||||
home != null &&
|
||||
(Conf.homesRespawnFromNoPowerLossWorlds || !Conf.worldsNoPowerLoss.contains(event.getPlayer().getWorld().getName()))) {
|
||||
event.setRespawnLocation(home);
|
||||
}
|
||||
}
|
||||
@ -515,10 +515,10 @@ public class FactionsPlayerListener implements Listener {
|
||||
}
|
||||
|
||||
if (me.hasFaction() &&
|
||||
!me.isAdminBypassing() &&
|
||||
!Conf.permanentFactionMemberDenyCommands.isEmpty() &&
|
||||
me.getFaction().isPermanent() &&
|
||||
isCommandInList(fullCmd, shortCmd, Conf.permanentFactionMemberDenyCommands.iterator())) {
|
||||
!me.isAdminBypassing() &&
|
||||
!Conf.permanentFactionMemberDenyCommands.isEmpty() &&
|
||||
me.getFaction().isPermanent() &&
|
||||
isCommandInList(fullCmd, shortCmd, Conf.permanentFactionMemberDenyCommands.iterator())) {
|
||||
me.msg(TL.PLAYER_COMMAND_PERMANENT, fullCmd);
|
||||
return true;
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ public enum Role {
|
||||
return NORMAL;
|
||||
case 2:
|
||||
return MODERATOR;
|
||||
case 3: return ADMIN;
|
||||
case 3:
|
||||
return ADMIN;
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -68,7 +69,7 @@ public enum Role {
|
||||
return this.nicename;
|
||||
}
|
||||
|
||||
public TL getTranslation(){
|
||||
public TL getTranslation() {
|
||||
return translation;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||
import me.clip.placeholderapi.external.EZPlaceholderHook;
|
||||
import org.apache.commons.lang.time.DurationFormatUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -21,7 +20,7 @@ public class PlaceholderAPIManager extends EZPlaceholderHook {
|
||||
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player player, String placeholder) {
|
||||
if(player == null || placeholder == null) {
|
||||
if (player == null || placeholder == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -46,7 +45,7 @@ public class PlaceholderAPIManager extends EZPlaceholderHook {
|
||||
return String.valueOf(fPlayer.getKills());
|
||||
case "player_deaths":
|
||||
return String.valueOf(fPlayer.getDeaths());
|
||||
// Then Faction stuff
|
||||
// Then Faction stuff
|
||||
case "faction_name":
|
||||
return faction.getTag();
|
||||
case "faction_power":
|
||||
|
@ -94,9 +94,9 @@ public abstract class SpiralTask implements Runnable {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Below are the guts of the class, which you normally wouldn't need to mess with.
|
||||
*/
|
||||
/*
|
||||
* Below are the guts of the class, which you normally wouldn't need to mess with.
|
||||
*/
|
||||
|
||||
public final void setTaskID(int ID) {
|
||||
if (ID == -1) {
|
||||
|
@ -7,6 +7,7 @@ public enum Access {
|
||||
|
||||
/**
|
||||
* Case insensitive check for access.
|
||||
*
|
||||
* @param check
|
||||
* @return
|
||||
*/
|
||||
|
@ -37,6 +37,7 @@ public enum Action {
|
||||
|
||||
/**
|
||||
* Case insensitive check for action.
|
||||
*
|
||||
* @param check
|
||||
* @return
|
||||
*/
|
||||
|
@ -20,44 +20,44 @@ public abstract class MemoryBoard extends Board {
|
||||
|
||||
Multimap<String, FLocation> factionToLandMap = HashMultimap.create();
|
||||
|
||||
@Override
|
||||
public String put(FLocation floc, String factionId) {
|
||||
String previousValue = super.put(floc, factionId);
|
||||
if (previousValue != null) {
|
||||
factionToLandMap.remove(previousValue, floc);
|
||||
}
|
||||
@Override
|
||||
public String put(FLocation floc, String factionId) {
|
||||
String previousValue = super.put(floc, factionId);
|
||||
if (previousValue != null) {
|
||||
factionToLandMap.remove(previousValue, floc);
|
||||
}
|
||||
|
||||
factionToLandMap.put(factionId, floc);
|
||||
return previousValue;
|
||||
}
|
||||
factionToLandMap.put(factionId, floc);
|
||||
return previousValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String remove(Object key) {
|
||||
String result = super.remove(key);
|
||||
if (result != null) {
|
||||
FLocation floc = (FLocation) key;
|
||||
factionToLandMap.remove(result, floc);
|
||||
}
|
||||
@Override
|
||||
public String remove(Object key) {
|
||||
String result = super.remove(key);
|
||||
if (result != null) {
|
||||
FLocation floc = (FLocation) key;
|
||||
factionToLandMap.remove(result, floc);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
super.clear();
|
||||
factionToLandMap.clear();
|
||||
}
|
||||
@Override
|
||||
public void clear() {
|
||||
super.clear();
|
||||
factionToLandMap.clear();
|
||||
}
|
||||
|
||||
public int getOwnedLandCount(String factionId) {
|
||||
return factionToLandMap.get(factionId).size();
|
||||
}
|
||||
public int getOwnedLandCount(String factionId) {
|
||||
return factionToLandMap.get(factionId).size();
|
||||
}
|
||||
|
||||
public void removeFaction(String factionId) {
|
||||
Collection<FLocation> flocations = factionToLandMap.removeAll(factionId);
|
||||
for (FLocation floc : flocations) {
|
||||
super.remove(floc);
|
||||
}
|
||||
}
|
||||
public void removeFaction(String factionId) {
|
||||
Collection<FLocation> flocations = factionToLandMap.removeAll(factionId);
|
||||
for (FLocation floc : flocations) {
|
||||
super.remove(floc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MemoryBoardMap flocationIds = new MemoryBoardMap();
|
||||
@ -173,7 +173,6 @@ public abstract class MemoryBoard extends Board {
|
||||
* @param flocation - center location.
|
||||
* @param faction - faction checking for.
|
||||
* @param radius - chunk radius to check.
|
||||
*
|
||||
* @return true if another Faction is within the radius, otherwise false.
|
||||
*/
|
||||
public boolean hasFactionWithin(FLocation flocation, Faction faction, int radius) {
|
||||
@ -277,10 +276,10 @@ public abstract class MemoryBoard extends Board {
|
||||
} else if (factionHere.isWarZone()) {
|
||||
row.append(ChatColor.DARK_RED + "+");
|
||||
} else if (factionHere == faction ||
|
||||
factionHere == factionLoc ||
|
||||
relation.isAtLeast(Relation.ALLY) ||
|
||||
(Conf.showNeutralFactionsOnMap && relation.equals(Relation.NEUTRAL)) ||
|
||||
(Conf.showEnemyFactionsOnMap && relation.equals(Relation.ENEMY))) {
|
||||
factionHere == factionLoc ||
|
||||
relation.isAtLeast(Relation.ALLY) ||
|
||||
(Conf.showNeutralFactionsOnMap && relation.equals(Relation.NEUTRAL)) ||
|
||||
(Conf.showEnemyFactionsOnMap && relation.equals(Relation.ENEMY))) {
|
||||
if (!fList.containsKey(factionHere.getTag())) {
|
||||
fList.put(factionHere.getTag(), Conf.mapKeyChrs[Math.min(chrIdx++, Conf.mapKeyChrs.length - 1)]);
|
||||
}
|
||||
|
@ -591,7 +591,6 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
* Check if the scoreboard should be shown. Simple method to be used by above method.
|
||||
*
|
||||
* @param toShow Faction to be shown.
|
||||
*
|
||||
* @return true if should show, otherwise false.
|
||||
*/
|
||||
public boolean showInfoBoard(Faction toShow) {
|
||||
@ -686,6 +685,7 @@ public abstract class MemoryFPlayer implements FPlayer {
|
||||
public boolean canClaimForFaction(Faction forFaction) {
|
||||
return this.isAdminBypassing() || !forFaction.isWilderness() && (forFaction == this.getFaction() && this.getRole().isAtLeast(Role.MODERATOR)) || (forFaction.isSafeZone() && Permission.MANAGE_SAFE_ZONE.has(getPlayer())) || (forFaction.isWarZone() && Permission.MANAGE_WAR_ZONE.has(getPlayer()));
|
||||
}
|
||||
|
||||
public boolean canClaimForFactionAtLocation(Faction forFaction, Location location, boolean notifyFailure) {
|
||||
FLocation flocation = new FLocation(location);
|
||||
|
||||
|
@ -128,7 +128,6 @@ public enum TagReplacer {
|
||||
*
|
||||
* @param fac Target faction
|
||||
* @param fp Target player (can be null)
|
||||
*
|
||||
* @return the value for this enum!
|
||||
*/
|
||||
protected String getValue(Faction fac, FPlayer fp) {
|
||||
@ -232,7 +231,6 @@ public enum TagReplacer {
|
||||
* Returns a list of all the variables we can use for this type<br>
|
||||
*
|
||||
* @param type the type we want
|
||||
*
|
||||
* @return a list of all the variables with this type
|
||||
*/
|
||||
protected static List<TagReplacer> getByType(TagType type) {
|
||||
@ -252,7 +250,6 @@ public enum TagReplacer {
|
||||
/**
|
||||
* @param original raw line with variables
|
||||
* @param value what to replace var in raw line with
|
||||
*
|
||||
* @return the string with the new value
|
||||
*/
|
||||
public String replace(String original, String value) {
|
||||
@ -261,7 +258,6 @@ public enum TagReplacer {
|
||||
|
||||
/**
|
||||
* @param toSearch raw line with variables
|
||||
*
|
||||
* @return if the raw line contains this enums variable
|
||||
*/
|
||||
public boolean contains(String toSearch) {
|
||||
|
@ -23,7 +23,6 @@ public class TagUtil {
|
||||
*
|
||||
* @param faction for faction
|
||||
* @param line raw line from config with variables to replace for
|
||||
*
|
||||
* @return clean line
|
||||
*/
|
||||
public static String parsePlain(Faction faction, String line) {
|
||||
@ -40,7 +39,6 @@ public class TagUtil {
|
||||
*
|
||||
* @param fplayer for player
|
||||
* @param line raw line from config with variables to replace for
|
||||
*
|
||||
* @return clean line
|
||||
*/
|
||||
public static String parsePlain(FPlayer fplayer, String line) {
|
||||
@ -62,7 +60,6 @@ public class TagUtil {
|
||||
* @param faction for faction
|
||||
* @param fplayer from player
|
||||
* @param line raw line from config with variables to replace for
|
||||
*
|
||||
* @return clean line
|
||||
*/
|
||||
public static String parsePlain(Faction faction, FPlayer fplayer, String line) {
|
||||
@ -85,7 +82,6 @@ public class TagUtil {
|
||||
* @param faction for faction (viewers faction)
|
||||
* @param fme for player (viewer)
|
||||
* @param line fancy message prefix
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static List<FancyMessage> parseFancy(Faction faction, FPlayer fme, String line) {
|
||||
@ -102,7 +98,6 @@ public class TagUtil {
|
||||
* Checks if a line has fancy variables
|
||||
*
|
||||
* @param line raw line from config with variables
|
||||
*
|
||||
* @return if the line has fancy variables
|
||||
*/
|
||||
public static boolean hasFancy(String line) {
|
||||
@ -120,7 +115,6 @@ public class TagUtil {
|
||||
* @param target Faction to get relate from
|
||||
* @param fme Player to relate to
|
||||
* @param prefix First part of the fancy message
|
||||
*
|
||||
* @return list of fancy messages to send
|
||||
*/
|
||||
protected static List<FancyMessage> getFancy(Faction target, FPlayer fme, TagReplacer type, String prefix) {
|
||||
@ -208,7 +202,6 @@ public class TagUtil {
|
||||
* Parses tooltip variables from config <br> Supports variables for factions only (type 2)
|
||||
*
|
||||
* @param faction faction to tooltip for
|
||||
*
|
||||
* @return list of tooltips for a fancy message
|
||||
*/
|
||||
private static List<String> tipFaction(Faction faction) {
|
||||
@ -223,7 +216,6 @@ public class TagUtil {
|
||||
* Parses tooltip variables from config <br> Supports variables for players and factions (types 1 and 2)
|
||||
*
|
||||
* @param fplayer player to tooltip for
|
||||
*
|
||||
* @return list of tooltips for a fancy message
|
||||
*/
|
||||
private static List<String> tipPlayer(FPlayer fplayer) {
|
||||
|
Loading…
Reference in New Issue
Block a user