mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
[Bleeding] Fix some return types that could lead to ArrayStoreException
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
parent
1a5043d05d
commit
b350a11bc0
2 changed files with 5 additions and 5 deletions
|
@ -41,8 +41,8 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
|
|||
}
|
||||
|
||||
@Override
|
||||
public CraftItemStack[] getContents() {
|
||||
CraftItemStack[] items = new CraftItemStack[getSize()];
|
||||
public ItemStack[] getContents() {
|
||||
ItemStack[] items = new ItemStack[getSize()];
|
||||
net.minecraft.server.ItemStack[] mcResultItems = getResultInventory().getContents();
|
||||
|
||||
int i = 0;
|
||||
|
@ -85,7 +85,7 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
|
|||
}
|
||||
|
||||
public ItemStack[] getMatrix() {
|
||||
CraftItemStack[] items = new CraftItemStack[getSize()];
|
||||
ItemStack[] items = new ItemStack[getSize()];
|
||||
net.minecraft.server.ItemStack[] matrix = getMatrixInventory().getContents();
|
||||
|
||||
for (int i = 0; i < matrix.length; i++ ) {
|
||||
|
|
|
@ -64,9 +64,9 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
|
|||
setItem(getSize() + 0, boots);
|
||||
}
|
||||
|
||||
public CraftItemStack[] getArmorContents() {
|
||||
public ItemStack[] getArmorContents() {
|
||||
net.minecraft.server.ItemStack[] mcItems = getInventory().getArmorContents();
|
||||
CraftItemStack[] ret = new CraftItemStack[mcItems.length];
|
||||
ItemStack[] ret = new ItemStack[mcItems.length];
|
||||
|
||||
for (int i = 0; i < mcItems.length; i++) {
|
||||
ret[i] = new CraftItemStack(mcItems[i]);
|
||||
|
|
Loading…
Reference in a new issue