Added config option for Acrobatics teleport cooldown,

also updated the changelog.
This commit is contained in:
TfT_02
2013-07-29 00:57:38 +02:00
parent ddcbe64db6
commit f5c58f3679
5 changed files with 6 additions and 2 deletions

View File

@ -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); }

View File

@ -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;
}

View File

@ -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;
}