Skip to content

Commit

Permalink
fix config mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
zefir-git committed Jul 30, 2023
1 parent 8cdd7f3 commit b1f89e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/pro/cloudnode/smp/bankaccounts/POS.java
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ public static void openBuyGui(final @NotNull Player player, final @NotNull Chest
confirm.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 1);
}
final @NotNull ItemMeta confirmMeta = confirm.getItemMeta();
confirmMeta.displayName(MiniMessage.miniMessage().deserialize(Account.placeholdersString(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getString("pos.confirm.name-buyer")), account),
confirmMeta.displayName(MiniMessage.miniMessage().deserialize(Account.placeholdersString(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getString("pos.confirm.name")), account),
Placeholder.unparsed("description", pos.description == null ? "no description" : pos.description),
Placeholder.unparsed("price", pos.price.toPlainString()),
Placeholder.unparsed("price-formatted", BankAccounts.formatCurrency(pos.price)),
Placeholder.unparsed("price-short", BankAccounts.formatCurrencyShort(pos.price))
).decoration(TextDecoration.ITALIC, false));
confirmMeta.lore(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getStringList("pos.confirm.lore-buyer")).stream()
confirmMeta.lore(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getStringList("pos.confirm.lore")).stream()
.map(line -> MiniMessage.miniMessage().deserialize(Account.placeholdersString(line, account),
Placeholder.unparsed("description", pos.description == null ? "no description" : pos.description),
Placeholder.unparsed("price", pos.price.toPlainString()),
Expand All @@ -414,14 +414,14 @@ public static void openBuyGui(final @NotNull Player player, final @NotNull Chest
confirm.setItemMeta(confirmMeta);
gui.setItem(size - 7, confirm);

final @NotNull ItemStack cancel = new ItemStack(Objects.requireNonNull(Material.getMaterial(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getString("pos.cancel.material")))), 1);
final @NotNull ItemStack cancel = new ItemStack(Objects.requireNonNull(Material.getMaterial(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getString("pos.decline.material")))), 1);
if (BankAccounts.getInstance().getConfig().getBoolean("pos.cancel.glint")) {
cancel.addItemFlags(ItemFlag.HIDE_ENCHANTS);
cancel.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 1);
}
final @NotNull ItemMeta cancelMeta = cancel.getItemMeta();
cancelMeta.displayName(MiniMessage.miniMessage().deserialize("<red><bold>Cancel Purchase</bold></red>").decoration(TextDecoration.ITALIC, false));
cancelMeta.lore(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getStringList("pos.cancel.lore-buyer")).stream()
cancelMeta.lore(Objects.requireNonNull(BankAccounts.getInstance().getConfig().getStringList("pos.decline.lore")).stream()
.map(line -> MiniMessage.miniMessage().deserialize(Account.placeholdersString(line, account),
Placeholder.unparsed("description", pos.description == null ? "no description" : pos.description),
Placeholder.unparsed("price", pos.price.toPlainString()),
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pos:
- "<gray>Click to confirm purchase.</gray>"
- "<gray>Price:</gray> <green><price-formatted></green>"
- "<gray>Balance:</gray> <white><balance-formatted></white>"
- "<gray>Paying with:</gray> <white><account></white> <gray>(<account-formatted>)</gray>"
- "<gray>Paying from:</gray> <white><account></white> <gray>(<account-type>)</gray>"
- "<dark_gray>Account ID <account-id></dark_gray>"
# Deny purchase item (buyer only)
# No placeholders.
Expand Down

0 comments on commit b1f89e6

Please sign in to comment.