Skip to content

Commit

Permalink
Update Economy.java
Browse files Browse the repository at this point in the history
Commit made on my mobile device :conernedtater:
  • Loading branch information
skycatminepokie authored Nov 30, 2023
1 parent de20bdd commit 35ab5a1
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/main/java/com/skycat/wbshop/econ/Economy.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,24 +171,6 @@ public static ItemStack makeVoucher(long amount) {
return voucher;
}

@NotNull
public static ItemStack makeVoucher(long amount) {
ItemStack voucher = new ItemStack(Items.PAPER, 1);

NbtCompound nbt = new NbtCompound();
// NbtString#of apparently needs the JSON format of a Text in the form of a string
nbt.put("wbpoints", NbtLong.of(amount));
voucher.setNbt(nbt);

NbtList lore = new NbtList();
lore.add(NbtString.of(Text.Serializer.toJson(Text.of(amount + " point" + (amount == 1 ? "": "s")))));

voucher.getOrCreateSubNbt("display").put("Lore", lore);

voucher.setCustomName(Text.of("Point Voucher"));
return voucher;
}

public Account getOrCreateAccount(UUID uuid) {
if (accounts.containsKey(uuid)) {
return accounts.get(uuid);
Expand Down

0 comments on commit 35ab5a1

Please sign in to comment.