nulli0n / ExcellentCrates-spigot

GNU General Public License v3.0
37 stars 64 forks source link

Internal Placeholders are Incorrect #173

Closed iLuckyx closed 5 months ago

iLuckyx commented 6 months ago

Nexengine Version: 2.2.12 R2 Final Excellent Crates Version: 5.0.0

At some point there was a change of the win limit placeholders:

Old: %reward_win_limit_amount% New: %win_limit_amount% the new placeholder now needs to be on it's own line with no additional text

The new placeholder (%win_limit_amount%) does not work. After digging, the placeholder appears to be incorrect and needs capital W and L in order to work: %Win_Limit_amount%

Here are a few additional examples and other issues:

  1. When the placeholder is lower case but correct, it does not display any values.

    Default:
    - '%reward_preview_lore%'
    - '&7'
    - '&bWin Chance: &f%reward_chance%'
    - '%win_limit_amount%'
    - '%win_limit_cooldown%'

    image

  2. Freshly generated files do the same issue.

    Default:
    - '%reward_preview_lore%'
    - ''
    - '#accaf4▪ #ddeceeChance: #accaf4%reward_chance%%'
    - '#accaf4▪ #ddeceeRarity: #accaf4%reward_rarity_name% #ddecee(&f%reward_rarity_chance%%#ddecee)'
    - ''
    - '%win_limit_amount%'
    - '%win_limit_cooldown%'
    - '%win_limit_drained%

    image

  3. When other text is on the line, it shows the placeholder. image

  4. When there is a capital W and L in the placeholder, it works..kinda:

    - '%reward_preview_lore%'
    - ''
    - '#accaf4▪ #ddeceeChance: #accaf4%reward_chance%%'
    - '#accaf4▪ #ddeceeRarity: #accaf4%reward_rarity_name% #ddecee(&f%reward_rarity_chance%%#ddecee)'
    - ''
    - '%Win_Limit_amount%'
    - '%Win_Limit_cooldown%'
    - '%Win_Limit_drained%'

    image

  5. In the example in #4, the cooldown and drained placeholders are completely incorrect.

    money2500:
      Name: '#74ea31◆ $2.500 ◆'
      Chance: 5.0
      Rarity: legendary
      Broadcast: false
      Win_Limits:
        Amount: 2
        Cooldown: 60
  6. The '%Win_Limit_amount%' placeholder when set to unlimited displayed you can win this -1 more times. This should say something more direct.

nulli0n commented 5 months ago

Default configuration is more than correct. These placeholders are conditional and appear only when necessary.

iLuckyx commented 5 months ago

I’m curious, did you read what was posted? If so, may I understand how the default files are correct? Maybe there is a different version or something? Why is it the place holder do NOT work with fresh files until I manually change it to a capital W and L?

nulli0n commented 5 months ago

It DOES work. Where did you even get placeholders with capital letters? изображение

    - '%win_limit_amount%'
    - '%win_limit_cooldown%'
    - '%win_limit_drained%'
    - '%win_limit_no_permission%'

https://github.com/nulli0n/ExcellentCrates-spigot/blob/74d1b1df41d553ad0b500264e0749be0cd0d435d/src/main/java/su/nightexpress/excellentcrates/crate/menu/PreviewMenu.java#L39