mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2024-11-22 11:35:16 +01:00
Fixed Barrel Dupe Bug
This commit is contained in:
parent
71a8a66d64
commit
471392dc68
@ -3,6 +3,7 @@ package com.dre.brewery;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
@ -129,6 +130,9 @@ public class Barrel {
|
||||
// removes a barrel, throwing included potions to the ground
|
||||
public void remove(Block broken) {
|
||||
if (inventory != null) {
|
||||
for (HumanEntity human : inventory.getViewers()) {
|
||||
human.closeInventory();
|
||||
}
|
||||
ItemStack[] items = inventory.getContents();
|
||||
for (ItemStack item : items) {
|
||||
if (item != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user