|  | 
| 74 | 74 |  * ItemStack: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemStack.html | 
| 75 | 75 |  * | 
| 76 | 76 |  * @author Crypto Morin | 
| 77 |  | - * @version 7.0.0 | 
|  | 77 | + * @version 7.1.0 | 
| 78 | 78 |  * @see XMaterial | 
| 79 | 79 |  * @see XPotion | 
| 80 | 80 |  * @see SkullUtils | 
| @@ -196,23 +196,21 @@ public static void serialize(@Nonnull ItemStack item, @Nonnull ConfigurationSect | 
| 196 | 196 |             config.set("color", color.getRed() + ", " + color.getGreen() + ", " + color.getBlue()); | 
| 197 | 197 |         } else if (meta instanceof PotionMeta) { | 
| 198 | 198 |             if (supports(9)) { | 
| 199 |  | - | 
| 200 | 199 |                 PotionMeta potion = (PotionMeta) meta; | 
| 201 | 200 |                 List<PotionEffect> customEffects = potion.getCustomEffects(); | 
| 202 | 201 |                 List<String> effects = new ArrayList<>(customEffects.size()); | 
| 203 | 202 |                 for (PotionEffect effect : customEffects) { | 
| 204 | 203 |                     effects.add(effect.getType().getName() + ", " + effect.getDuration() + ", " + effect.getAmplifier()); | 
| 205 | 204 |                 } | 
| 206 | 205 | 
 | 
| 207 |  | -                config.set("custom-effects", effects); | 
|  | 206 | +                config.set("effects", effects); | 
| 208 | 207 |                 PotionData potionData = potion.getBasePotionData(); | 
| 209 | 208 |                 config.set("base-effect", potionData.getType().name() + ", " + potionData.isExtended() + ", " + potionData.isUpgraded()); | 
| 210 | 209 | 
 | 
| 211 | 210 |                 if (potion.hasColor()) config.set("color", potion.getColor().asRGB()); | 
| 212 | 211 | 
 | 
| 213 | 212 |             } else { | 
| 214 |  | - | 
| 215 |  | -                //check for water bottles in 1.8 | 
|  | 213 | +                // Check for water bottles in 1.8 | 
| 216 | 214 |                 if (item.getDurability() != 0) { | 
| 217 | 215 |                     Potion potion = Potion.fromItemStack(item); | 
| 218 | 216 |                     config.set("level", potion.getLevel()); | 
| @@ -288,7 +286,7 @@ public static void serialize(@Nonnull ItemStack item, @Nonnull ConfigurationSect | 
| 288 | 286 |         } else if (supports(17)) { | 
| 289 | 287 |             if (meta instanceof AxolotlBucketMeta) { | 
| 290 | 288 |                 AxolotlBucketMeta bucket = (AxolotlBucketMeta) meta; | 
| 291 |  | -                if (bucket.hasVariant()) config.set("variant", bucket.getVariant().toString()); | 
|  | 289 | +                if (bucket.hasVariant()) config.set("color", bucket.getVariant().toString()); | 
| 292 | 290 |             } | 
| 293 | 291 |         } else if (supports(16)) { | 
| 294 | 292 |             if (meta instanceof CompassMeta) { | 
| @@ -478,7 +476,7 @@ public static ItemStack edit(@Nonnull ItemStack item, @Nonnull ConfigurationSect | 
| 478 | 476 |             if (supports(9)) { | 
| 479 | 477 |                 PotionMeta potion = (PotionMeta) meta; | 
| 480 | 478 | 
 | 
| 481 |  | -                for (String effects : config.getStringList("custom-effects")) { | 
|  | 479 | +                for (String effects : config.getStringList("effects")) { | 
| 482 | 480 |                     XPotion.Effect effect = XPotion.parseEffect(effects); | 
| 483 | 481 |                     if (effect.hasChance()) potion.addCustomEffect(effect.getEffect(), true); | 
| 484 | 482 |                 } | 
| @@ -521,7 +519,7 @@ public static ItemStack edit(@Nonnull ItemStack item, @Nonnull ConfigurationSect | 
| 521 | 519 |                 spawner.update(true); | 
| 522 | 520 |                 bsm.setBlockState(spawner); | 
| 523 | 521 |             } else if (supports(11) && state instanceof ShulkerBox) { | 
| 524 |  | -                ConfigurationSection shulkerSection = config.getConfigurationSection("shulker"); | 
|  | 522 | +                ConfigurationSection shulkerSection = config.getConfigurationSection("contents"); | 
| 525 | 523 |                 if (shulkerSection != null) { | 
| 526 | 524 |                     ShulkerBox box = (ShulkerBox) state; | 
| 527 | 525 |                     for (String key : shulkerSection.getKeys(false)) { | 
| @@ -637,7 +635,7 @@ public static ItemStack edit(@Nonnull ItemStack item, @Nonnull ConfigurationSect | 
| 637 | 635 |         } else if (supports(17)) { | 
| 638 | 636 |             if (meta instanceof AxolotlBucketMeta) { | 
| 639 | 637 |                 AxolotlBucketMeta bucket = (AxolotlBucketMeta) meta; | 
| 640 |  | -                String variantStr = config.getString("variant"); | 
|  | 638 | +                String variantStr = config.getString("color"); | 
| 641 | 639 |                 if (variantStr != null) { | 
| 642 | 640 |                     Axolotl.Variant variant = Enums.getIfPresent(Axolotl.Variant.class, variantStr.toUpperCase(Locale.ENGLISH)).or(Axolotl.Variant.BLUE); | 
| 643 | 641 |                     bucket.setVariant(variant); | 
|  | 
0 commit comments