Merge remote-tracking branch 'origin/master' into CustomFactionEvents
This commit is contained in:
commit
e2f0d049f9
@ -135,11 +135,11 @@ public class Conf
|
|||||||
public static int actionDeniedPainAmount = 2;
|
public static int actionDeniedPainAmount = 2;
|
||||||
|
|
||||||
// commands which will be prevented if the player is a member of a permanent faction
|
// commands which will be prevented if the player is a member of a permanent faction
|
||||||
public static Set<String> permanentFactionMemberDenyCommands = new HashSet<String>();
|
public static Set<String> permanentFactionMemberDenyCommands = new LinkedHashSet<String>();
|
||||||
|
|
||||||
// commands which will be prevented when in claimed territory of another faction
|
// commands which will be prevented when in claimed territory of another faction
|
||||||
public static Set<String> territoryNeutralDenyCommands = new HashSet<String>();
|
public static Set<String> territoryNeutralDenyCommands = new LinkedHashSet<String>();
|
||||||
public static Set<String> territoryEnemyDenyCommands = new HashSet<String>();
|
public static Set<String> territoryEnemyDenyCommands = new LinkedHashSet<String>();
|
||||||
|
|
||||||
public static double territoryShieldFactor = 0.3;
|
public static double territoryShieldFactor = 0.3;
|
||||||
|
|
||||||
@ -211,12 +211,15 @@ public class Conf
|
|||||||
//public static boolean bankMembersCanWithdraw = false; //Have to be at least moderator to withdraw or pay money to another faction
|
//public static boolean bankMembersCanWithdraw = false; //Have to be at least moderator to withdraw or pay money to another faction
|
||||||
public static boolean bankFactionPaysCosts = true; //The faction pays for faction command costs, such as sethome
|
public static boolean bankFactionPaysCosts = true; //The faction pays for faction command costs, such as sethome
|
||||||
public static boolean bankFactionPaysLandCosts = true; //The faction pays for land claiming costs.
|
public static boolean bankFactionPaysLandCosts = true; //The faction pays for land claiming costs.
|
||||||
|
|
||||||
public static Set<String> worldsNoClaiming = new HashSet<String>();
|
// mainly for other plugins/mods that use a fake player to take actions, which shouldn't be subject to our protections
|
||||||
public static Set<String> worldsNoPowerLoss = new HashSet<String>();
|
public static Set<String> playersWhoBypassAllProtection = new LinkedHashSet<String>();
|
||||||
public static Set<String> worldsIgnorePvP = new HashSet<String>();
|
|
||||||
|
public static Set<String> worldsNoClaiming = new LinkedHashSet<String>();
|
||||||
|
public static Set<String> worldsNoPowerLoss = new LinkedHashSet<String>();
|
||||||
|
public static Set<String> worldsIgnorePvP = new LinkedHashSet<String>();
|
||||||
// TODO: A better solution Would be to have One wilderness faction per world.
|
// TODO: A better solution Would be to have One wilderness faction per world.
|
||||||
//public static Set<String> worldsNoWildernessProtection = new HashSet<String>();
|
//public static Set<String> worldsNoWildernessProtection = new LinkedHashSet<String>();
|
||||||
|
|
||||||
public static transient int mapHeight = 8;
|
public static transient int mapHeight = 8;
|
||||||
public static transient int mapWidth = 39;
|
public static transient int mapWidth = 39;
|
||||||
|
@ -648,7 +648,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
|||||||
{
|
{
|
||||||
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
|
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
|
||||||
|
|
||||||
if (Conf.econClaimUnconnectedFee != 0.0 && forFaction.getLandRoundedInWorld(flocation.getWorldName()) > 0 && !Board.isConnectedLocation(flocation, currentFaction))
|
if (Conf.econClaimUnconnectedFee != 0.0 && forFaction.getLandRoundedInWorld(flocation.getWorldName()) > 0 && !Board.isConnectedLocation(flocation, forFaction))
|
||||||
cost += Conf.econClaimUnconnectedFee;
|
cost += Conf.econClaimUnconnectedFee;
|
||||||
|
|
||||||
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts && this.hasFaction())
|
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts && this.hasFaction())
|
||||||
|
@ -59,8 +59,10 @@ public class FactionsBlockListener implements Listener
|
|||||||
|
|
||||||
public static boolean playerCanBuildDestroyBlock(Player player, Block block, String action, boolean justCheck)
|
public static boolean playerCanBuildDestroyBlock(Player player, Block block, String action, boolean justCheck)
|
||||||
{
|
{
|
||||||
FPlayer me = FPlayers.i.get(player);
|
String name = player.getName();
|
||||||
|
if (Conf.playersWhoBypassAllProtection.contains(name)) return true;
|
||||||
|
|
||||||
|
FPlayer me = FPlayers.i.get(name);
|
||||||
if (me.hasAdminMode()) return true;
|
if (me.hasAdminMode()) return true;
|
||||||
|
|
||||||
Location location = block.getLocation();
|
Location location = block.getLocation();
|
||||||
|
@ -222,7 +222,9 @@ public class FactionsEntityListener implements Listener
|
|||||||
|
|
||||||
if (attacker == null || attacker.getPlayer() == null)
|
if (attacker == null || attacker.getPlayer() == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (Conf.playersWhoBypassAllProtection.contains(attacker.getName())) return true;
|
||||||
|
|
||||||
if (attacker.hasLoginPvpDisabled())
|
if (attacker.hasLoginPvpDisabled())
|
||||||
{
|
{
|
||||||
if (notify) attacker.msg("<i>You can't hurt other players for " + Conf.noPVPDamageToOthersForXSecondsAfterLogin + " seconds after logging in.");
|
if (notify) attacker.msg("<i>You can't hurt other players for " + Conf.noPVPDamageToOthersForXSecondsAfterLogin + " seconds after logging in.");
|
||||||
|
@ -33,9 +33,6 @@ import com.massivecraft.factions.struct.FPerm;
|
|||||||
import com.massivecraft.factions.struct.Rel;
|
import com.massivecraft.factions.struct.Rel;
|
||||||
import com.massivecraft.factions.util.VisualizeUtil;
|
import com.massivecraft.factions.util.VisualizeUtil;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class FactionsPlayerListener implements Listener
|
public class FactionsPlayerListener implements Listener
|
||||||
{
|
{
|
||||||
@ -170,14 +167,20 @@ public class FactionsPlayerListener implements Listener
|
|||||||
// TODO: Possibly incorporate pain build...
|
// TODO: Possibly incorporate pain build...
|
||||||
public static boolean playerCanUseItemHere(Player player, Location loc, Material material, boolean justCheck)
|
public static boolean playerCanUseItemHere(Player player, Location loc, Material material, boolean justCheck)
|
||||||
{
|
{
|
||||||
FPlayer me = FPlayers.i.get(player);
|
String name = player.getName();
|
||||||
|
if (Conf.playersWhoBypassAllProtection.contains(name)) return true;
|
||||||
|
|
||||||
|
FPlayer me = FPlayers.i.get(name);
|
||||||
if (me.hasAdminMode()) return true;
|
if (me.hasAdminMode()) return true;
|
||||||
if (Conf.materialsEditTools.contains(material) && ! FPerm.BUILD.has(me, loc, ! justCheck)) return false;
|
if (Conf.materialsEditTools.contains(material) && ! FPerm.BUILD.has(me, loc, ! justCheck)) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public static boolean canPlayerUseBlock(Player player, Block block, boolean justCheck)
|
public static boolean canPlayerUseBlock(Player player, Block block, boolean justCheck)
|
||||||
{
|
{
|
||||||
FPlayer me = FPlayers.i.get(player);
|
String name = player.getName();
|
||||||
|
if (Conf.playersWhoBypassAllProtection.contains(name)) return true;
|
||||||
|
|
||||||
|
FPlayer me = FPlayers.i.get(name);
|
||||||
if (me.hasAdminMode()) return true;
|
if (me.hasAdminMode()) return true;
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Material material = block.getType();
|
Material material = block.getType();
|
||||||
|
Loading…
Reference in New Issue
Block a user