mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Party Config pt 4
This commit is contained in:
parent
82dec38e5c
commit
6be936972f
@ -25,6 +25,9 @@ public class ConfigParty {
|
||||
@Setting(value = "Party-XP", comment = "Settings related to leveling parties.")
|
||||
private ConfigSectionPartyXP partyXP = new ConfigSectionPartyXP();
|
||||
|
||||
@Setting(value = "Party-Commands", comment = "Settings related to various party commands.")
|
||||
private ConfigSectionPartyCommands partyCommands = new ConfigSectionPartyCommands();
|
||||
|
||||
public int getPartySizeLimit() {
|
||||
return partyGeneral.getPartySizeLimit();
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.gmail.nossr50.config.hocon.party;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigSectionPartyCommands {
|
||||
|
||||
public static final String HTTPS_MCMMO_ORG_WIKI_PERMISSIONS = "https://mcmmo.org/wiki/Permissions";
|
||||
|
||||
@Setting(value = "Party-Teleport-Command",
|
||||
comment = "This command allows party members to teleport to one another after a small delay." +
|
||||
"\nYou can disable this command by negating following permission node: mcmmo.commands.ptp" +
|
||||
"\nThere are many permission nodes related to PTP (Party-Teleport)" +
|
||||
"\nFor a list of permission nodes and a small description of what they do, checkout our wiki" +
|
||||
"\nwiki permission page - " + HTTPS_MCMMO_ORG_WIKI_PERMISSIONS)
|
||||
private ConfigSectionPartyTeleportCommand partyTeleportCommand = new ConfigSectionPartyTeleportCommand();
|
||||
|
||||
public ConfigSectionPartyTeleportCommand getPartyTeleportCommand() {
|
||||
return partyTeleportCommand;
|
||||
}
|
||||
}
|
@ -12,14 +12,27 @@ import java.util.Map;
|
||||
public class ConfigSectionPartyLevel {
|
||||
|
||||
private static final HashMap<PartyFeature, Integer> PARTY_FEATURE_MAP_DEFAULT;
|
||||
public static final boolean INFORM_PARTY_ON_LEVELUP_DEFAULT = true;
|
||||
|
||||
public static final boolean PARTY_LEVELING_NEEDS_NERBY_MEMBERS_DEFAULT = true;
|
||||
|
||||
public static final int TELEPORT_DEFAULT = 2;
|
||||
|
||||
public static final int ALLIANCE_DEFAULT = 5;
|
||||
|
||||
public static final int ITEM_SHARE_DEFAULT = 8;
|
||||
|
||||
public static final int XP_SHARE_DEFAULT = 10;
|
||||
|
||||
public static final int PARTY_CHAT_DEFAULT = 1;
|
||||
|
||||
static {
|
||||
PARTY_FEATURE_MAP_DEFAULT = new HashMap<>();
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.TELEPORT, 2);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.ALLIANCE, 5);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.ITEM_SHARE, 8);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.XP_SHARE, 10);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.CHAT, 1);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.TELEPORT, TELEPORT_DEFAULT);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.ALLIANCE, ALLIANCE_DEFAULT);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.ITEM_SHARE, ITEM_SHARE_DEFAULT);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.XP_SHARE, XP_SHARE_DEFAULT);
|
||||
PARTY_FEATURE_MAP_DEFAULT.put(PartyFeature.CHAT, PARTY_CHAT_DEFAULT);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -34,25 +47,36 @@ public class ConfigSectionPartyLevel {
|
||||
}
|
||||
*/
|
||||
|
||||
@Setting(value = "Party-XP-Formula-Multiplier",
|
||||
comment = "The Party XP Formula is borrowed from the Player XP formula to help determine the amount of XP needed to level the party." +
|
||||
"\nThe Party XP Formula used to be based on your settings for player XP formula but I have separated it from those settings." +
|
||||
"\nThe Party XP Curve Multiplier takes the final result of calculating one level of XP and multiplies it by this value to get the amount of XP needed to level the party." +
|
||||
"\nParty Leveling used to have a level cap, I have removed this level cap as part of a feature request. It seems fun to level up parties indefinitely." +
|
||||
"\nParty Leveling is now using exponential level scaling by default.")
|
||||
private int partyXpCurveMultiplier = 10;
|
||||
@Setting(value = "Party-XP-Formula-Parameters",
|
||||
comment = "The Party XP Formula is borrowed from the Player XP formula to help determine the amount of XP needed to level the party." +
|
||||
"\nThe Party XP Formula used to be based on your settings for player XP formula but I have separated it from those settings." +
|
||||
"\nThe Party XP Curve Multiplier takes the final result of calculating one level of XP and multiplies it by this value to get the amount of XP needed to level the party." +
|
||||
"\nParty Leveling used to have a level cap, I have removed this level cap as part of a feature request. It seems fun to level up parties indefinitely." +
|
||||
"\nParty Leveling is now using exponential level scaling by default.")
|
||||
private ConfigSectionPartyXPFormula partyXPFormula = new ConfigSectionPartyXPFormula();
|
||||
|
||||
@Setting(value = "Party-Leveling-Requires-Nearby-Party-Members")
|
||||
private boolean partyLevelingNeedsNearbyMembers = true;
|
||||
@Setting(value = "Party-Leveling-Requires-Nearby-Party-Members",
|
||||
comment = "If leveling your Party requires being near another party member." +
|
||||
"\nDefault value: "+PARTY_LEVELING_NEEDS_NERBY_MEMBERS_DEFAULT)
|
||||
private boolean partyLevelingNeedsNearbyMembers = PARTY_LEVELING_NEEDS_NERBY_MEMBERS_DEFAULT;
|
||||
|
||||
@Setting(value = "Send-Levelup-Notifications-To-Party")
|
||||
private boolean informPartyMembersOnLevelup = true;
|
||||
@Setting(value = "Send-Levelup-Notifications-To-Party",
|
||||
comment = "Sends level up notifications to nearby party members." +
|
||||
"\nDefault value: "+INFORM_PARTY_ON_LEVELUP_DEFAULT)
|
||||
private boolean informPartyMembersOnLevelup = INFORM_PARTY_ON_LEVELUP_DEFAULT;
|
||||
|
||||
@Setting(value = "Party-Feature-Unlock-Level-Requirements")
|
||||
@Setting(value = "Party-Feature-Unlock-Level-Requirements", comment = "What level your Party needs to be to unlock certain features." +
|
||||
"\nKeep in mind, parties no longer have a level cap." +
|
||||
"\n\nDefault values: " +
|
||||
"\nCHAT: "+PARTY_CHAT_DEFAULT +
|
||||
"\nTELEPORT: "+TELEPORT_DEFAULT +
|
||||
"\nALIANCE: "+ALLIANCE_DEFAULT +
|
||||
"\nITEM SHARE: "+ITEM_SHARE_DEFAULT +
|
||||
"\nXP SHARE: "+XP_SHARE_DEFAULT)
|
||||
private Map<PartyFeature, Integer> partyFeatureUnlockMap = PARTY_FEATURE_MAP_DEFAULT;
|
||||
|
||||
public int getPartyXpCurveMultiplier() {
|
||||
return partyXpCurveMultiplier;
|
||||
return partyXPFormula.getPartyXpCurveMultiplier();
|
||||
}
|
||||
|
||||
public boolean isPartyLevelingNeedsNearbyMembers() {
|
||||
|
@ -0,0 +1,67 @@
|
||||
package com.gmail.nossr50.config.hocon.party;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigSectionPartyTeleportCommand {
|
||||
|
||||
public static final int PTP_COOLDOWN_DEFAULT = 120;
|
||||
public static final int PTP_WARMUP_DEFAULT = 5;
|
||||
public static final int PTP_RECENTLY_HURT_COOLDOWN_DEFAULT = 60;
|
||||
public static final boolean PTP_ACCEPT_REQUIRED_DEFAULT = true;
|
||||
public static final int PTP_REQUEST_TIMEOUT = 300;
|
||||
public static final boolean PTP_WORLD_BASED_PERMISSIONS_DEFAULT = false;
|
||||
|
||||
@Setting(value = "PTP-Cooldown", comment = "How many seconds a player must wait between usages of PTP." +
|
||||
"\nDefault value: "+PTP_COOLDOWN_DEFAULT)
|
||||
private int ptpCooldown = PTP_COOLDOWN_DEFAULT;
|
||||
|
||||
@Setting(value = "PTP-Warmup", comment = "How many seconds a player must stand still for a PTP to be successful." +
|
||||
"\nDefault value: "+PTP_WARMUP_DEFAULT)
|
||||
private int ptpWarmup = PTP_WARMUP_DEFAULT;
|
||||
|
||||
@Setting(value = "PTP-Hurt-Cooldown", comment = "How many seconds a player must wait from last taking damage in order to use PTP." +
|
||||
"\nDefault value: "+PTP_RECENTLY_HURT_COOLDOWN_DEFAULT)
|
||||
private int ptpRecentlyHurtCooldown = PTP_RECENTLY_HURT_COOLDOWN_DEFAULT;
|
||||
|
||||
@Setting(value = "PTP-Requires-Accept", comment = "If a player tries to use PTP to another party member," +
|
||||
" that party member must then accept his request or the PTP will not execute." +
|
||||
"\nDefault value: "+PTP_ACCEPT_REQUIRED_DEFAULT)
|
||||
private boolean ptpAcceptRequired = PTP_ACCEPT_REQUIRED_DEFAULT;
|
||||
|
||||
@Setting(value = "PTP-Request-Timeout", comment = "How many seconds before a PTP request will become invalid." +
|
||||
"\nDefault value: "+PTP_REQUEST_TIMEOUT)
|
||||
private int ptpRequestTimeout = PTP_REQUEST_TIMEOUT;
|
||||
|
||||
@Setting(value = "PTP-Require-World-Based-Permissions", comment = "If true, players need to use a special permission node in order to use PTP on that world or to that world." +
|
||||
"\nExample: Pretend the world is named \"mouth-fedora-planet\"" +
|
||||
"\nThe permission node a player would need to use PTP for that world, would be..." +
|
||||
"\nRequired Permission Node Example: 'mcmmo.commands.ptp.world.mouth-fedora-planet'" +
|
||||
"\nNote: 'mcmmo.commands.ptp.world.*' would allow a player to use PTP on all worlds, to and from")
|
||||
private boolean ptpWorldBasedPermissions = PTP_WORLD_BASED_PERMISSIONS_DEFAULT;
|
||||
|
||||
public int getPtpCooldown() {
|
||||
return ptpCooldown;
|
||||
}
|
||||
|
||||
public int getPtpWarmup() {
|
||||
return ptpWarmup;
|
||||
}
|
||||
|
||||
public int getPtpRecentlyHurtCooldown() {
|
||||
return ptpRecentlyHurtCooldown;
|
||||
}
|
||||
|
||||
public boolean isPtpAcceptRequired() {
|
||||
return ptpAcceptRequired;
|
||||
}
|
||||
|
||||
public int getPtpRequestTimeout() {
|
||||
return ptpRequestTimeout;
|
||||
}
|
||||
|
||||
public boolean isPtpWorldBasedPermissions() {
|
||||
return ptpWorldBasedPermissions;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.gmail.nossr50.config.hocon.party;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigSectionPartyXPFormula {
|
||||
|
||||
public static final int PARTY_XP_CURVE_MULTIPLIER_DEFAULT = 10;
|
||||
|
||||
@Setting(value = "Party-XP-Formula-Multiplier",
|
||||
comment = "Crank this up to make it harder to level parties" +
|
||||
"\nDefault value: "+PARTY_XP_CURVE_MULTIPLIER_DEFAULT)
|
||||
private int partyXpCurveMultiplier = PARTY_XP_CURVE_MULTIPLIER_DEFAULT;
|
||||
|
||||
public int getPartyXpCurveMultiplier() {
|
||||
return partyXpCurveMultiplier;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user