diff --git a/Changelog.txt b/Changelog.txt index 23b430fd1..6ec057325 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -11,6 +11,7 @@ Version 1.4.07-dev + Added snow to excavation + Added new experience curve option. Cumulative curve, calculates experience needed for next level using power level. + Added extra settings to config.yml for Call of the Wild (Taming) + + Added a 5 cooldown after teleporting before Acrobatics XP can be earned. + Config option to disable = Fixed bug with Skull Splitter not finding the locale string = Fixed issue where locale strings could cause the scoreboard header to be longer than 16 characters. = Fixed a bug with Beast Lore when the entity had no owner but was tamed. diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index ac2f2e5ca..789f4e5b7 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -216,6 +216,7 @@ public class Config extends AutoUpdateConfigLoader { /* Acrobatics */ 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); } /* Fishing */ public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); } diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 732a491ae..8f6d11b1a 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -34,6 +34,7 @@ import org.bukkit.metadata.FixedMetadataValue; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.config.AdvancedConfig; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent; import com.gmail.nossr50.events.fake.FakeEntityDamageEvent; @@ -222,7 +223,7 @@ public class EntityListener implements Listener { switch (cause) { case FALL: - if (SkillUtils.calculateTimeLeft((long) mcMMOPlayer.getTeleportATS() * Misc.TIME_CONVERSION_FACTOR, 5, player) > 0) { + if (!Config.getInstance().getPreventXPAfterTeleport() || SkillUtils.calculateTimeLeft((long) mcMMOPlayer.getTeleportATS() * Misc.TIME_CONVERSION_FACTOR, 5, player) > 0) { return; } diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 3706199f9..ed127c09d 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -79,7 +79,7 @@ public class PlayerListener implements Listener { public void onPlayerTeleport(PlayerTeleportEvent event) { Player player = event.getPlayer(); - if (Misc.isNPCEntity(player)) { + if (Misc.isNPCEntity(player) || !Config.getInstance().getPreventXPAfterTeleport()) { return; } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 376789c96..8b687229c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -179,6 +179,7 @@ Skills: Enabled_For_PVE: true Prevent_AFK_Leveling: true Prevent_Dodge_Lightning: false + Prevent_XP_After_Teleport: true Level_Cap: 0 Archery: Enabled_For_PVP: true