}
}
if(ismeta instanceof Repairable) {
data = itemdata.get("R");
if(data != null) {
Repairable rmeta = (Repairable) ismeta;
rmeta.setRepairCost(Integer.parseInt(data));
}
}
}else {
//Old item meta here
int repairableindex = 2;
if(msplit.length > 1) {
if(!msplit[0].equals("")) {
ismeta.setDisplayName(base64Decode(msplit[0]));
}
if(!msplit[1].equals("")) {
ismeta.setLore(decodeLore(msplit[1]));
}
if(ismeta instanceof SkullMeta) {
if(!msplit[2].isEmpty()) {
((SkullMeta) ismeta).setOwner(msplit[2]);
}
repairableindex = 3;
} else if(ismeta instanceof LeatherArmorMeta) {
if(!msplit[2].equals("")) {
int color = Integer.parseInt(msplit[2]);
((LeatherArmorMeta) ismeta).setColor(Color.fromRGB(color));
}
repairableindex = 3;
} else if(ismeta instanceof PotionMeta) {
if(msplit.length > repairableindex) {
boolean ispotion = true;
if(msplit[repairableindex].contains("+")) {
PotionMeta pmeta = (PotionMeta) ismeta;
for(; repairableindex < msplit.length && ispotion; repairableindex++) {
if(msplit[repairableindex].contains("+")) {
String[] potion = msplit[repairableindex].split("\\+");
PotionEffectType type = PotionEffectType.getByName(potion[0]);
int amplifier = Integer.parseInt(potion[1]);
int duration = Integer.parseInt(potion[2]);
PotionEffect pe = new PotionEffect(type, duration, amplifier);
pmeta.addCustomEffect(pe, true);
} else {
ispotion = false;
repairableindex--;
}
}
}
}
}
if(ismeta instanceof Repairable) {
if(msplit.length > repairableindex) {
Repairable rmeta = (Repairable) ismeta;
rmeta.setRepairCost(Integer.parseInt(msplit[repairableindex]));
}
}
}
}
is.setItemMeta(ismeta);