diff --git a/plugin-modules/Core/pom.xml b/plugin-modules/Core/pom.xml index ed7aa51..8fa622f 100644 --- a/plugin-modules/Core/pom.xml +++ b/plugin-modules/Core/pom.xml @@ -46,7 +46,7 @@ - ${parent.artifactId}-${plugin.version} (1.13.x) + ${parent.artifactId}-${plugin.version} (Legacy) org.apache.maven.plugins diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/PotionSkillEditorPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/PotionSkillEditorPanel.java index 5a87fb6..5d4b9e4 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/PotionSkillEditorPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/PotionSkillEditorPanel.java @@ -18,12 +18,10 @@ import com.songoda.epicbosses.utils.panel.builder.PanelBuilder; import com.songoda.epicbosses.utils.panel.builder.PanelBuilderCounter; import com.songoda.epicbosses.utils.potion.PotionEffectConverter; import com.songoda.epicbosses.utils.potion.holder.PotionEffectHolder; -import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.PotionMeta; -import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; @@ -108,11 +106,8 @@ public class PotionSkillEditorPanel extends VariablePanelHandler { ItemStack itemStack = new ItemStack(Material.POTION); PotionMeta potionMeta = (PotionMeta) itemStack.getItemMeta(); - PotionType potionType = PotionType.getByEffect(PotionEffectType.BLINDNESS); - if(potionType == null) potionType = PotionType.WATER; - - potionMeta.setBasePotionData(new PotionData(potionType)); + potionMeta.addCustomEffect(potionEffect, true); itemStack.setItemMeta(potionMeta); Map replaceMap = new HashMap<>(); diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/potions/PotionEffectTypeEditorPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/potions/PotionEffectTypeEditorPanel.java index 1ba9ab2..818cd75 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/potions/PotionEffectTypeEditorPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/skills/custom/potions/PotionEffectTypeEditorPanel.java @@ -1,25 +1,20 @@ package com.songoda.epicbosses.panel.skills.custom.potions; import com.songoda.epicbosses.CustomBosses; -import com.songoda.epicbosses.entity.BossEntity; -import com.songoda.epicbosses.entity.elements.EntityStatsElement; import com.songoda.epicbosses.managers.BossPanelManager; import com.songoda.epicbosses.skills.Skill; -import com.songoda.epicbosses.skills.types.PotionSkillElement; import com.songoda.epicbosses.utils.*; import com.songoda.epicbosses.utils.itemstack.ItemStackUtils; import com.songoda.epicbosses.utils.panel.Panel; import com.songoda.epicbosses.utils.panel.base.handlers.SubVariablePanelHandler; import com.songoda.epicbosses.utils.panel.builder.PanelBuilder; +import com.songoda.epicbosses.utils.potion.PotionEffectConverter; import com.songoda.epicbosses.utils.potion.holder.PotionEffectHolder; import org.bukkit.Material; -import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.PotionMeta; -import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionEffectType; -import org.bukkit.potion.PotionType; import java.util.Arrays; import java.util.HashMap; @@ -34,6 +29,7 @@ import java.util.stream.Collectors; */ public class PotionEffectTypeEditorPanel extends SubVariablePanelHandler { + private PotionEffectConverter potionEffectConverter = new PotionEffectConverter(); private CustomBosses plugin; public PotionEffectTypeEditorPanel(BossPanelManager bossPanelManager, PanelBuilder panelBuilder, CustomBosses plugin) { @@ -81,11 +77,8 @@ public class PotionEffectTypeEditorPanel extends SubVariablePanelHandler replaceMap = new HashMap<>(); diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/utils/Versions.java b/plugin-modules/Core/src/com/songoda/epicbosses/utils/Versions.java index 28f6674..3760a2c 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/utils/Versions.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/utils/Versions.java @@ -18,9 +18,7 @@ public enum Versions { v1_9_R2(7, "1.9.4"), v1_10_R1(8, "1.10"), v1_11_R1(9, "1.11.2"), - v1_12_R1(10, "1.12.1"), - v1_13_R1(11, "1.13"), - v1_13_R2(12, "1.13.2"); + v1_12_R1(10, "1.12.1"); @Getter private String displayVersion, bukkitVersion; private int weight; diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/utils/entity/handlers/IllusionerHandler.java b/plugin-modules/Core/src/com/songoda/epicbosses/utils/entity/handlers/IllusionerHandler.java deleted file mode 100644 index b09c96f..0000000 --- a/plugin-modules/Core/src/com/songoda/epicbosses/utils/entity/handlers/IllusionerHandler.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.songoda.epicbosses.utils.entity.handlers; - -import com.songoda.epicbosses.utils.Versions; -import com.songoda.epicbosses.utils.entity.ICustomEntityHandler; -import com.songoda.epicbosses.utils.version.VersionHandler; -import org.bukkit.Location; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.LivingEntity; - -/** - * @author Charles Cullen - * @version 1.0.0 - * @since 01-Jul-18 - */ -public class IllusionerHandler implements ICustomEntityHandler { - - private VersionHandler versionHandler = new VersionHandler(); - - @Override - public LivingEntity getBaseEntity(String entityType, Location spawnLocation) { - if(this.versionHandler.getVersion().isLessThan(Versions.v1_11_R1)) { - throw new NullPointerException("This feature is only implemented in version 1.11 and above of Minecraft."); - } - - return (LivingEntity) spawnLocation.getWorld().spawnEntity(spawnLocation, EntityType.ILLUSIONER); - } -} diff --git a/pom.xml b/pom.xml index 6754ea4..e52ffaf 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ org.spigotmc spigot - 1.13.2 + 1.12.2 provided