mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Configurable XP cooldowns for Roll
This commit is contained in:
parent
d4d8cbbc03
commit
579109b2f5
@ -9,6 +9,7 @@ public class ConfigSectionExploitAcrobatics {
|
|||||||
public static final int ACROBATIC_LOCATION_LIMIT_DEFAULT = 50;
|
public static final int ACROBATIC_LOCATION_LIMIT_DEFAULT = 50;
|
||||||
public static final boolean PREVENT_ACROBATICS_ABUSE_DEFAULT = true;
|
public static final boolean PREVENT_ACROBATICS_ABUSE_DEFAULT = true;
|
||||||
public static final int TELEPORT_COOLDOWN_DEFAULT = 30;
|
public static final int TELEPORT_COOLDOWN_DEFAULT = 30;
|
||||||
|
public static final int ROLL_XP_GAIN_CD_DEFAULT = 60;
|
||||||
|
|
||||||
@Setting(value = "Player-Fall-Location-Tracking",
|
@Setting(value = "Player-Fall-Location-Tracking",
|
||||||
comment = "The amount of locations to keep track of for player falls." +
|
comment = "The amount of locations to keep track of for player falls." +
|
||||||
@ -32,6 +33,15 @@ public class ConfigSectionExploitAcrobatics {
|
|||||||
"\nDefault value: "+TELEPORT_COOLDOWN_DEFAULT)
|
"\nDefault value: "+TELEPORT_COOLDOWN_DEFAULT)
|
||||||
private int teleportCooldownSeconds = TELEPORT_COOLDOWN_DEFAULT;
|
private int teleportCooldownSeconds = TELEPORT_COOLDOWN_DEFAULT;
|
||||||
|
|
||||||
|
@Setting(value = "Fall-Damage-XP-Gain-Cooldown-In-Seconds", comment = "Prevent players from gaining XP from fall damage if they had gained XP recently." +
|
||||||
|
"\nWhen players take fall damage again within this cooldown period the length of the cooldown is increased to discourage automated Roll XP farming." +
|
||||||
|
"\nDefault value: "+ROLL_XP_GAIN_CD_DEFAULT)
|
||||||
|
private int rollXPGainCooldownSeconds = ROLL_XP_GAIN_CD_DEFAULT;
|
||||||
|
|
||||||
|
public int getRollXPGainCooldownSeconds() {
|
||||||
|
return rollXPGainCooldownSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
public int getTeleportCooldownSeconds() {
|
public int getTeleportCooldownSeconds() {
|
||||||
return teleportCooldownSeconds;
|
return teleportCooldownSeconds;
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,11 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
|
|
||||||
public AcrobaticsManager(McMMOPlayer mcMMOPlayer) {
|
public AcrobaticsManager(McMMOPlayer mcMMOPlayer) {
|
||||||
super(mcMMOPlayer, PrimarySkillType.ACROBATICS);
|
super(mcMMOPlayer, PrimarySkillType.ACROBATICS);
|
||||||
|
rollXPInterval = (1000 * mcMMO.getConfigManager().getConfigExploitPrevention().getConfigSectionExploitAcrobatics().getRollXPGainCooldownSeconds());
|
||||||
}
|
}
|
||||||
|
|
||||||
private long rollXPCooldown = 0;
|
private long rollXPCooldown = 0;
|
||||||
private long rollXPInterval = (1000 * 60); //1 Minute
|
private long rollXPInterval; //1 Minute
|
||||||
private long rollXPIntervalLengthen = (1000 * 10); //10 Seconds
|
private long rollXPIntervalLengthen = (1000 * 10); //10 Seconds
|
||||||
|
|
||||||
public boolean canGainRollXP()
|
public boolean canGainRollXP()
|
||||||
|
Loading…
Reference in New Issue
Block a user