Added getContents() to IInventory and implemented it.
Implemented Inventory and PlayerInventory and updated StorageMinecart and Slot. Added getMaxStackSize to CraftItemStack.
This commit is contained in:
25
src/main/java/org/bukkit/craftbukkit/CraftSlot.java
Normal file
25
src/main/java/org/bukkit/craftbukkit/CraftSlot.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package org.bukkit.craftbukkit;
|
||||
|
||||
import org.bukkit.Inventory;
|
||||
import org.bukkit.ItemStack;
|
||||
import net.minecraft.server.Slot;
|
||||
|
||||
public class CraftSlot implements org.bukkit.Slot {
|
||||
private final Slot slot;
|
||||
|
||||
public CraftSlot(Slot slot) {
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return new CraftInventory( slot.b );
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return slot.a;
|
||||
}
|
||||
|
||||
public ItemStack getItem() {
|
||||
return new CraftItemStack( slot.c() );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user