Generic cleanup of the org.bukkit.craftbukkit classes.
This commit is contained in:
@@ -270,7 +270,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
||||
}
|
||||
|
||||
public HashMap<Integer, ItemStack> removeItem(ItemStack... items) {
|
||||
HashMap<Integer,ItemStack> leftover = new HashMap<Integer,ItemStack>();
|
||||
HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
|
||||
|
||||
// TODO: optimization
|
||||
|
||||
|
||||
@@ -73,16 +73,17 @@ public class CraftInventoryPlayer extends CraftInventory implements PlayerInvent
|
||||
}
|
||||
|
||||
public void setArmorContents(ItemStack[] items) {
|
||||
int cnt = getSize();
|
||||
if (items == null) {
|
||||
items = new ItemStack[4];
|
||||
}
|
||||
for (ItemStack item : items) {
|
||||
if (item == null || item.getTypeId() == 0) {
|
||||
clear(cnt++);
|
||||
} else {
|
||||
setItem(cnt++, item);
|
||||
}
|
||||
}
|
||||
int cnt = getSize();
|
||||
|
||||
if (items == null) {
|
||||
items = new ItemStack[4];
|
||||
}
|
||||
for (ItemStack item : items) {
|
||||
if (item == null || item.getTypeId() == 0) {
|
||||
clear(cnt++);
|
||||
} else {
|
||||
setItem(cnt++, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user