mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Fix a potential issue with PTP and Chimera Wing teleportation cooldowns.
This commit is contained in:
@ -63,7 +63,7 @@ public final class ChimaeraWing {
|
||||
return;
|
||||
}
|
||||
|
||||
long lastTeleport = mcMMOPlayer.getLastTeleport();
|
||||
long lastTeleport = mcMMOPlayer.getChimeraWingLastUse();
|
||||
int cooldown = Config.getInstance().getChimaeraCooldown();
|
||||
|
||||
if (cooldown > 0 ) {
|
||||
@ -96,7 +96,7 @@ public final class ChimaeraWing {
|
||||
player.updateInventory();
|
||||
player.setVelocity(new Vector(0, 0.5D, 0));
|
||||
CombatUtils.dealDamage(player, Misc.getRandom().nextInt((int) (player.getHealth() - 10)));
|
||||
mcMMOPlayer.actualizeLastTeleport();
|
||||
mcMMOPlayer.actualizeChimeraWingLastUse();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -132,7 +132,7 @@ public final class ChimaeraWing {
|
||||
|
||||
player.setItemInHand(new ItemStack(getChimaeraWing(player.getItemInHand().getAmount() - Config.getInstance().getChimaeraUseCost())));
|
||||
player.updateInventory();
|
||||
mcMMOPlayer.actualizeLastTeleport();
|
||||
mcMMOPlayer.actualizeChimeraWingLastUse();
|
||||
if (Config.getInstance().getStatsTrackingEnabled()) {
|
||||
MetricsManager.chimeraWingUsed();
|
||||
}
|
||||
|
Reference in New Issue
Block a user