mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
62 lines
1.9 KiB
Diff
62 lines
1.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/inventory/InventoryBasic.java
|
|
+++ ../src-work/minecraft/net/minecraft/inventory/InventoryBasic.java
|
|
@@ -10,6 +10,9 @@
|
|
import net.minecraft.util.text.TextComponentTranslation;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
+import org.bukkit.Location;
|
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
|
+import org.bukkit.entity.HumanEntity;
|
|
|
|
public class InventoryBasic implements IInventory
|
|
{
|
|
@@ -19,8 +22,48 @@
|
|
private List<IInventoryChangedListener> changeListeners;
|
|
private boolean hasCustomName;
|
|
|
|
+ // CraftBukkit start - add fields and methods
|
|
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
|
+ private int maxStack = MAX_STACK;
|
|
+ protected org.bukkit.inventory.InventoryHolder bukkitOwner;
|
|
+
|
|
+ public List<ItemStack> getContents() {
|
|
+ return this.inventoryContents;
|
|
+ }
|
|
+
|
|
+ public void onOpen(CraftHumanEntity who) {
|
|
+ transaction.add(who);
|
|
+ }
|
|
+
|
|
+ public void onClose(CraftHumanEntity who) {
|
|
+ transaction.remove(who);
|
|
+ }
|
|
+
|
|
+ public List<HumanEntity> getViewers() {
|
|
+ return transaction;
|
|
+ }
|
|
+
|
|
+ public void setMaxStackSize(int i) {
|
|
+ maxStack = i;
|
|
+ }
|
|
+
|
|
+ public org.bukkit.inventory.InventoryHolder getOwner() {
|
|
+ return bukkitOwner;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Location getLocation() {
|
|
+ return null;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public InventoryBasic(String title, boolean customName, int slotCount)
|
|
{
|
|
+ this(title, customName, slotCount, null);
|
|
+ }
|
|
+
|
|
+ public InventoryBasic(String title, boolean customName, int slotCount, org.bukkit.inventory.InventoryHolder owner) {
|
|
+ this.bukkitOwner = owner;
|
|
this.inventoryTitle = title;
|
|
this.hasCustomName = customName;
|
|
this.slotsCount = slotCount;
|