mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Make Acrobatics XP prevention cool down, after teleporting configurable
Adds #1906
This commit is contained in:
parent
862d38b587
commit
e1a8f02bce
@ -53,6 +53,7 @@ Version 1.4.08-dev
|
|||||||
! Changed config validation for UnlockLevels, they can now also be 0
|
! Changed config validation for UnlockLevels, they can now also be 0
|
||||||
! Changed config validation for Rank_Levels, successive Ranks can now be less than or equal to each other
|
! Changed config validation for Rank_Levels, successive Ranks can now be less than or equal to each other
|
||||||
! Changed default amount of XP gained from mining Quartz Ore. From 250 to 100 XP.
|
! Changed default amount of XP gained from mining Quartz Ore. From 250 to 100 XP.
|
||||||
|
! Changed Acrobatics config setting, Skills.Acrobatics.Prevent_XP_After_Teleport is now Skills.Acrobatics.XP_After_Teleport_Cooldown
|
||||||
- Removed /stats alias for /mcstats
|
- Removed /stats alias for /mcstats
|
||||||
|
|
||||||
Version 1.4.07
|
Version 1.4.07
|
||||||
|
@ -422,7 +422,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* Acrobatics */
|
/* Acrobatics */
|
||||||
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
||||||
public boolean getPreventXPAfterTeleport() { return config.getBoolean("Skills.Acrobatics.Prevent_XP_After_Teleport", true); }
|
public int getXPAfterTeleportCooldown() { return config.getInt("Skills.Acrobatics.XP_After_Teleport_Cooldown", 5); }
|
||||||
|
|
||||||
/* Alchemy */
|
/* Alchemy */
|
||||||
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
||||||
|
@ -255,7 +255,7 @@ public class EntityListener implements Listener {
|
|||||||
|
|
||||||
switch (cause) {
|
switch (cause) {
|
||||||
case FALL:
|
case FALL:
|
||||||
if (Config.getInstance().getPreventXPAfterTeleport() && SkillUtils.calculateTimeLeft((long) mcMMOPlayer.getTeleportATS() * Misc.TIME_CONVERSION_FACTOR, 5, player) > 0) {
|
if (!SkillUtils.cooldownExpired((long) mcMMOPlayer.getTeleportATS(), Config.getInstance().getXPAfterTeleportCooldown())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public class PlayerListener implements Listener {
|
|||||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
if (!UserManager.hasPlayerDataKey(player) || !Config.getInstance().getPreventXPAfterTeleport() || event.getFrom().equals(event.getTo())) {
|
if (!UserManager.hasPlayerDataKey(player) || Config.getInstance().getXPAfterTeleportCooldown() <= 0 || event.getFrom().equals(event.getTo())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +267,8 @@ Skills:
|
|||||||
Prevent_AFK_Leveling: true
|
Prevent_AFK_Leveling: true
|
||||||
Max_Tries_At_Same_Location: 3
|
Max_Tries_At_Same_Location: 3
|
||||||
Prevent_Dodge_Lightning: false
|
Prevent_Dodge_Lightning: false
|
||||||
Prevent_XP_After_Teleport: true
|
# Prevent earning Acrobatics XP a few seconds after teleporting
|
||||||
|
XP_After_Teleport_Cooldown: 5
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
Alchemy:
|
Alchemy:
|
||||||
# Allow Hoppers to transfer ingredients and brew Rank 1 Alchemy potions
|
# Allow Hoppers to transfer ingredients and brew Rank 1 Alchemy potions
|
||||||
|
Loading…
Reference in New Issue
Block a user