diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-15 21:27:29 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-15 21:27:29 +0000 |
commit | 6b9ad41a05410434394a2b21ddf589bdaf4fba9a (patch) | |
tree | 23826bf0a5a8959b91775265d4862963cb4ed37e /src/main | |
parent | 9150e8d85d50a6d634c5683bd5a1763ca07801d0 (diff) | |
download | craftbukkit-6b9ad41a05410434394a2b21ddf589bdaf4fba9a.tar craftbukkit-6b9ad41a05410434394a2b21ddf589bdaf4fba9a.tar.gz craftbukkit-6b9ad41a05410434394a2b21ddf589bdaf4fba9a.tar.lz craftbukkit-6b9ad41a05410434394a2b21ddf589bdaf4fba9a.tar.xz craftbukkit-6b9ad41a05410434394a2b21ddf589bdaf4fba9a.zip |
All inventory stuff in org.bukkit moved to org.bukkit.inventory
Diffstat (limited to 'src/main')
8 files changed, 99 insertions, 99 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/CraftInventory.java index 66a77fd8..913e96bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftInventory.java @@ -4,10 +4,10 @@ import java.util.HashMap; import net.minecraft.server.IInventory; -import org.bukkit.ItemStack; +import org.bukkit.inventory.ItemStack; import org.bukkit.Material; -public class CraftInventory implements org.bukkit.Inventory { +public class CraftInventory implements org.bukkit.inventory.Inventory { protected IInventory inventory; public CraftInventory(IInventory inventory) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java index f8d74c94..9cb55fe7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java @@ -1,66 +1,66 @@ -package org.bukkit.craftbukkit;
-
-import net.minecraft.server.InventoryPlayer;
-
-import org.bukkit.ItemStack;
-import org.bukkit.PlayerInventory;
-
-public class CraftInventoryPlayer extends CraftInventory implements PlayerInventory {
- public CraftInventoryPlayer(net.minecraft.server.InventoryPlayer inventory) {
- super(inventory);
- }
-
- public InventoryPlayer getInventory() {
- return (InventoryPlayer) inventory;
- }
-
- public int getSize() {
- return super.getSize() - 4;
- }
-
- public CraftItemStack getItemInHand() {
- return new CraftItemStack( getInventory().e() );
- }
-
- public CraftItemStack getHelmet() {
- return getItem( getSize() + 0 );
- }
-
- public CraftItemStack getChestplate() {
- return getItem( getSize() + 1 );
- }
-
- public CraftItemStack getLeggings() {
- return getItem( getSize() + 2 );
- }
-
- public CraftItemStack getBoots() {
- return getItem( getSize() + 3 );
- }
-
- public void setHelmet(ItemStack helmet) {
- setItem( getSize() + 0, helmet );
- }
-
- public void setChestplate(ItemStack chestplate) {
- setItem( getSize() + 1, chestplate );
- }
-
- public void setLeggings(ItemStack leggings) {
- setItem( getSize() + 2, leggings );
- }
-
- public void setBoots(ItemStack boots) {
- setItem( getSize() + 3, boots );
- }
-
- public ItemStack[] getArmorContents() {
- net.minecraft.server.ItemStack[] mcItems = getInventory().getArmorContents();
- ItemStack[] ret = new ItemStack[mcItems.length];
-
- for (int i = 0; i < mcItems.length; i++ ) {
- ret[i] = new CraftItemStack(mcItems[i]);
- }
- return ret;
- }
-}
+package org.bukkit.craftbukkit; + +import net.minecraft.server.InventoryPlayer; + +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; + +public class CraftInventoryPlayer extends CraftInventory implements PlayerInventory { + public CraftInventoryPlayer(net.minecraft.server.InventoryPlayer inventory) { + super(inventory); + } + + public InventoryPlayer getInventory() { + return (InventoryPlayer) inventory; + } + + public int getSize() { + return super.getSize() - 4; + } + + public CraftItemStack getItemInHand() { + return new CraftItemStack( getInventory().e() ); + } + + public CraftItemStack getHelmet() { + return getItem( getSize() + 0 ); + } + + public CraftItemStack getChestplate() { + return getItem( getSize() + 1 ); + } + + public CraftItemStack getLeggings() { + return getItem( getSize() + 2 ); + } + + public CraftItemStack getBoots() { + return getItem( getSize() + 3 ); + } + + public void setHelmet(ItemStack helmet) { + setItem( getSize() + 0, helmet ); + } + + public void setChestplate(ItemStack chestplate) { + setItem( getSize() + 1, chestplate ); + } + + public void setLeggings(ItemStack leggings) { + setItem( getSize() + 2, leggings ); + } + + public void setBoots(ItemStack boots) { + setItem( getSize() + 3, boots ); + } + + public ItemStack[] getArmorContents() { + net.minecraft.server.ItemStack[] mcItems = getInventory().getArmorContents(); + ItemStack[] ret = new ItemStack[mcItems.length]; + + for (int i = 0; i < mcItems.length; i++ ) { + ret[i] = new CraftItemStack(mcItems[i]); + } + return ret; + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java index c1c4ebc2..c2b277da 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit; -import org.bukkit.ItemStack; +import org.bukkit.inventory.ItemStack; import org.bukkit.Material; public class CraftItemStack extends ItemStack { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSlot.java b/src/main/java/org/bukkit/craftbukkit/CraftSlot.java index 32b12b7a..3cd1edb3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSlot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSlot.java @@ -1,25 +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() );
- }
-}
+package org.bukkit.craftbukkit; + +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import net.minecraft.server.Slot; + +public class CraftSlot implements org.bukkit.inventory.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() ); + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 46d4eff5..aa646c10 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -34,7 +34,7 @@ import org.bukkit.Block; import org.bukkit.entity.Boat; import org.bukkit.Chunk; import org.bukkit.entity.ItemDrop; -import org.bukkit.ItemStack; +import org.bukkit.inventory.ItemStack; import org.bukkit.Location; import org.bukkit.entity.Minecart; import org.bukkit.entity.PoweredMinecart; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index d1a0afc7..4df63732 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -3,8 +3,8 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityPlayer; import org.bukkit.entity.HumanEntity; -import org.bukkit.ItemStack; -import org.bukkit.PlayerInventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; import org.bukkit.craftbukkit.CraftInventoryPlayer; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java index f8a54555..adf61041 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityItem; import org.bukkit.entity.ItemDrop; -import org.bukkit.ItemStack; +import org.bukkit.inventory.ItemStack; import org.bukkit.craftbukkit.CraftItemStack; import org.bukkit.craftbukkit.CraftServer; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java index 8e9d8f4d..af118dbd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityMinecart; -import org.bukkit.Inventory; +import org.bukkit.inventory.Inventory; import org.bukkit.craftbukkit.CraftInventory; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.StorageMinecart; |