Skip to content

Commit

Permalink
Inventory#removeItem rather than Inventory#remove.
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Jan 29, 2017
1 parent c75fe9f commit 87e1686
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -89,7 +89,7 @@ public boolean addToChest(Chest c, Block liquid) {


if (((Factory) getFactory()).buckets) { if (((Factory) getFactory()).buckets) {
if (c.getInventory().contains(Material.BUCKET)) { if (c.getInventory().contains(Material.BUCKET)) {
c.getInventory().remove(new ItemStack(Material.BUCKET)); c.getInventory().removeItem(new ItemStack(Material.BUCKET));
if (c.getInventory().addItem(new ItemStack(parse(liquid.getType()) == Material.LAVA ? Material.LAVA_BUCKET : Material.WATER_BUCKET, 1)).isEmpty()) { if (c.getInventory().addItem(new ItemStack(parse(liquid.getType()) == Material.LAVA ? Material.LAVA_BUCKET : Material.WATER_BUCKET, 1)).isEmpty()) {
return true; return true;
} else { } else {
Expand Down

0 comments on commit 87e1686

Please sign in to comment.