From 2fbc935c5276970899ec540223059eba12748bc0 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sun, 2 Oct 2022 13:05:15 +0200 Subject: [PATCH] 'Potion effects' no longer show for tipped arrows --- .../net/Indyuce/mmoitems/stat/ArrowPotionEffects.java | 2 +- .../java/net/Indyuce/mmoitems/stat/PotionEffects.java | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java index 98def17e..4f547ba8 100644 --- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java +++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java @@ -94,7 +94,7 @@ public class ArrowPotionEffects extends ItemStat lore, Optional statData) { if (statData.isPresent()) { lore.add(ChatColor.GRAY + "Current Value:"); - RandomPotionEffectListData data = (RandomPotionEffectListData) statData.get(); + RandomPotionEffectListData data = statData.get(); for (RandomPotionEffectData effect : data.getEffects()) lore.add(ChatColor.GRAY + "* " + ChatColor.GREEN + MMOUtils.caseOnWords(effect.getType().getName().toLowerCase().replace("_", " ")) + ChatColor.GRAY + " Level: " + ChatColor.GREEN + effect.getAmplifier() + ChatColor.GRAY + " Duration: " + ChatColor.GREEN diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java index e93bb116..5f03f3cc 100644 --- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java +++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java @@ -1,7 +1,6 @@ package net.Indyuce.mmoitems.stat; import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; @@ -13,10 +12,8 @@ import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.PotionEffectData; import net.Indyuce.mmoitems.stat.data.PotionEffectListData; -import net.Indyuce.mmoitems.stat.data.StringData; import net.Indyuce.mmoitems.stat.data.random.RandomPotionEffectData; import net.Indyuce.mmoitems.stat.data.random.RandomPotionEffectListData; -import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.ItemStat; import org.apache.commons.lang.NotImplementedException; import org.apache.commons.lang.Validate; @@ -30,7 +27,6 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import scala.concurrent.impl.FutureConvertersImpl; import java.util.ArrayList; import java.util.List; @@ -39,8 +35,8 @@ import java.util.Set; public class PotionEffects extends ItemStat { public PotionEffects() { - super("POTION_EFFECT", Material.POTION, "Potion Effects", new String[] { "The effects of your potion.", "(May have an impact on color)." }, - new String[] { "all" }, Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION, Material.TIPPED_ARROW); + super("POTION_EFFECT", Material.POTION, "Potion Effects", new String[] { "The effects of your potion.", "(May have an impact on color).", "Does NOT support tipped arrows." }, + new String[] { "all" }, Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION); } @Override @@ -137,7 +133,7 @@ public class PotionEffects extends ItemStat