mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
Deprecate and stop using Java15Compat class.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
f54537460b
commit
bd38417962
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
||||||
package org.bukkit.craftbukkit.inventory;
|
package org.bukkit.craftbukkit.inventory;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import net.minecraft.server.IRecipe;
|
import net.minecraft.server.IRecipe;
|
||||||
import net.minecraft.server.IInventory;
|
import net.minecraft.server.IInventory;
|
||||||
import net.minecraft.server.InventoryCrafting;
|
import net.minecraft.server.InventoryCrafting;
|
||||||
|
@ -7,7 +9,6 @@ import net.minecraft.server.InventoryCrafting;
|
||||||
import org.bukkit.inventory.CraftingInventory;
|
import org.bukkit.inventory.CraftingInventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.Recipe;
|
import org.bukkit.inventory.Recipe;
|
||||||
import org.bukkit.util.Java15Compat;
|
|
||||||
|
|
||||||
public class CraftInventoryCrafting extends CraftInventory implements CraftingInventory {
|
public class CraftInventoryCrafting extends CraftInventory implements CraftingInventory {
|
||||||
private final IInventory resultInventory;
|
private final IInventory resultInventory;
|
||||||
|
@ -37,7 +38,7 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
|
||||||
if (len > items.length) {
|
if (len > items.length) {
|
||||||
throw new IllegalArgumentException("Invalid inventory size; expected " + len + " or less");
|
throw new IllegalArgumentException("Invalid inventory size; expected " + len + " or less");
|
||||||
}
|
}
|
||||||
setContents(items[0], Java15Compat.Arrays_copyOfRange(items, 1, items.length));
|
setContents(items[0], Arrays.copyOfRange(items, 1, items.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue