From d1bf48ad796d6ea00b1bec80c9c0173006712314 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 30 Jul 2013 15:20:18 -0400 Subject: [PATCH] Fix bug where teleport location was never reset if warmup was set to 0 for Chimera Wing. Fixes #1323 --- .../com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java | 2 -- src/main/java/com/gmail/nossr50/util/ChimaeraWing.java | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java b/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java index 979434f52..c23e13b7c 100644 --- a/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java +++ b/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java @@ -29,8 +29,6 @@ public class ChimaeraWingWarmup extends BukkitRunnable { Player player = mcMMOPlayer.getPlayer(); Location previousLocation = mcMMOPlayer.getTeleportCommenceLocation(); - mcMMOPlayer.setTeleportCommenceLocation(null); - if (player.getLocation().distanceSquared(previousLocation) > 1.0 || !player.getInventory().containsAtLeast(ChimaeraWing.getChimaeraWing(0), 1)) { player.sendMessage(LocaleLoader.getString("Teleport.Cancelled")); return; diff --git a/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java b/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java index 9dfef7da6..494fe9964 100644 --- a/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java +++ b/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java @@ -133,6 +133,7 @@ public final class ChimaeraWing { player.setItemInHand(new ItemStack(getChimaeraWing(player.getItemInHand().getAmount() - Config.getInstance().getChimaeraUseCost()))); player.updateInventory(); mcMMOPlayer.actualizeChimeraWingLastUse(); + mcMMOPlayer.setTeleportCommenceLocation(null); if (Config.getInstance().getStatsTrackingEnabled()) { MetricsManager.chimeraWingUsed(); }