When creating a new kit with the /createkit command are certain values set, which EssentialsX sees as "invalid".
In my example does EssentialsX set the color(s) of firework as Color:[rgb:0x<hex code>] which the plugin doesn't support in commands like /kit
Used Spigot version: git-spigot-3fb9445-6e3cec8 (MC: 1.11.2) (Also didn't work on 1.13 [Link])
Used EssentialsX: 2.0.1-b481 (Also didn't work with Build 784 [Link])
/createkit [name] [delay]kits:
# ...
# The other kits (tools, dtools, ...)
firework:
delay: 6000
items:
- 401 1 name:Angry_Creeper color:red fade:green type:creeper power:1
- 401 1 name:Starry_Night color:yellow,orange fade:blue type:star effect:trail,twinkle power:1
- 401 2 name:Solar_Wind color:yellow,orange fade:red shape:large effect:twinkle color:yellow,orange fade:red shape:ball effect:trail color:red,purple fade:pink shape:star effect:trail power:1
special: # The new added kit
delay: 0
items: # "power: 3" was on the next line. I placed it on the same line.
- 'FIREWORK 3 color:Color:[rgb0xB3312C],Color:[rgb0xEB8844] shape: STAR fade:Color:[rgb0xDECF2A],Color:[rgb0x41CD34] power:3'
- POTION 1
[Essentials] the option color:[rgb0x<hex code>],Color:[rgb0x<hex code>] is not a valid value for color.@Andre601 Did you ever resolve this, or does it still occur?
I didn't check if the latest version has fixed that...
Will do that later this day and provide feedback.
I checked it and it still doesn't work.
How I tested it:
/createkit Example 0 to make the kit Example with 0 delay./kits/kit ExampleThe same error happens like mentioned in the first comment of this issue:
[13:49:56 WARN]: [Essentials] The option Color:[rgb0x287697],Color:[rgb0xABABAB] is not a valid value for color.
My settings:
Server type: PaperSpigot
Version: git-paper-509 (MC 1.13.2 Implementing API version 1.13.2-R0.1-SNAPSHOT. Currently 55 versions behind)
Essentials: 2.16.1.0 (Latest release from Spigot page)
Just wanted to ask, if this is still worked on.
I tried it with latest dev version as of this moment (Build 784)
Still doesn't work.
I tried again with the following steps
/createkit special 0/kit specialI want to point out that this happens with a clean and fresh install of EssentialsX on a 1.14.4 PaperMC server.
Does this happen without /createkit? The command currently doesn't support as much as you can do from within the file.
Does this happen without
/createkit? The command currently doesn't support as much as you can do from within the file.
What do you mean?
The issue IS about /createkit so why should I check if it happens without it? And how should I even check it?
I was just wondering if you were able to create the firework through the config.yml file segment on kits. Or is the problem that fireworks are compeletely unsupported right now?
The issue I reported is generally not about firework being not supported, as the firework kit, that is there by default works without issues.
I reported, that the createkit command sets invalid values (in this case colors) for items (in this case firework).
OK thanks for the clarification :+1:
Was mostly asking because this issue is still marked as unconfirmed / not enough info, and it would be nice to verify it soon. I am cleaning through issues and trying to determine which ones need attention.
I did update the title and also the first issue to (hopefully) make it a bit more clear.
I used the following version to test:
[03:35:44 INFO]: CONSOLE issued server command: /ess version
[03:35:44 INFO]: Server version: 1.15.2-R0.1-SNAPSHOT git-Paper-90 (MC: 1.15.2)
[03:35:44 INFO]: EssentialsX version: 2.17.1.53
[03:35:44 INFO]: LuckPerms version: 5.0.72
[03:35:44 INFO]: Vault version: 1.7.2-b107
[03:35:44 INFO]: EssentialsXProtect version: 2.17.1.53
[03:35:44 INFO]: EssentialsXChat version: 2.17.1.53
[03:35:44 INFO]: EssentialsXGeoIP version: 2.17.1.53
[03:35:44 INFO]: EssentialsXAntiBuild version: 2.17.1.53
[03:35:44 INFO]: EssentialsXSpawn version: 2.17.1.53
I started with the following commands (based on @Andre601's supposed output from /createkit, and a "fixed" version of that). Used the /essentials:give command instead since the EssentialsX item meta should be handled the same way.
[03:24:19 INFO]: CONSOLE issued server command: /essentials:give pop4959 firework_rocket 3 color:Color:[rgb0xB3312C],Color:[rgb0xEB8844] shape: STAR fade:Color:[rgb0xDECF2A],Color:[rgb0x41CD34] power:3
[03:24:19 INFO]: Error: The option Color:[rgb0xB3312C],Color:[rgb0xEB8844] is not a valid value for color.
[03:33:35 INFO]: CONSOLE issued server command: /essentials:give pop4959 firework_rocket 3 color:yellow,green shape:star fade:purple,blue power:3
[03:33:35 INFO]: Giving 3 of firework rocket to Owner pop4959.
Sure enough, we see the same error message.
Notice I gave myself firework rockets successfully using the item meta tags. Since it was created successfully, we should also in theory be able to save the same firework with /createkit.
[03:36:38 INFO]: pop4959 issued server command: /createkit test 0
[03:36:39 INFO]: pop4959 issued server command: /kit test
[03:36:39 WARN]: [Essentials] The option Color:[rgb0xDECF2A],Color:[rgb0x3B511A] is not a valid value for color.
Nope. It says it is not a valid color, even when the colors used were extremely standard. Definitely a bug.
I'd like to look into this issue and present a solution if I find the bug.
@chuckthemole Thanks for looking into it 馃槈
@pop4959 I've looked into this issue. The exception is being called on line 327 of MetaItemStack.java in the addFireworkMeta method.
for (final String color : colors) {
if (colorMap.containsKey(color.toUpperCase())) {
validFirework = true;
primaryColors.add(colorMap.get(color.toUpperCase()).getFireworkColor());
} else {
throw new Exception(tl("invalidFireworkFormat", split[1], split[0]));
}
}
}
color is a rbg hex value when called with /kit test, from your example above. color should be an enum for this if statement to work.
When making this call to give rockets
[03:33:35 INFO]: CONSOLE issued server command: /essentials:give pop4959 firework_rocket 3 color:yellow,green shape:star fade:purple,blue power:3
the call walks through the same block of code. On this call the if statement works and this is where the rbg hex value is stored, into primaryColors.
I have a few ideas moving forward. I just wanted to make an update and get any thoughts, if any, before moving forward.
It should be the same way as other meta (see for example "shape:star") is done, to work correctly.
I have not worked with item meta much, so it may be better if @mdcfe gives their opinion on this.