Skip to content

Comments

Enable price placeholder replacement in confirmation button lore#19

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/add-buyprice-placeholder-confirm-buy
Closed

Enable price placeholder replacement in confirmation button lore#19
Copilot wants to merge 2 commits intomainfrom
copilot/add-buyprice-placeholder-confirm-buy

Conversation

Copy link

Copilot AI commented Oct 29, 2025

The %buyPrice% and %sellPrice% placeholders were not being replaced in ZSHOP_CONFIRM_BUY and ZSHOP_CONFIRM_SELL button lore, leaving players unable to see pricing information on confirmation screens.

Changes

  • ZConfirmBuyButton: Override getCustomItemStack() to replace %buyPrice% and %sellPrice% placeholders in lore
  • ZConfirmSellButton: Override getCustomItemStack() to replace %sellPrice% and %buyPrice% placeholders in lore

Both implementations follow the existing pattern from ZShowItemButton, retrieving price data from the cached ItemButton and applying placeholder replacement before rendering.

Usage

confirm_buy:
  type: ZSHOP_CONFIRM_BUY
  item:
    name: "&aConfirm Purchase"
    lore:
      - "&f> &7Price&8: &e%buyPrice%"
      - "&f> &7Click to confirm"

The placeholders now resolve to formatted prices based on the current transaction amount.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.groupez.dev
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.8-bin/dl7vupf4psengwqhwktix4v1/gradle-8.8/lib/gradle-launcher-8.8.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.8-bin/dl7vupf4psengwqhwktix4v1/gradle-8.8/lib/agents/gradle-instrumentation-agent-8.8.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.8 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[Suggestion] %buyPrice% placeholder to work in confirm_buy lore in shop_buy.yml</issue_title>
<issue_description>I suggest allowing the %buyPrice% placeholder to work in confirm_buy lore in shop_buy.yml so players know the price even when hovering on the confirm button, now it is not possible.

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: alwyn974 <47529956+alwyn974@users.noreply.github.com>
Copilot AI changed the title [WIP] Add %buyPrice% placeholder to confirm_buy lore Enable price placeholder replacement in confirmation button lore Oct 29, 2025
Copilot AI requested a review from alwyn974 October 29, 2025 10:05
@Maxlego08 Maxlego08 closed this Dec 17, 2025
@Maxlego08 Maxlego08 deleted the copilot/add-buyprice-placeholder-confirm-buy branch December 17, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] %buyPrice% placeholder to work in confirm_buy lore in shop_buy.yml

3 participants