mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2025-01-03 13:38:21 +00:00
Fix barrel triggering AnyContainer (#108)
This commit is contained in:
parent
35839f1548
commit
f2e4c8a3ad
2 changed files with 6 additions and 1 deletions
|
@ -85,6 +85,10 @@ public class AnySilentContainer implements IAnySilentContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAnyContainerNeeded(@NotNull final Player p, @NotNull final org.bukkit.block.Block bukkitBlock) {
|
public boolean isAnyContainerNeeded(@NotNull final Player p, @NotNull final org.bukkit.block.Block bukkitBlock) {
|
||||||
|
if (bukkitBlock.getType() == Material.BARREL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
EntityPlayer player = PlayerDataManager.getHandle(p);
|
EntityPlayer player = PlayerDataManager.getHandle(p);
|
||||||
World world = player.world;
|
World world = player.world;
|
||||||
BlockPosition blockPosition = new BlockPosition(bukkitBlock.getX(), bukkitBlock.getY(), bukkitBlock.getZ());
|
BlockPosition blockPosition = new BlockPosition(bukkitBlock.getX(), bukkitBlock.getY(), bukkitBlock.getZ());
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
||||||
private boolean playerOnline;
|
private boolean playerOnline;
|
||||||
private EntityHuman player;
|
private EntityHuman player;
|
||||||
private NonNullList<ItemStack> items, armor, extraSlots;
|
private NonNullList<ItemStack> items, armor, extraSlots;
|
||||||
private final List<NonNullList<ItemStack>> f;
|
private List<NonNullList<ItemStack>> f;
|
||||||
|
|
||||||
public SpecialPlayerInventory(final Player bukkitPlayer, final Boolean online) {
|
public SpecialPlayerInventory(final Player bukkitPlayer, final Boolean online) {
|
||||||
super(PlayerDataManager.getHandle(bukkitPlayer));
|
super(PlayerDataManager.getHandle(bukkitPlayer));
|
||||||
|
@ -83,6 +83,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
||||||
this.items = this.player.inventory.items;
|
this.items = this.player.inventory.items;
|
||||||
this.armor = this.player.inventory.armor;
|
this.armor = this.player.inventory.armor;
|
||||||
this.extraSlots = this.player.inventory.extraSlots;
|
this.extraSlots = this.player.inventory.extraSlots;
|
||||||
|
this.f = ImmutableList.of(this.items, this.armor, this.extraSlots);
|
||||||
this.playerOnline = true;
|
this.playerOnline = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue