Skip to content

Commit

Permalink
Clone cursor instead of creating new stack with missing NBT
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Feb 10, 2021
1 parent 6bc7733 commit e772f57
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -42,7 +42,7 @@ public ItemStack getCursorNonNull() {

private ItemStack getResult(InventoryClickEvent event) {
ItemStack stack = event.getCurrentItem() == null || event.getCurrentItem().getType() == Material.AIR
? new ItemStack(event.getCursor().getType(), 0)
? event.getCursor().clone()
: event.getCurrentItem().clone();
switch (event.getAction()) {
case PICKUP_ONE:
Expand Down

0 comments on commit e772f57

Please sign in to comment.