Skip to content

Commit

Permalink
Merge pull request #946 from SlimefunGuguProject/fix/backpack-stacking
Browse files Browse the repository at this point in the history
fix(backpack): 创建背包时只能有1个物品
  • Loading branch information
StarWishsama authored Aug 20, 2024
2 parents f53c2f6 + ef05dff commit 6f16a50
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ private void openBackpack(Player p, ItemStack item, PlayerProfile profile, int s
Slimefun.getLocalization().sendMessage(p, "backpack.not-original-item", true);
return;
}
if (item.getAmount() > 1) {
Slimefun.getLocalization().sendMessage(p, "backpack.no-stack", true);
return;
}
PlayerBackpack.bindItem(
item,
Slimefun.getDatabaseManager()
Expand Down

0 comments on commit 6f16a50

Please sign in to comment.