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

%player_item_in_hand__level_ENCHANTMENT% Does not parse enchants higher than 255 #69

Open
Kurichibo opened this issue Sep 28, 2022 · 1 comment

Comments

@Kurichibo
Copy link

Describe the bug
The placeholder %player_item_in_hand_ENCHANTMENT% e.g. %player_item_in_hand_LOOT_BONUS_BLOCKS% parses up to 255 and not higher.

To Reproduce
Steps to reproduce the behavior:

  1. Enchant any item with fortune (higher than 255) e.g. 500
  2. Use the command /papi parse me %player_item_in_hand_LOOT_BONUS_BLOCKS%
  3. As you will see it will parse 255 instead of 500

Screenshots
image
image

@iGabyTM iGabyTM changed the title %player_item_in_hand_ENCHANTMENT% Does not parse enchants higher than 255 %player_item_in_hand__level_ENCHANTMENT% Does not parse enchants higher than 255 Oct 1, 2022
@iGabyTM
Copy link
Member

iGabyTM commented Oct 1, 2022

If you are on 1.14+ put the item in a chest and press CTRL+I while pointing the crosshair at that chest and send the /setblock command here, my guess is the enchantment isn't really set on the item. An alternative to this would be to put it in an essentials kit with /ess createkit.
There's no limit set, we just return whatever spigot give to us.

return String.valueOf(itemInHand(p).getEnchantmentLevel(Enchantment.getByName(enchantment)));

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

No branches or pull requests

2 participants