int value = Integer.parseInt(enchant[1]);
emeta.addStoredEnchant(enchantenum, value, true);
}
}
}else if(ismeta instanceof FireworkMeta) {
FireworkMeta fmmeta = (FireworkMeta) ismeta;
for(int i = 0; (data = itemdata.get("F" + String.valueOf(i))) != null; i++) {
String[] fedata = data.split("\\+");
Type effect = FireworkEffect.Type.valueOf(fedata[0]);
Builder ef = FireworkEffect.builder();
ef.with(effect);
if(effect != null) {
String[] colors = fedata[1].split("-");
for(String color : colors) {
try {
ef.withColor(Color.fromRGB(Integer.parseInt(color)));
}catch (Exception e) {
}
}
String[] fadecolors = fedata[2].split("-");
for(String fadecolor : fadecolors) {
try {
ef.withFade(Color.fromRGB(Integer.parseInt(fadecolor)));
}catch (Exception e) {
}
}
ef.flicker(Boolean.parseBoolean(fedata[3]));
ef.trail(Boolean.parseBoolean(fedata[4]));
fmmeta.addEffect(ef.build());
}
}
data = itemdata.get("G");
try {
fmmeta.setPower(Integer.parseInt(data));
}catch (Exception e) {
}
}else if(ismeta instanceof FireworkEffectMeta) {
data = itemdata.get("F0");