Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-09-17 01:23:43 +02:00
return null if the item is null :)
Dieser Commit ist enthalten in:
Ursprung
d8ce66ce29
Commit
ca6638c740
@ -178,6 +178,7 @@ public class ItemSlotRewriter {
|
|||||||
public CompoundTag tag;
|
public CompoundTag tag;
|
||||||
|
|
||||||
public static ItemStack fromBukkit(org.bukkit.inventory.ItemStack stack) {
|
public static ItemStack fromBukkit(org.bukkit.inventory.ItemStack stack) {
|
||||||
|
if(stack == null) return null;
|
||||||
ItemStack item = new ItemStack();
|
ItemStack item = new ItemStack();
|
||||||
item.id = (short) stack.getTypeId();
|
item.id = (short) stack.getTypeId();
|
||||||
item.amount = (byte) stack.getAmount();
|
item.amount = (byte) stack.getAmount();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren