Skip to content

Commit

Permalink
Update ShopkeepersStandardization.java (#3)
Browse files Browse the repository at this point in the history
* Update ShopkeepersStandardization.java

* Update ShopkeepersStandardization.java
  • Loading branch information
CraftDream committed Jul 15, 2024
1 parent 979a4b6 commit 3c94304
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
}

private boolean isStandardSimilar(ItemStack stack1, ItemStack stack2) {
stack1 = stack1.clone();
stack2 = stack2.clone();
stack1 = standardItemStack(stack1);
stack2 = standardItemStack(stack2);
stack1.setAmount(1);
stack2.setAmount(1);
List<String> lore1 = stack1.getLore();
Expand All @@ -129,7 +129,7 @@ private boolean isStandardSimilar(ItemStack stack1, ItemStack stack2) {
stack1.setLore(lore1);
stack2.setLore(lore2);
}
return standardItemStack(stack1).isSimilar(standardItemStack(stack2));
return stack1.isSimilar(stack2);
}

private ItemStack standardItemStack(ItemStack original) {
Expand Down Expand Up @@ -157,4 +157,4 @@ private ItemMeta standardItemMeta(ItemMeta original) {
public Component standardComponent(Component component) {
return GsonComponentSerializer.gson().deserialize(GsonComponentSerializer.gson().serialize(component.compact()));
}
}
}

0 comments on commit 3c94304

Please sign in to comment.