Update inventories after chimera wing

This commit is contained in:
T00thpick1 2013-05-19 16:13:19 -04:00
parent 3c3b4af2c4
commit 22f6ae858b

View File

@ -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();