Move some more stuff from ConfServer --> UConf
This commit is contained in:
@ -10,7 +10,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import com.massivecraft.factions.ConfServer;
|
||||
import com.massivecraft.factions.Const;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.RelationParticipator;
|
||||
@ -112,7 +111,7 @@ public class Board extends Entity<Board> implements BoardInterface
|
||||
{
|
||||
// TODO: Listen to an event instead!
|
||||
// NOTE: And this is probably the place where the event should be triggered!
|
||||
if (ConfServer.onUnclaimResetLwcLocks && LWCFeatures.getEnabled())
|
||||
if (UConf.get(ps).onUnclaimResetLwcLocks && LWCFeatures.getEnabled())
|
||||
{
|
||||
LWCFeatures.clearAllProtections(ps);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.massivecraft.factions.ConfServer;
|
||||
import com.massivecraft.factions.Const;
|
||||
import com.massivecraft.factions.EconomyParticipator;
|
||||
import com.massivecraft.factions.FFlag;
|
||||
@ -791,7 +790,7 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
|
||||
public void promoteNewLeader()
|
||||
{
|
||||
if ( ! this.isNormal()) return;
|
||||
if (this.getFlag(FFlag.PERMANENT) && ConfServer.permanentFactionsDisableLeaderPromotion) return;
|
||||
if (this.getFlag(FFlag.PERMANENT) && UConf.get(this).permanentFactionsDisableLeaderPromotion) return;
|
||||
|
||||
UPlayer oldLeader = this.getLeader();
|
||||
|
||||
|
@ -26,9 +26,7 @@ public class UConf extends Entity<UConf>
|
||||
// -------------------------------------------- //
|
||||
// CORE
|
||||
// -------------------------------------------- //
|
||||
|
||||
public boolean canLeaveWithNegativePower = true;
|
||||
|
||||
|
||||
public int factionMemberLimit = 0;
|
||||
public double factionPowerMax = 1000.0;
|
||||
|
||||
@ -36,6 +34,19 @@ public class UConf extends Entity<UConf>
|
||||
public int factionTagLengthMax = 10;
|
||||
public boolean factionTagForceUpperCase = false;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// ASSORTED
|
||||
// -------------------------------------------- //
|
||||
|
||||
public boolean permanentFactionsDisableLeaderPromotion = false;
|
||||
|
||||
public int actionDeniedPainAmount = 2;
|
||||
|
||||
public boolean disablePVPForFactionlessPlayers = false;
|
||||
public boolean enablePVPAgainstFactionlessInAttackersLand = false;
|
||||
|
||||
public double territoryShieldFactor = 0.3;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// DEFAULTS
|
||||
// -------------------------------------------- //
|
||||
@ -60,6 +71,8 @@ public class UConf extends Entity<UConf>
|
||||
public double powerPerHour = 2.0;
|
||||
public double powerPerDeath = -2.0;
|
||||
|
||||
public boolean canLeaveWithNegativePower = true;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// HOMES
|
||||
// -------------------------------------------- //
|
||||
@ -88,4 +101,11 @@ public class UConf extends Entity<UConf>
|
||||
Rel.MEMBER, new ArrayList<String>()
|
||||
);
|
||||
|
||||
// -------------------------------------------- //
|
||||
// INTEGRATION: LWC
|
||||
// -------------------------------------------- //
|
||||
|
||||
public boolean onUnclaimResetLwcLocks = false;
|
||||
public boolean onCaptureResetLwcLocks = false;
|
||||
|
||||
}
|
||||
|
@ -660,7 +660,7 @@ public class UPlayer extends SenderEntity<UPlayer> implements EconomyParticipato
|
||||
if (Econ.payForAction(cost, this, "claim this land")) return false;
|
||||
|
||||
// TODO: The LWC integration should listen to Monitor for the claim event.
|
||||
if (LWCFeatures.getEnabled() && forFaction.isNormal() && ConfServer.onCaptureResetLwcLocks)
|
||||
if (LWCFeatures.getEnabled() && forFaction.isNormal() && UConf.get(forFaction).onCaptureResetLwcLocks)
|
||||
{
|
||||
LWCFeatures.clearOtherProtections(psChunk, this.getFaction());
|
||||
}
|
||||
|
Reference in New Issue
Block a user