Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmetics Core Lore Placeholders #222

Closed
4 tasks done
emcrald opened this issue May 12, 2024 · 1 comment
Closed
4 tasks done

Cosmetics Core Lore Placeholders #222

emcrald opened this issue May 12, 2024 · 1 comment

Comments

@emcrald
Copy link

emcrald commented May 12, 2024

Terms

  • I'm using the very latest version of CosmeticsCore and its dependencies.
  • I already searched on this Github page to check if the same suggestion was already reported.
  • I already searched on the plugin wiki to know if the feature is already implemented.
  • I already searched on the Discord server to know if anyone already has a solution for this or if the feature was already suggested.

Discord tag (optional)

emcrald

Describe the solution you'd like

The ability to use any placeholder api placeholders inside the lore and even the name of the cosmetic.

The story:
I have a shop I made using deluxe menus to buy cosmetics and I've been using the changeoutput placeholder api package to determine inside the cosmetics lore either if the user owns the item to display "Owned" or whether to display "Purchase + The Price". This would be very useful inside the cosmetics core gui to show if the item is owned or not in my case, but there would be countless other cases where people can be very creative with what they do with it.

Heres an example of my messy placeholder but there are other placeholders that offer more cleaner and easier to understand methods:
'%changeoutput_==_input:{luckperms_has_permission_cosmeticscore.user.cosmetics.wear.carrot_hat}_matcher:yes_ifmatch:&r&f셁_else:&r&f셂\n&r&f셃셋ꌄ₁₀₀%'

Output:
image
image

Is your feature request related to a problem?

No

Describe alternatives you've considered

None

Additional context

No response

@LoneDev6
Copy link
Contributor

LoneDev6 commented Jun 6, 2024

Will be possible in the next update.
Done:

  leather_backpack:
    enabled: true
    display_name: "Leather Backpack"
    type: BODY_ITEM
    model:
      gui: potion:300001
      normal: potion:300001
      normal_2: potion:310001
      self: potion:300002
      self_2: potion:310002
    dye:
      enabled: true
      default: "#542900"
    lore:
    - test %player_name%

NOTE: this will break any json (component) you are using in your lore. This will work only on legacy simple strings due to the fact that PlaceholderAPI doesn't support components replacement.

@LoneDev6 LoneDev6 closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants