Added back updateInventory() methods.

Even though I updated old inventory methods it still needs these to
reflect the amounts removed...
This commit is contained in:
GJ 2012-02-25 21:42:03 -05:00
parent df92c43578
commit 6b36a030f6
2 changed files with 5 additions and 3 deletions

View File

@ -239,14 +239,13 @@ public class mcPlayerListener implements Listener
{
Repair.repairCheck(player, is, event.getClickedBlock());
event.setCancelled(true);
// player.updateInventory();
player.updateInventory();
}
if(LoadProperties.enableAbilities && m.abilityBlockCheck(block))
{
if(block != null && m.isHoe(player.getItemInHand()) && block.getTypeId() != 3 && block.getTypeId() != 2 && block.getTypeId() != 60){
if(block != null && m.isHoe(player.getItemInHand()) && block.getTypeId() != 3 && block.getTypeId() != 2 && block.getTypeId() != 60)
Skills.hoeReadinessCheck(player);
}
Skills.abilityActivationCheck(player);
}
@ -257,6 +256,7 @@ public class mcPlayerListener implements Listener
if(inventory.contains(Material.SEEDS))
{
inventory.removeItem(new ItemStack(Material.SEEDS, 1));
player.updateInventory();
if(block.getType() == Material.DIRT || block.getType() == Material.COBBLESTONE || block.getType() == Material.SMOOTH_BRICK)
{

View File

@ -78,6 +78,7 @@ public class Herbalism
if(hasSeeds && block.getType() != Material.WHEAT)
{
inventory.removeItem(new ItemStack(Material.SEEDS, 1));
player.updateInventory();
if(LoadProperties.enableSmoothToMossy && block.getType() == Material.SMOOTH_BRICK)
block.setData((byte)1);
if(LoadProperties.enableDirtToGrass && block.getType() == Material.DIRT)
@ -167,6 +168,7 @@ public class Herbalism
}, 1);
inventory.removeItem(new ItemStack(Material.SEEDS, 1));
player.updateInventory();
}
}