mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-17 22:47:34 +01:00
Test cloning of CraftItemStacks created with null nms ItemStacks
This commit is contained in:
parent
8b735bf47a
commit
5124f8f462
@ -25,4 +25,12 @@ public class CraftItemStackTest {
|
||||
assert (clone.getTypeId() == itemStack.getTypeId());
|
||||
assert (clone.getData().equals(itemStack.getData()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCloneNullItem() throws Exception {
|
||||
net.minecraft.server.ItemStack nmsItemStack = null;
|
||||
ItemStack itemStack = new CraftItemStack(nmsItemStack);
|
||||
ItemStack clone = itemStack.clone();
|
||||
assert (clone.equals(itemStack));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user