Skip to content

Conversation

@imDaniX
Copy link
Contributor

@imDaniX imDaniX commented Dec 28, 2020

This PR fixes #3879
Also added p as a short name for power for fireworks meta.

@triagonal triagonal added bug: confirmed Confirmed bugs in EssentialsX. type: bugfix PRs that fix bugs in EssentialsX. and removed bug: confirmed Confirmed bugs in EssentialsX. labels Jan 10, 2021
@JRoy
Copy link
Member

JRoy commented Jan 19, 2021

Needs conflict resolving from latest commits (maybe my previous review comment should also make sense given my recent PR to fix some firework meta stuff)

@imDaniX imDaniX requested a review from JRoy January 20, 2021 12:56
Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this would allow fireworks/potions/etc to parse enchantments, it would not, for example, parse a firework with firework meta and enchantment meta. If that can be added (maybe by splitting meta into a hashmap of tokens?)

@imDaniX
Copy link
Contributor Author

imDaniX commented Jan 28, 2021

While this would allow fireworks/potions/etc to parse enchantments, it would not, for example, parse a firework with firework meta and enchantment meta. If that can be added (maybe by splitting meta into a hashmap of tokens?)

Wait, but isn't addStringMeta method works word-by-word? This method can accept something like unbreakable:1 effect:trail, but it can't properly parse it anyway because it just splits the string into 1-2 pieces(so it will become unbreakable and 1 effect:trail), and even parseStringMeta calls the method for each argument.

@JRoy
Copy link
Member

JRoy commented Jan 29, 2021

While this would allow fireworks/potions/etc to parse enchantments, it would not, for example, parse a firework with firework meta and enchantment meta. If that can be added (maybe by splitting meta into a hashmap of tokens?)

Wait, but isn't addStringMeta method works word-by-word? This method can accept something like unbreakable:1 effect:trail, but it can't properly parse it anyway because it just splits the string into 1-2 pieces(so it will become unbreakable and 1 effect:trail), and even parseStringMeta calls the method for each argument.

That should be fixed ideally then.

@imDaniX
Copy link
Contributor Author

imDaniX commented Jan 29, 2021

I mean, right now it works as-is. Here's the result of /i fireworkrocket 1 efficiency:1 name:Angry_Creeper color:red fade:green type:creeper power:1 durability:1
screenshot

@JRoy JRoy changed the title Enchant potions, banners and fireworks too Allow enchants on fireworks/charges/potions/banners Jun 11, 2021
@JRoy JRoy merged commit fa87c74 into EssentialsX:2.x Jun 11, 2021
@imDaniX imDaniX deleted the fix-enchantments branch July 18, 2021 06:33
ressidell pushed a commit to ressidell/Essentials that referenced this pull request Apr 27, 2025
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bugfix PRs that fix bugs in EssentialsX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firework Stars do not receive enchants when obtained from ESSX kits or give command

3 participants