mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Remove broken firework meta.
This commit is contained in:
parent
fdc262a205
commit
04bd9e8baf
1 changed files with 2 additions and 28 deletions
|
@ -104,33 +104,7 @@ public class MetaItemStack
|
||||||
final FireworkMeta meta = (FireworkMeta)stack.getItemMeta();
|
final FireworkMeta meta = (FireworkMeta)stack.getItemMeta();
|
||||||
meta.setPower(power);
|
meta.setPower(power);
|
||||||
stack.setItemMeta(meta);
|
stack.setItemMeta(meta);
|
||||||
}
|
//TODO: Complain at Snowleo to code firework meta
|
||||||
else if (split.length > 1 && split[0].equalsIgnoreCase("effect") && stack.getType() == Material.FIREWORK)
|
|
||||||
{
|
|
||||||
//TODO: Add validation messages
|
|
||||||
final FireworkMeta meta = (FireworkMeta)stack.getItemMeta();
|
|
||||||
Builder builder = FireworkEffect.builder();
|
|
||||||
|
|
||||||
String[] effectData = split[1].toUpperCase(Locale.ENGLISH).split("\\|");
|
|
||||||
|
|
||||||
builder.with(FireworkEffect.Type.valueOf(effectData[0]));
|
|
||||||
|
|
||||||
String[] primaryColorStrings = effectData[1].split(",");
|
|
||||||
List<Color> primaryColors = new ArrayList<Color>();
|
|
||||||
|
|
||||||
for (String primaryColorString : primaryColorStrings) {
|
|
||||||
primaryColors.add(DyeColor.valueOf(primaryColorString).getFireworkColor());
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (effectData.length > 2) {
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
builder.withColor(primaryColors);
|
|
||||||
|
|
||||||
final FireworkEffect effect = builder.build();
|
|
||||||
meta.addEffect(effect);
|
|
||||||
stack.setItemMeta(meta);
|
|
||||||
}
|
}
|
||||||
else if (split.length > 1 && (split[0].equalsIgnoreCase("color") || split[0].equalsIgnoreCase("colour"))
|
else if (split.length > 1 && (split[0].equalsIgnoreCase("color") || split[0].equalsIgnoreCase("colour"))
|
||||||
&& (stack.getType() == Material.LEATHER_BOOTS
|
&& (stack.getType() == Material.LEATHER_BOOTS
|
||||||
|
|
Loading…
Reference in a new issue