geforkt von Mirrors/Paper
[Bleeding] Fix some return types that could lead to ArrayStoreException
Dieser Commit ist enthalten in:
Ursprung
b9a71db046
Commit
288662bfae
@ -41,8 +41,8 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftItemStack[] getContents() {
|
public ItemStack[] getContents() {
|
||||||
CraftItemStack[] items = new CraftItemStack[getSize()];
|
ItemStack[] items = new ItemStack[getSize()];
|
||||||
net.minecraft.server.ItemStack[] mcResultItems = getResultInventory().getContents();
|
net.minecraft.server.ItemStack[] mcResultItems = getResultInventory().getContents();
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -85,7 +85,7 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack[] getMatrix() {
|
public ItemStack[] getMatrix() {
|
||||||
CraftItemStack[] items = new CraftItemStack[getSize()];
|
ItemStack[] items = new ItemStack[getSize()];
|
||||||
net.minecraft.server.ItemStack[] matrix = getMatrixInventory().getContents();
|
net.minecraft.server.ItemStack[] matrix = getMatrixInventory().getContents();
|
||||||
|
|
||||||
for (int i = 0; i < matrix.length; i++ ) {
|
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);
|
setItem(getSize() + 0, boots);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CraftItemStack[] getArmorContents() {
|
public ItemStack[] getArmorContents() {
|
||||||
net.minecraft.server.ItemStack[] mcItems = getInventory().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++) {
|
for (int i = 0; i < mcItems.length; i++) {
|
||||||
ret[i] = new CraftItemStack(mcItems[i]);
|
ret[i] = new CraftItemStack(mcItems[i]);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren