mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Added config option for Acrobatics teleport cooldown,
also updated the changelog.
This commit is contained in:
@ -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); }
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user