Minor touches to player defaults.
This commit is contained in:
parent
0eb121c444
commit
6846c426c4
@ -104,16 +104,13 @@ public class Factions extends MPlugin
|
|||||||
// TODO: Perhaps this should be placed in the econ integration somewhere?
|
// TODO: Perhaps this should be placed in the econ integration somewhere?
|
||||||
MUtil.registerExtractor(String.class, "accountId", ExtractorFactionAccountId.get());
|
MUtil.registerExtractor(String.class, "accountId", ExtractorFactionAccountId.get());
|
||||||
|
|
||||||
// Initialize Collections
|
// Initialize Database
|
||||||
this.databaseInitialized = false;
|
this.databaseInitialized = false;
|
||||||
|
|
||||||
MConfColl.get().init();
|
MConfColl.get().init();
|
||||||
UPlayerColls.get().init();
|
UPlayerColls.get().init();
|
||||||
FactionColls.get().init();
|
FactionColls.get().init();
|
||||||
BoardColls.get().init();
|
BoardColls.get().init();
|
||||||
|
|
||||||
FactionColls.get().reindexUPlayers();
|
FactionColls.get().reindexUPlayers();
|
||||||
|
|
||||||
this.databaseInitialized = true;
|
this.databaseInitialized = true;
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
|
@ -20,6 +20,7 @@ public class ChatTagTitle extends ChatTagAbstract
|
|||||||
@Override
|
@Override
|
||||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||||
{
|
{
|
||||||
|
if (!fsender.hasTitle()) return "";
|
||||||
return fsender.getTitle();
|
return fsender.getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,13 +36,24 @@ public class UConf extends Entity<UConf>
|
|||||||
// DEFAULTS
|
// DEFAULTS
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public String defaultPlayerFactionId = this.factionIdNone;
|
public String defaultPlayerFactionId = factionIdNone;
|
||||||
public double defaultPlayerPower = 0.0;
|
|
||||||
public Rel defaultPlayerRole = Rel.RECRUIT;
|
public Rel defaultPlayerRole = Rel.RECRUIT;
|
||||||
|
public double defaultPlayerPower = 0.0;
|
||||||
|
|
||||||
public boolean defaultFactionOpen = false;
|
public boolean defaultFactionOpen = false;
|
||||||
public Map<FFlag, Boolean> defaultFactionFlags = FFlag.getDefaultDefaults();
|
public Map<FFlag, Boolean> defaultFactionFlags = FFlag.getDefaultDefaults();
|
||||||
public Map<FPerm, Set<Rel>> defaultFactionPerms = FPerm.getDefaultDefaults();
|
public Map<FPerm, Set<Rel>> defaultFactionPerms = FPerm.getDefaultDefaults();
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// POWER
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
public double powerMax = 10.0;
|
||||||
|
public double powerMin = 0.0;
|
||||||
|
public double powerPerHour = 2.0;
|
||||||
|
public double powerPerDeath = -2.0;
|
||||||
|
|
||||||
|
public boolean canLeaveWithNegativePower = true;
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CORE
|
// CORE
|
||||||
@ -55,32 +66,6 @@ public class UConf extends Entity<UConf>
|
|||||||
public int factionTagLengthMax = 10;
|
public int factionTagLengthMax = 10;
|
||||||
public boolean factionTagForceUpperCase = false;
|
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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// POWER
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
public double powerMax = 10.0;
|
|
||||||
public double powerMin = 0.0;
|
|
||||||
public double powerPerHour = 2.0;
|
|
||||||
public double powerPerDeath = -2.0;
|
|
||||||
|
|
||||||
public boolean canLeaveWithNegativePower = true;
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CLAIMS
|
// CLAIMS
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -106,6 +91,16 @@ public class UConf extends Entity<UConf>
|
|||||||
public double homesTeleportAllowedEnemyDistance = 32.0;
|
public double homesTeleportAllowedEnemyDistance = 32.0;
|
||||||
public boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
|
public boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// ASSORTED
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
public boolean permanentFactionsDisableLeaderPromotion = false;
|
||||||
|
public int actionDeniedPainAmount = 2;
|
||||||
|
public boolean disablePVPForFactionlessPlayers = false;
|
||||||
|
public boolean enablePVPAgainstFactionlessInAttackersLand = false;
|
||||||
|
public double territoryShieldFactor = 0.3;
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// DENY COMMANDS
|
// DENY COMMANDS
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -121,12 +116,6 @@ public class UConf extends Entity<UConf>
|
|||||||
Rel.ALLY, new ArrayList<String>(),
|
Rel.ALLY, new ArrayList<String>(),
|
||||||
Rel.MEMBER, new ArrayList<String>()
|
Rel.MEMBER, new ArrayList<String>()
|
||||||
);
|
);
|
||||||
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// INTEGRATION: WORLD GUARD
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
public boolean worldGuardChecking = false;
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INTEGRATION: LWC
|
// INTEGRATION: LWC
|
||||||
|
@ -69,27 +69,28 @@ public class UPlayer extends SenderEntity<UPlayer> implements EconomyParticipato
|
|||||||
|
|
||||||
// This is a foreign key.
|
// This is a foreign key.
|
||||||
// Each player belong to a faction.
|
// Each player belong to a faction.
|
||||||
// Null means default which is the no-faction faction called Wilderness.
|
// Null means default for the universe.
|
||||||
private String factionId = null;
|
private String factionId = null;
|
||||||
|
|
||||||
// What role does the player have in the faction?
|
// What role does the player have in the faction?
|
||||||
// Null means default which is the default value for the universe.
|
// Null means default for the universe.
|
||||||
private Rel role = null;
|
private Rel role = null;
|
||||||
|
|
||||||
// What title does the player have in the faction?
|
// What title does the player have in the faction?
|
||||||
// The title is just for fun. It's not connected to any game mechanic.
|
// The title is just for fun. It's not connected to any game mechanic.
|
||||||
// The default case is no title since it's what you start with and also the most common case.
|
|
||||||
// The player title is similar to the faction description.
|
// The player title is similar to the faction description.
|
||||||
//
|
//
|
||||||
// Question: Can the title contain chat colors?
|
// Question: Can the title contain chat colors?
|
||||||
// Answer: Yes but in such case the policy is that they already must be parsed using Txt.parse.
|
// Answer: Yes but in such case the policy is that they already must be parsed using Txt.parse.
|
||||||
// If the title contains raw markup, such as "<white>" instead of "§f" it will not be parsed and "<white>" will be displayed.
|
// If the title contains raw markup, such as "<white>" instead of "§f" it will not be parsed and "<white>" will be displayed.
|
||||||
|
//
|
||||||
|
// Null means the player has no title.
|
||||||
private String title = null;
|
private String title = null;
|
||||||
|
|
||||||
// Each player has an individual power level.
|
// Each player has an individual power level.
|
||||||
// The power level for online players is occasionally updated by a recurring task and the power should stay the same for offline players.
|
// The power level for online players is occasionally updated by a recurring task and the power should stay the same for offline players.
|
||||||
// For that reason the value is to be considered correct when you pick it. Do not call the power update method.
|
// For that reason the value is to be considered correct when you pick it. Do not call the power update method.
|
||||||
// Null means default which is the default value for the universe.
|
// Null means default for the universe.
|
||||||
private Double power = null;
|
private Double power = null;
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
Loading…
Reference in New Issue
Block a user