Skip to content

Commit

Permalink
Use cloneItem here
Browse files Browse the repository at this point in the history
  • Loading branch information
Intybyte committed Nov 16, 2024
1 parent 16260d6 commit 415f690
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void onExecute(CommandSender sender, String[] args) {
}

Slimefun.runSync(() -> {
ItemStack item = SlimefunItems.RESTORED_BACKPACK.clone().item();
ItemStack item = SlimefunItems.RESTORED_BACKPACK.cloneItem();
Slimefun.getBackpackListener().setBackpackId(backpackOwner, item, 2, id);
player.getInventory().addItem(item);
Slimefun.getLocalization().sendMessage(sender, "commands.backpack.restored-backpack-given");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DebugFishCommand extends SubCommand {
@Override
public void onExecute(CommandSender sender, String[] args) {
if (sender instanceof Player player && sender.hasPermission("slimefun.debugging")) {
player.getInventory().addItem(SlimefunItems.DEBUG_FISH.clone().item());
player.getInventory().addItem(SlimefunItems.DEBUG_FISH.cloneItem());
} else {
Slimefun.getLocalization().sendMessage(sender, "messages.no-permission", true);
}
Expand Down

0 comments on commit 415f690

Please sign in to comment.