Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

feat: custom trade market sell amount buttons #584

Merged
merged 8 commits into from
Sep 21, 2022
Prev Previous commit
Next Next commit
fix: change the lore to fit the custom sell buttons better
  • Loading branch information
byBackfish authored and DevScyu committed Sep 21, 2022
commit 53a509205e447e61ac36d4cf03491c179818f62d
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,11 @@ private NBTTagCompound buildNBT(String itemName, int amount, int customSellAmoun
else nbt.setInteger("Count", Math.min(amount, 64));

NBTTagCompound display = tag.getCompoundTag("display");
display.setString("Name", "§aSell All");
if(isCustomSellButton) display.setString("Name", "§aSell " + amount);
else display.setString("Name", "§aSell All");

NBTTagList lore = new NBTTagList();
lore.appendTag(new NBTTagString("§7Click to sell all items in your inventory"));

lore.appendTag(new NBTTagString("§7This will sell: §6" + amount + " §7of " + itemName));

if (isCustomSellButton) {
lore.appendTag(new NBTTagString(""));
lore.appendTag(new NBTTagString("§cThis is a custom sell button. Change the amount by going into the settings"));
lore.appendTag(new NBTTagString("§8(§7Utilities>Market>Custom Sell Amount§8)"));
}

display.setTag("Lore", lore);

tag.setInteger("Unbreakable", 1);
Expand Down