mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Fix bug where teleport location was never reset if warmup was set to 0
for Chimera Wing. Fixes #1323
This commit is contained in:
		@@ -29,8 +29,6 @@ public class ChimaeraWingWarmup extends BukkitRunnable {
 | 
				
			|||||||
        Player player = mcMMOPlayer.getPlayer();
 | 
					        Player player = mcMMOPlayer.getPlayer();
 | 
				
			||||||
        Location previousLocation = mcMMOPlayer.getTeleportCommenceLocation();
 | 
					        Location previousLocation = mcMMOPlayer.getTeleportCommenceLocation();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        mcMMOPlayer.setTeleportCommenceLocation(null);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (player.getLocation().distanceSquared(previousLocation) > 1.0 || !player.getInventory().containsAtLeast(ChimaeraWing.getChimaeraWing(0), 1)) {
 | 
					        if (player.getLocation().distanceSquared(previousLocation) > 1.0 || !player.getInventory().containsAtLeast(ChimaeraWing.getChimaeraWing(0), 1)) {
 | 
				
			||||||
            player.sendMessage(LocaleLoader.getString("Teleport.Cancelled"));
 | 
					            player.sendMessage(LocaleLoader.getString("Teleport.Cancelled"));
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -133,6 +133,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
        player.setItemInHand(new ItemStack(getChimaeraWing(player.getItemInHand().getAmount() - Config.getInstance().getChimaeraUseCost())));
 | 
					        player.setItemInHand(new ItemStack(getChimaeraWing(player.getItemInHand().getAmount() - Config.getInstance().getChimaeraUseCost())));
 | 
				
			||||||
        player.updateInventory();
 | 
					        player.updateInventory();
 | 
				
			||||||
        mcMMOPlayer.actualizeChimeraWingLastUse();
 | 
					        mcMMOPlayer.actualizeChimeraWingLastUse();
 | 
				
			||||||
 | 
					        mcMMOPlayer.setTeleportCommenceLocation(null);
 | 
				
			||||||
        if (Config.getInstance().getStatsTrackingEnabled()) {
 | 
					        if (Config.getInstance().getStatsTrackingEnabled()) {
 | 
				
			||||||
            MetricsManager.chimeraWingUsed();
 | 
					            MetricsManager.chimeraWingUsed();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user