mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Update inventories after chimera wing
This commit is contained in:
parent
3c3b4af2c4
commit
22f6ae858b
@ -78,6 +78,7 @@ public final class ChimaeraWing {
|
|||||||
if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
|
if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
|
||||||
player.setItemInHand(new ItemStack(getChimaeraWing(amount - Config.getInstance().getChimaeraUseCost())));
|
player.setItemInHand(new ItemStack(getChimaeraWing(amount - Config.getInstance().getChimaeraUseCost())));
|
||||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
|
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
|
||||||
|
player.updateInventory();
|
||||||
player.setVelocity(new Vector(0, 0.5D, 0));
|
player.setVelocity(new Vector(0, 0.5D, 0));
|
||||||
CombatUtils.dealDamage(player, Misc.getRandom().nextInt(player.getHealth() - 10));
|
CombatUtils.dealDamage(player, Misc.getRandom().nextInt(player.getHealth() - 10));
|
||||||
mcMMOPlayer.actualizeLastTeleport();
|
mcMMOPlayer.actualizeLastTeleport();
|
||||||
@ -115,6 +116,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();
|
||||||
UserManager.getPlayer(player).actualizeLastTeleport();
|
UserManager.getPlayer(player).actualizeLastTeleport();
|
||||||
if (Config.getInstance().getStatsTrackingEnabled()) {
|
if (Config.getInstance().getStatsTrackingEnabled()) {
|
||||||
MetricsManager.chimeraWingUsed();
|
MetricsManager.chimeraWingUsed();
|
||||||
|
Loading…
Reference in New Issue
Block a user