diff --git a/MMOItems-API/pom.xml b/MMOItems-API/pom.xml
index eeaa37af..84cdd859 100644
--- a/MMOItems-API/pom.xml
+++ b/MMOItems-API/pom.xml
@@ -58,11 +58,6 @@
https://jitpack.io
-
- mojang
- https://libraries.minecraft.net/
-
-
sonatype
https://s01.oss.sonatype.org/content/repositories/snapshots/
@@ -104,29 +99,30 @@
- org.spigotmc
- spigot-api
- 1.20.1-R0.1-SNAPSHOT
+ io.papermc.paper
+ paper-api
+ 1.20.6-R0.1-SNAPSHOT
provided
true
+
+
+
+ com.mojang
+ brigadier
+
+
+
org.apache.maven.plugins
maven-clean-plugin
- 3.1.0
+ 3.3.2
provided
true
-
-
- com.mojang
- authlib
- 1.5.21
- provided
- true
-
-
+
+
net.Indyuce
MMOCore-API
@@ -148,6 +144,14 @@
auraskills-api-bukkit
2.0.0-SNAPSHOT
provided
+ true
+
+
+
+ org.spongepowered
+ configurate-yaml
+
+
@@ -177,9 +181,32 @@
com.sk89q.worldguard
worldguard-bukkit
- 7.0.2-SNAPSHOT
+ 7.0.9-SNAPSHOT
provided
true
+
+
+
+ org.flywaydb
+ flyway-core
+
+
+ org.antlr
+ antlr4
+
+
+ org.mozilla
+ rhino-runtime
+
+
+ org.antlr
+ antlr4-runtime
+
+
+ org.spigotmc
+ spigot-api
+
+
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/ItemStats.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/ItemStats.java
index 717e3dc6..4d8c8d91 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/ItemStats.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/ItemStats.java
@@ -1,6 +1,6 @@
package net.Indyuce.mmoitems;
-import io.lumine.mythic.lib.version.VersionMaterial;
+import io.lumine.mythic.lib.version.VMaterial;
import net.Indyuce.mmoitems.stat.*;
import net.Indyuce.mmoitems.stat.block.*;
import net.Indyuce.mmoitems.stat.type.*;
@@ -46,10 +46,10 @@ public class ItemStats {
PROJECTILE_PARTICLES = new ProjectileParticles(),
// Disable Interaction Stats
- DISABLE_INTERACTION = new DisableStat("INTERACTION", VersionMaterial.GRASS_BLOCK.toMaterial(), "Disable Interaction", new String[]{"!block", "all"}, "Disable any unwanted interaction:", "block placement, item use..."),
- DISABLE_CRAFTING = new DisableStat("CRAFTING", VersionMaterial.CRAFTING_TABLE.toMaterial(), "Disable Crafting", "Players can't use this item while crafting."), DISABLE_SMELTING = new DisableStat("SMELTING", Material.FURNACE, "Disable Smelting", "Players can't use this item in furnaces."),
+ DISABLE_INTERACTION = new DisableStat("INTERACTION", VMaterial.GRASS_BLOCK.get(), "Disable Interaction", new String[]{"!block", "all"}, "Disable any unwanted interaction:", "block placement, item use..."),
+ DISABLE_CRAFTING = new DisableStat("CRAFTING", Material.CRAFTING_TABLE, "Disable Crafting", "Players can't use this item while crafting."), DISABLE_SMELTING = new DisableStat("SMELTING", Material.FURNACE, "Disable Smelting", "Players can't use this item in furnaces."),
DISABLE_SMITHING = new DisableStat("SMITHING", Material.DAMAGED_ANVIL, "Disable Smithing", "Players can't smith this item in smithing tables."),
- DISABLE_ENCHANTING = new DisableStat("ENCHANTING", VersionMaterial.ENCHANTING_TABLE.toMaterial(), "Disable Enchanting", new String[]{"!block", "all"}, "Players can't enchant this item."),
+ DISABLE_ENCHANTING = new DisableStat("ENCHANTING", Material.ENCHANTING_TABLE, "Disable Enchanting", new String[]{"!block", "all"}, "Players can't enchant this item."),
DISABLE_REPAIRING = new DisableStat("REPAIRING", Material.ANVIL, "Disable Repairing", new String[]{"!block", "all"}, "Players can't use this item in anvils."),
DISABLE_ARROW_SHOOTING = new DisableStat("ARROW_SHOOTING", Material.ARROW, "Disable Arrow Shooting", new Material[]{Material.ARROW}, "Players can't shoot this", "item using a bow."),
DISABLE_DROP = new DisableStat("DROPING", Material.LAVA_BUCKET, "Disable Item Dropping", new String[0], "Disables the dropping of this item!"),
@@ -79,11 +79,11 @@ public class ItemStats {
COOLDOWN_REDUCTION = new DoubleStat("COOLDOWN_REDUCTION", Material.BOOK, "Cooldown Reduction", new String[]{"Reduces cooldowns of item and player skills (%)."}),
RANGE = new DoubleStat("RANGE", Material.STICK, "Range", new String[]{"The range of your item attacks."}, new String[]{"staff", "whip", "wand", "musket", "gem_stone"}),
MANA_COST = new ManaCost(),
- STAMINA_COST = new DoubleStat("STAMINA_COST", VersionMaterial.LIGHT_GRAY_DYE.toMaterial(), "Stamina Cost", new String[]{"Stamina spent by your weapon to be used."}, new String[]{"weapon"}),
+ STAMINA_COST = new DoubleStat("STAMINA_COST", Material.LIGHT_GRAY_DYE, "Stamina Cost", new String[]{"Stamina spent by your weapon to be used."}, new String[]{"weapon"}),
ARROW_VELOCITY = new DoubleStat("ARROW_VELOCITY", Material.ARROW, "Arrow Velocity", new String[]{"Determines how far your", "weapon can shoot.", "Default: 1.0"}, new String[]{"gem_stone", "bow", "crossbow"}),
ARROW_POTION_EFFECTS = new ArrowPotionEffects(),
- PVE_DAMAGE = new DoubleStat("PVE_DAMAGE", VersionMaterial.PORKCHOP.toMaterial(), "PvE Damage", new String[]{"Additional damage against", "non human entities in %."}, new String[]{"equipment", "gem_stone"}),
- PVP_DAMAGE = new DoubleStat("PVP_DAMAGE", VersionMaterial.SKELETON_SKULL.toMaterial(), "PvP Damage", new String[]{"Additional damage", "against players in %."}, new String[]{"equipment", "gem_stone"}),
+ PVE_DAMAGE = new DoubleStat("PVE_DAMAGE", Material.PORKCHOP, "PvE Damage", new String[]{"Additional damage against", "non human entities in %."}, new String[]{"equipment", "gem_stone"}),
+ PVP_DAMAGE = new DoubleStat("PVP_DAMAGE", Material.SKELETON_SKULL, "PvP Damage", new String[]{"Additional damage", "against players in %."}, new String[]{"equipment", "gem_stone"}),
BLUNT_POWER = new DoubleStat("BLUNT_POWER", Material.IRON_AXE, "Blunt Power", new String[]{"The radius of the AoE attack.", "If set to 2.0, enemies within 2 blocks", "around your target will take damage.", "&9This stat only applies to Blunt weapons."}, new String[]{"weapon", "gem_stone"}),
BLUNT_RATING = new DoubleStat("BLUNT_RATING", Material.BRICK, "Blunt Rating", new String[]{"The force of the blunt attack.", "If set to 50%, enemies hit by the attack", "will take 50% of the initial damage.", "&9This stat only applies to Blunt weapons."}, new String[]{"weapon", "gem_stone"}),
WEAPON_DAMAGE = new DoubleStat("WEAPON_DAMAGE", Material.IRON_SWORD, "Weapon Damage", new String[]{"Additional on-hit weapon damage in %."}),
@@ -94,13 +94,13 @@ public class ItemStats {
DEFENSE = new DoubleStat("DEFENSE", Material.SHIELD, "Defense", new String[]{"Reduces damage from any source.", "Formula can be set in MMOLib Config."}),
DAMAGE_REDUCTION = new DoubleStat("DAMAGE_REDUCTION", Material.IRON_CHESTPLATE, "Damage Reduction", new String[]{"Reduces damage from any source.", "In %."}),
FALL_DAMAGE_REDUCTION = new DoubleStat("FALL_DAMAGE_REDUCTION", Material.FEATHER, "Fall Damage Reduction", new String[]{"Reduces fall damage.", "In %."}),
- PROJECTILE_DAMAGE_REDUCTION = new DoubleStat("PROJECTILE_DAMAGE_REDUCTION", VersionMaterial.SNOWBALL.toMaterial(), "Projectile Damage Reduction", new String[]{"Reduces projectile damage.", "In %."}),
+ PROJECTILE_DAMAGE_REDUCTION = new DoubleStat("PROJECTILE_DAMAGE_REDUCTION", Material.SNOWBALL, "Projectile Damage Reduction", new String[]{"Reduces projectile damage.", "In %."}),
PHYSICAL_DAMAGE_REDUCTION = new DoubleStat("PHYSICAL_DAMAGE_REDUCTION", Material.LEATHER_CHESTPLATE, "Physical Damage Reduction", new String[]{"Reduces physical damage.", "In %."}),
FIRE_DAMAGE_REDUCTION = new DoubleStat("FIRE_DAMAGE_REDUCTION", Material.BLAZE_POWDER, "Fire Damage Reduction", new String[]{"Reduces fire damage.", "In %."}),
MAGIC_DAMAGE_REDUCTION = new DoubleStat("MAGIC_DAMAGE_REDUCTION", Material.POTION, "Magic Damage Reduction", new String[]{"Reduce magic damage dealt by potions.", "In %."}),
- PVE_DAMAGE_REDUCTION = new DoubleStat("PVE_DAMAGE_REDUCTION", VersionMaterial.PORKCHOP.toMaterial(), "PvE Damage Reduction", new String[]{"Reduces damage dealt by mobs.", "In %."}),
- PVP_DAMAGE_REDUCTION = new DoubleStat("PVP_DAMAGE_REDUCTION", VersionMaterial.SKELETON_SKULL.toMaterial(), "PvP Damage Reduction", new String[]{"Reduces damage dealt by players", "In %."}),
- UNDEAD_DAMAGE = new DoubleStat("UNDEAD_DAMAGE", VersionMaterial.SKELETON_SKULL.toMaterial(), "Undead Damage", new String[]{"Deals additional damage to undead.", "In %."}),
+ PVE_DAMAGE_REDUCTION = new DoubleStat("PVE_DAMAGE_REDUCTION", Material.PORKCHOP, "PvE Damage Reduction", new String[]{"Reduces damage dealt by mobs.", "In %."}),
+ PVP_DAMAGE_REDUCTION = new DoubleStat("PVP_DAMAGE_REDUCTION", Material.SKELETON_SKULL, "PvP Damage Reduction", new String[]{"Reduces damage dealt by players", "In %."}),
+ UNDEAD_DAMAGE = new DoubleStat("UNDEAD_DAMAGE", Material.SKELETON_SKULL, "Undead Damage", new String[]{"Deals additional damage to undead.", "In %."}),
LIFESTEAL = new DoubleStat("LIFESTEAL", Material.REDSTONE, "Lifesteal", new String[]{"Percentage of damage you gain back as", "health when inflicting weapon damage."}),
SPELL_VAMPIRISM = new DoubleStat("SPELL_VAMPIRISM", Material.REDSTONE, "Spell Vampirism", new String[]{"Percentage of damage you gain back as", "health when inflicting skill damage."}),
@@ -108,11 +108,11 @@ public class ItemStats {
UNBREAKABLE = new Unbreakable(),
TIER = new ItemTierStat(),
SET = new ItemSetStat(),
- ARMOR = new DoubleStat("ARMOR", VersionMaterial.GOLDEN_CHESTPLATE.toMaterial(), "Armor", new String[]{"The armor given to the holder."}),
+ ARMOR = new DoubleStat("ARMOR", Material.GOLDEN_CHESTPLATE, "Armor", new String[]{"The armor given to the holder."}),
ARMOR_TOUGHNESS = new DoubleStat("ARMOR_TOUGHNESS", Material.DIAMOND_CHESTPLATE, "Armor Toughness", new String[]{"Armor toughness reduces damage taken."}),
MAX_HEALTH = new DoubleStat("MAX_HEALTH", Material.GOLDEN_APPLE, "Max Health", new String[]{"The amount of health your", "item gives to the holder."}),
UNSTACKABLE = new Unstackable(),
- MAX_MANA = new DoubleStat("MAX_MANA", VersionMaterial.LAPIS_LAZULI.toMaterial(), "Max Mana", new String[]{"Adds mana to your max mana bar."}),
+ MAX_MANA = new DoubleStat("MAX_MANA", Material.LAPIS_LAZULI, "Max Mana", new String[]{"Adds mana to your max mana bar."}),
KNOCKBACK_RESISTANCE = new KnockbackResistance(),
MOVEMENT_SPEED = new MovementSpeed(),
TWO_HANDED = new BooleanStat("TWO_HANDED", Material.IRON_INGOT, "Two Handed", new String[]{"If set to true, a player will be", "significantly slower if holding two", "items, one being Two Handed."}, new String[]{"handheld"}),
@@ -154,7 +154,7 @@ public class ItemStats {
// Unique Stats
AUTOSMELT = new BooleanStat("AUTOSMELT", Material.COAL, "Autosmelt", new String[]{"If set to true, your tool will", "automaticaly smelt mined ores."}, new String[]{"tool"}),
- BOUNCING_CRACK = new BooleanStat("BOUNCING_CRACK", VersionMaterial.COBBLESTONE_WALL.toMaterial(), "Bouncing Crack", new String[]{"If set to true, your tool will", "also break nearby blocks."}, new String[]{"tool"}),
+ BOUNCING_CRACK = new BooleanStat("BOUNCING_CRACK", Material.COBBLESTONE_WALL, "Bouncing Crack", new String[]{"If set to true, your tool will", "also break nearby blocks."}, new String[]{"tool"}),
PICKAXE_POWER = new PickaxePower(),
CUSTOM_SOUNDS = new CustomSounds(),
ELEMENTS = new Elements(),
@@ -162,7 +162,7 @@ public class ItemStats {
// STAFF_SPIRIT = new StaffSpiritStat(),
LUTE_ATTACK_SOUND = new LuteAttackSoundStat(),
LUTE_ATTACK_EFFECT = new LuteAttackEffectStat(),
- NOTE_WEIGHT = new DoubleStat("NOTE_WEIGHT", VersionMaterial.MUSIC_DISC_MALL.toMaterial(), "Note Weight", new String[]{"Defines how the projectile cast", "by your lute tilts downwards."}, new String[]{"lute"}),
+ NOTE_WEIGHT = new DoubleStat("NOTE_WEIGHT", Material.MUSIC_DISC_MALL, "Note Weight", new String[]{"Defines how the projectile cast", "by your lute tilts downwards."}, new String[]{"lute"}),
REMOVE_ON_CRAFT = new BooleanStat("REMOVE_ON_CRAFT", Material.GLASS_BOTTLE, "Remove on Craft", new String[]{"If the item should be completely", "removed when used in a recipe,", "or if it should become an", "empty bottle or bucket."}, new String[0], Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION, Material.MILK_BUCKET, Material.LAVA_BUCKET, Material.WATER_BUCKET),
COMPATIBLE_TYPES = new CompatibleTypes(),
COMPATIBLE_IDS = new CompatibleIds(),
@@ -175,8 +175,8 @@ public class ItemStats {
REPAIR_TYPE = new RepairReference(),
INEDIBLE = new BooleanStat("INEDIBLE", Material.POISONOUS_POTATO, "Inedible", new String[]{"Players won't be able to right-click this consumable.", "", "No effects of it will take place."}, new String[]{"consumable"}),
DISABLE_RIGHT_CLICK_CONSUME = new DisableStat("RIGHT_CLICK_CONSUME", Material.BAKED_POTATO, "Infinite Consume", new String[]{"consumable"}, "Players will be able to right-click this consumable", "and benefit from its effects, but it won't be consumed."),
- KNOCKBACK = new DoubleStat("KNOCKBACK", VersionMaterial.IRON_HORSE_ARMOR.toMaterial(), "Knockback", new String[]{"Using this musket will knock", "the user back if positive."}, new String[]{"musket", "gem_stone"}),
- RECOIL = new DoubleStat("RECOIL", VersionMaterial.IRON_HORSE_ARMOR.toMaterial(), "Recoil", new String[]{"Corresponds to the shooting innacuracy."}, new String[]{"musket", "gem_stone"}),
+ KNOCKBACK = new DoubleStat("KNOCKBACK", Material.IRON_HORSE_ARMOR, "Knockback", new String[]{"Using this musket will knock", "the user back if positive."}, new String[]{"musket", "gem_stone"}),
+ RECOIL = new DoubleStat("RECOIL", Material.IRON_HORSE_ARMOR, "Recoil", new String[]{"Corresponds to the shooting innacuracy."}, new String[]{"musket", "gem_stone"}),
HANDWORN = new BooleanStat("HANDWORN", Material.STRING, "Handworn", new String[]{"This item can be held along with a", "two-handed weapon in the other hand."}, new String[]{"catalyst", "off_catalyst", "main_catalyst"}),
AMPHIBIAN = new Amphibian(),
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java
index be4e6947..59b929db 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java
@@ -1,7 +1,6 @@
package net.Indyuce.mmoitems.api;
import io.lumine.mythic.lib.UtilityMethods;
-import io.lumine.mythic.lib.version.VersionMaterial;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
@@ -11,7 +10,7 @@ public enum CustomSound {
ON_BLOCK_BREAK(Material.COBBLESTONE, 25, "Plays when a block is broken with the item."),
ON_PICKUP(Material.IRON_INGOT, 28, "Plays when you pickup the item from the ground."),
ON_LEFT_CLICK(Material.STONE_AXE, 31, "Plays when item is left-clicked."),
- ON_CRAFT(VersionMaterial.CRAFTING_TABLE.toMaterial(), 34, "Plays when item is crafted in a crafting inventory", "or when smelted from someting in a furnace."),
+ ON_CRAFT(Material.CRAFTING_TABLE, 34, "Plays when item is crafted in a crafting inventory", "or when smelted from someting in a furnace."),
ON_CONSUME(Material.APPLE, 37, "Plays when item has been consumed.", "(After eating/drinking animation)"),
ON_ITEM_BREAK(Material.FLINT, 40, "Plays when the item breaks."),
ON_CROSSBOW(Material.ARROW, 38, "Plays when a crossbow shoots an arrow."),
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java
index 32901928..4650f8a7 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java
@@ -3,7 +3,6 @@ package net.Indyuce.mmoitems.api.interaction;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.Type;
@@ -14,6 +13,7 @@ import net.Indyuce.mmoitems.stat.data.SkullTextureData;
import net.Indyuce.mmoitems.stat.data.StringListData;
import net.Indyuce.mmoitems.util.MMOUtils;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemFlag;
@@ -175,8 +175,8 @@ public class ItemSkin extends UseItem {
// Skull texture
if (volSkin.hasData(ItemStats.SKULL_TEXTURE)
- && item.getType() == VersionMaterial.PLAYER_HEAD.toMaterial()
- && nbtSkin.getItem().getType() == VersionMaterial.PLAYER_HEAD.toMaterial())
+ && item.getType() == Material.PLAYER_HEAD
+ && nbtSkin.getItem().getType() == Material.PLAYER_HEAD)
MythicLib.plugin.getVersion().getWrapper().setProfile((SkullMeta) meta,
((SkullTextureData) volSkin.getData(ItemStats.SKULL_TEXTURE)).getGameProfile());
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java
index 42c01d9a..aa922dda 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java
@@ -7,16 +7,17 @@ import io.lumine.mythic.lib.comp.flags.CustomFlag;
import io.lumine.mythic.lib.math3.geometry.euclidean.threed.Line;
import io.lumine.mythic.lib.math3.geometry.euclidean.threed.Vector3D;
import io.lumine.mythic.lib.version.OreDrops;
+import io.lumine.mythic.lib.version.VEnchantment;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.event.BouncingCrackBlockBreakEvent;
import net.Indyuce.mmoitems.api.player.PlayerData;
+import net.Indyuce.mmoitems.util.MMOUtils;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.scheduler.BukkitRunnable;
@@ -45,7 +46,8 @@ public class Tool extends UseItem {
if (getNBTItem().getBoolean("MMOITEMS_AUTOSMELT")) {
final OreDrops drops = MythicLib.plugin.getVersion().getWrapper().getOreDrops(block.getType());
if (drops != null) {
- UtilityMethods.dropItemNaturally(block.getLocation(), drops.generate(getFortuneLevel()));
+ final int fortuneLevel = MMOUtils.getLevel(getItem(), VEnchantment.FORTUNE.get());
+ UtilityMethods.dropItemNaturally(block.getLocation(), drops.generate(fortuneLevel));
block.getWorld().spawnParticle(Particle.LAVA, block.getLocation().add(.5, .5, .5), 4);
block.setType(Material.AIR);
cancel = true;
@@ -117,11 +119,6 @@ public class Tool extends UseItem {
return cancel;
}
- private int getFortuneLevel() {
- if (!getItem().hasItemMeta()) return 0;
- return getItem().getItemMeta().getEnchantLevel(Enchantment.LOOT_BONUS_BLOCKS);
- }
-
private Vector3D toJava(Vector vector) {
return new Vector3D(vector.getX(), vector.getY(), vector.getZ());
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java
index cd298675..35a9bc73 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java
@@ -6,8 +6,8 @@ import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
import io.lumine.mythic.lib.api.item.SupportedNBTTagValues;
+import io.lumine.mythic.lib.version.VEnchantment;
import net.Indyuce.mmoitems.ItemStats;
-import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.event.item.CustomDurabilityDamage;
import net.Indyuce.mmoitems.api.event.item.ItemCustomRepairEvent;
import net.Indyuce.mmoitems.api.item.mmoitem.LiveMMOItem;
@@ -15,11 +15,11 @@ import net.Indyuce.mmoitems.api.item.util.LoreUpdate;
import net.Indyuce.mmoitems.api.player.PlayerData;
import net.Indyuce.mmoitems.stat.data.DoubleData;
import net.Indyuce.mmoitems.stat.data.UpgradeData;
+import net.Indyuce.mmoitems.util.MMOUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Sound;
-import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
@@ -74,8 +74,7 @@ public class DurabilityItem {
initialDurability = durability = nbtItem.hasTag("MMOITEMS_DURABILITY") ? nbtItem.getInteger("MMOITEMS_DURABILITY") : maxDurability;
barHidden = nbtItem.getBoolean("MMOITEMS_DURABILITY_BAR");
- unbreakingLevel = (nbtItem.getItem().getItemMeta() != null && nbtItem.getItem().getItemMeta().hasEnchant(Enchantment.DURABILITY)) ?
- nbtItem.getItem().getItemMeta().getEnchantLevel(Enchantment.DURABILITY) : 0;
+ unbreakingLevel = MMOUtils.getLevel(nbtItem.getItem(), VEnchantment.UNBREAKING.get());
}
public Player getPlayer() {
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java
index 5d6f756d..fbd49958 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Lute.java
@@ -6,7 +6,7 @@ import io.lumine.mythic.lib.api.player.EquipmentSlot;
import io.lumine.mythic.lib.comp.interaction.InteractionType;
import io.lumine.mythic.lib.damage.DamageType;
import io.lumine.mythic.lib.player.PlayerMetadata;
-import io.lumine.mythic.lib.version.VersionSound;
+import io.lumine.mythic.lib.version.VSound;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.interaction.weapon.Weapon;
import net.Indyuce.mmoitems.api.player.PlayerData;
@@ -48,7 +48,7 @@ public class Lute extends Weapon implements LegacyWeapon {
final Vector weight = new Vector(0, -.003 * stats.getStat("NOTE_WEIGHT"), 0);
final @Nullable LuteAttackEffect effect = LuteAttackEffect.get(getNBTItem());
- @Deprecated final SoundReader sound = new SoundReader(getNBTItem().getString("MMOITEMS_LUTE_ATTACK_SOUND"), VersionSound.BLOCK_NOTE_BLOCK_BELL.toSound());
+ @Deprecated final SoundReader sound = new SoundReader(getNBTItem().getString("MMOITEMS_LUTE_ATTACK_SOUND"), VSound.BLOCK_NOTE_BLOCK_BELL.get());
final @NotNull ProjectileParticlesData projParticle = getNBTItem().hasTag("MMOITEMS_PROJECTILE_PARTICLES") ?
new ProjectileParticlesData(getNBTItem().getString("MMOITEMS_PROJECTILE_PARTICLES")) : ProjectileParticlesData.DEFAULT;
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/MMOItemTemplate.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/MMOItemTemplate.java
index 94892246..2ccc5860 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/MMOItemTemplate.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/MMOItemTemplate.java
@@ -16,7 +16,7 @@ import net.Indyuce.mmoitems.api.util.NumericStatFormula;
import net.Indyuce.mmoitems.api.util.message.FFPMMOItems;
import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
import net.Indyuce.mmoitems.stat.type.ItemStat;
-import org.apache.commons.lang.Validate;
+import org.apache.commons.lang3.Validate;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/NameModifier.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/NameModifier.java
index 17147a3a..363fde47 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/NameModifier.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/template/NameModifier.java
@@ -1,7 +1,6 @@
package net.Indyuce.mmoitems.api.item.template;
import io.lumine.mythic.lib.UtilityMethods;
-import net.Indyuce.mmoitems.util.MMOUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.configuration.ConfigurationSection;
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/ConfigItems.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/ConfigItems.java
index 29614fce..8a82d227 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/ConfigItems.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/ConfigItems.java
@@ -3,11 +3,11 @@ package net.Indyuce.mmoitems.api.item.util;
import net.Indyuce.mmoitems.api.item.util.crafting.CraftingRecipeDisplay;
import net.Indyuce.mmoitems.api.item.util.crafting.QueueItemDisplay;
import net.Indyuce.mmoitems.api.item.util.crafting.UpgradingRecipeDisplay;
-import io.lumine.mythic.lib.version.VersionMaterial;
+import org.bukkit.Material;
public class ConfigItems {
- public static final ConfigItem CONFIRM = new ConfigItem("CONFIRM", VersionMaterial.GREEN_STAINED_GLASS_PANE.toMaterial(), "&aConfirm");
- public static final ConfigItem FILL = new ConfigItem("FILL", VersionMaterial.GRAY_STAINED_GLASS_PANE.toMaterial(), "&8");
+ public static final ConfigItem CONFIRM = new ConfigItem("CONFIRM", Material.GREEN_STAINED_GLASS_PANE, "&aConfirm");
+ public static final ConfigItem FILL = new ConfigItem("FILL", Material.GRAY_STAINED_GLASS_PANE, "&8");
public static final CustomSkull PREVIOUS_PAGE = new CustomSkull("PREVIOUS_PAGE",
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQ2OWUwNmU1ZGFkZmQ4NGU1ZjNkMWMyMTA2M2YyNTUzYjJmYTk0NWVlMWQ0ZDcxNTJmZGM1NDI1YmMxMmE5In19fQ==",
"&aPrevious Page");
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/CustomSkull.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/CustomSkull.java
index 37ec05fd..930dee39 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/CustomSkull.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/item/util/CustomSkull.java
@@ -4,9 +4,10 @@ import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.util.AdventureUtils;
-import io.lumine.mythic.lib.version.VersionMaterial;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.inventory.ItemFlag;
+import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
import java.util.stream.Collectors;
@@ -19,13 +20,13 @@ public class CustomSkull extends ConfigItem {
}
public CustomSkull(String id, String textureValue, String name, String... lore) {
- super(id, VersionMaterial.PLAYER_HEAD.toMaterial(), name, lore);
+ super(id, Material.PLAYER_HEAD, name, lore);
this.textureValue = textureValue;
}
public void updateItem() {
- setItem(VersionMaterial.PLAYER_HEAD.toItem());
+ setItem(new ItemStack(Material.PLAYER_HEAD));
SkullMeta meta = (SkullMeta) getItem().getItemMeta();
AdventureUtils.setDisplayName(meta, getName());
meta.addItemFlags(ItemFlag.values());
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java
index 8eb0cefd..0e3ca4ec 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java
@@ -11,6 +11,7 @@ import io.lumine.mythic.lib.player.modifier.ModifierSource;
import io.lumine.mythic.lib.player.skill.PassiveSkill;
import io.lumine.mythic.lib.skill.trigger.TriggerMetadata;
import io.lumine.mythic.lib.util.Closeable;
+import io.lumine.mythic.lib.version.VPotionEffectType;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.ItemSet;
@@ -277,7 +278,7 @@ public class PlayerData extends SynchronizedDataHolder implements Closeable {
// Two handed slowness
if (encumbered)
- getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 40, 1, true, false));
+ getPlayer().addPotionEffect(new PotionEffect(VPotionEffectType.SLOWNESS.get(), 40, 1, true, false));
}
public InventoryUpdateHandler getInventory() {
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java
index 6cc74096..145fe127 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java
@@ -3,6 +3,7 @@ package net.Indyuce.mmoitems.api.util;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
+import io.lumine.mythic.lib.version.VEnchantment;
import net.Indyuce.mmoitems.MMOItems;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -104,7 +105,7 @@ public class NoClipItem implements Listener {
* to look like a vanilla item if a player somehow picks it up and Luck 0 does nothing.
*/
if (oldItem.getItemMeta().hasEnchants()) {
- newItemMeta.addEnchant(Enchantment.LUCK, 0, true);
+ newItemMeta.addEnchant(VEnchantment.POWER.get(), 0, true);
newItemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/command/mmoitems/debug/HealCommandTreeNode.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/command/mmoitems/debug/HealCommandTreeNode.java
index 7fff05ae..761beaea 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/command/mmoitems/debug/HealCommandTreeNode.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/command/mmoitems/debug/HealCommandTreeNode.java
@@ -1,5 +1,6 @@
package net.Indyuce.mmoitems.command.mmoitems.debug;
+import io.lumine.mythic.lib.version.VPotionEffectType;
import org.bukkit.ChatColor;
import org.bukkit.attribute.Attribute;
import org.bukkit.command.CommandSender;
@@ -25,8 +26,9 @@ public class HealCommandTreeNode extends CommandTreeNode {
player.setFoodLevel(20);
player.setFireTicks(0);
player.setSaturation(12);
- for (PotionEffectType pe : new PotionEffectType[] { PotionEffectType.POISON, PotionEffectType.BLINDNESS, PotionEffectType.CONFUSION,
- PotionEffectType.HUNGER, PotionEffectType.WEAKNESS, PotionEffectType.SLOW, PotionEffectType.SLOW_DIGGING })
+ for (PotionEffectType pe : new PotionEffectType[] { PotionEffectType.POISON, PotionEffectType.BLINDNESS, VPotionEffectType
+ .NAUSEA.get(),
+ PotionEffectType.HUNGER, PotionEffectType.WEAKNESS, VPotionEffectType.SLOWNESS.get(), PotionEffectType.MINING_FATIGUE })
player.removePotionEffect(pe);
return CommandResult.SUCCESS;
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/enchants/advanced_enchants/AdvancedEnchantsStat.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/enchants/advanced_enchants/AdvancedEnchantsStat.java
index 09f33af2..df4a1c61 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/enchants/advanced_enchants/AdvancedEnchantsStat.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/enchants/advanced_enchants/AdvancedEnchantsStat.java
@@ -1,10 +1,7 @@
package net.Indyuce.mmoitems.comp.enchants.advanced_enchants;
import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.api.item.SupportedNBTTagValues;
-import io.lumine.mythic.lib.api.util.ui.SilentNumbers;
import io.lumine.mythic.lib.util.annotation.BackwardsCompatibility;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
import net.Indyuce.mmoitems.gui.edition.EditionInventory;
@@ -12,8 +9,9 @@ import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
import net.Indyuce.mmoitems.stat.type.InternalStat;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.advancedplugins.ae.api.AEAPI;
-import org.apache.commons.lang3.Validate;
+import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
+import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.meta.ItemMeta;
@@ -34,7 +32,7 @@ public class AdvancedEnchantsStat extends ItemStat drops;
/*
- * Y coordinate offset so the velocity is not directly negated when the
- * item spawns on the ground
+ * Y coordinate offset so the velocity is not
+ * directly negated when the item spawns on the ground
*/
private final double offset;
@@ -85,7 +86,7 @@ public class LootsplosionListener implements Listener {
private Vector randomVector() {
double offset = MMOItems.plugin.getConfig().getDouble("lootsplosion.offset"),
height = MMOItems.plugin.getConfig().getDouble("lootsplosion.height");
- return new Vector(Math.cos(random.nextDouble() * Math.PI * 2) * offset, height, Math.sin(random.nextDouble() * Math.PI * 2) * offset);
+ return new Vector(Math.cos(RANDOM.nextDouble() * Math.PI * 2) * offset, height, Math.sin(RANDOM.nextDouble() * Math.PI * 2) * offset);
}
public class LootColor extends BukkitRunnable {
@@ -108,7 +109,7 @@ public class LootsplosionListener implements Listener {
return;
}
- item.getWorld().spawnParticle(Particle.REDSTONE, item.getLocation(), 1, new Particle.DustOptions(color, 1.3f));
+ item.getWorld().spawnParticle(VParticle.REDSTONE.get(), item.getLocation(), 1, new Particle.DustOptions(color, 1.3f));
}
}
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/mythicmobs/stat/FactionDamage.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/mythicmobs/stat/FactionDamage.java
index 645a3b6e..860d73a6 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/mythicmobs/stat/FactionDamage.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/mythicmobs/stat/FactionDamage.java
@@ -1,12 +1,12 @@
package net.Indyuce.mmoitems.comp.mythicmobs.stat;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.stat.type.DoubleStat;
+import org.bukkit.Material;
public class FactionDamage extends DoubleStat {
public FactionDamage(String faction) {
- super("FACTION_DAMAGE_" + faction.toUpperCase(), VersionMaterial.RED_DYE.toMaterial(), faction + " Faction Damage", new String[]{"Deals additional damage to mobs", "from the " + faction + " faction in %."}, new String[]{"!block", "all"});
+ super("FACTION_DAMAGE_" + faction.toUpperCase(), Material.RED_DYE, faction + " Faction Damage", new String[]{"Deals additional damage to mobs", "from the " + faction + " faction in %."}, new String[]{"!block", "all"});
}
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AuraSkillsHook.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AuraSkillsHook.java
index a4584157..db3eb2a9 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AuraSkillsHook.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AuraSkillsHook.java
@@ -4,15 +4,14 @@ import dev.aurelium.auraskills.api.AuraSkillsApi;
import dev.aurelium.auraskills.api.event.skill.SkillLevelUpEvent;
import dev.aurelium.auraskills.api.event.user.UserLoadEvent;
import dev.aurelium.auraskills.api.skill.Skill;
+import dev.aurelium.auraskills.api.skill.Skills;
import dev.aurelium.auraskills.api.stat.StatModifier;
import dev.aurelium.auraskills.api.stat.Stats;
-import dev.aurelium.auraskills.api.skill.Skills;
import dev.aurelium.auraskills.api.trait.TraitModifier;
import dev.aurelium.auraskills.api.trait.Traits;
import dev.aurelium.auraskills.api.user.SkillsUser;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.NBTItem;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.player.EmptyRPGPlayer;
@@ -22,7 +21,10 @@ import net.Indyuce.mmoitems.api.util.message.Message;
import net.Indyuce.mmoitems.stat.type.DoubleStat;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.Indyuce.mmoitems.stat.type.RequiredLevelStat;
-import org.bukkit.*;
+import org.bukkit.ChatColor;
+import org.bukkit.Material;
+import org.bukkit.OfflinePlayer;
+import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@@ -151,7 +153,7 @@ public class AuraSkillsHook implements RPGHandler, Listener {
private final Skill skill;
public RequiredProfessionStat(Skills skill) {
- super(skill.name(), VersionMaterial.EXPERIENCE_BOTTLE.toMaterial(), skill.getDisplayName(Locale.getDefault()),
+ super(skill.name(), Material.EXPERIENCE_BOTTLE, skill.getDisplayName(Locale.getDefault()),
new String[]{"Amount of " + skill.getDisplayName(Locale.getDefault()) + " levels the", "player needs to use the item.", "(AuraSkills)"});
this.skill = aSkills.getGlobalRegistry().getSkill(skill.getId());
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java
index 67184ce4..73feadf7 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java
@@ -9,7 +9,6 @@ import com.archyx.aureliumskills.skills.Skills;
import com.archyx.aureliumskills.stats.Stats;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.NBTItem;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.player.EmptyRPGPlayer;
import net.Indyuce.mmoitems.api.player.PlayerData;
@@ -143,7 +142,7 @@ public class AureliumSkillsHook implements RPGHandler, Listener {
private final Skill skill;
public RequiredProfessionStat(Skills skill) {
- super(skill.name(), VersionMaterial.EXPERIENCE_BOTTLE.toMaterial(), skill.getDisplayName(Locale.getDefault()),
+ super(skill.name(), Material.EXPERIENCE_BOTTLE, skill.getDisplayName(Locale.getDefault()),
new String[]{"Amount of " + skill.getDisplayName(Locale.getDefault()) + " levels the", "player needs to use the item.", "(AureliumSkills)"});
this.skill = aSkills.getSkillRegistry().getSkill(skill.name());
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java
index 32b98438..f8846f00 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java
@@ -6,7 +6,6 @@ import io.lumine.mythic.lib.api.item.NBTItem;
import io.lumine.mythic.lib.api.util.AltChar;
import io.lumine.mythic.lib.api.util.ui.SilentNumbers;
import io.lumine.mythic.lib.util.AdventureUtils;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.Type;
import net.Indyuce.mmoitems.api.edition.NewItemEdition;
@@ -101,7 +100,7 @@ public class ItemBrowser extends PluginInventory {
}
// Fill remainder slots with 'No Type' notice
- ItemStack glass = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(ChatColor.RED + "- No type -");
glass.setItemMeta(glassMeta);
@@ -141,7 +140,7 @@ public class ItemBrowser extends PluginInventory {
/*
* Build cool Item Stacks for buttons and sh
*/
- ItemStack error = VersionMaterial.RED_STAINED_GLASS_PANE.toItem();
+ ItemStack error = new ItemStack(Material.RED_STAINED_GLASS_PANE);
ItemMeta errorMeta = error.getItemMeta();
errorMeta.setDisplayName(ChatColor.RED + "- Error -");
List errorLore = new ArrayList<>();
@@ -150,7 +149,7 @@ public class ItemBrowser extends PluginInventory {
errorMeta.setLore(errorLore);
error.setItemMeta(errorMeta);
- ItemStack noItem = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack noItem = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta noItemMeta = noItem.getItemMeta();
noItemMeta.setDisplayName(ChatColor.RED + "- No Item -");
noItem.setItemMeta(noItemMeta);
@@ -165,12 +164,12 @@ public class ItemBrowser extends PluginInventory {
backMeta.setDisplayName(ChatColor.GREEN + AltChar.rightArrow + " Back");
back.setItemMeta(backMeta);
- ItemStack create = new ItemStack(VersionMaterial.WRITABLE_BOOK.toMaterial());
+ ItemStack create = new ItemStack(new ItemStack(Material.WRITABLE_BOOK));
ItemMeta createMeta = create.getItemMeta();
createMeta.setDisplayName(ChatColor.GREEN + "Create New");
create.setItemMeta(createMeta);
- ItemStack delete = new ItemStack(VersionMaterial.CAULDRON.toMaterial());
+ ItemStack delete = new ItemStack(new ItemStack(Material.CAULDRON));
ItemMeta deleteMeta = delete.getItemMeta();
deleteMeta.setDisplayName(ChatColor.RED + (deleteMode ? "Cancel Deletion" : "Delete Item"));
delete.setItemMeta(deleteMeta);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityEdition.java
index 91105671..c24332e9 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityEdition.java
@@ -5,7 +5,6 @@ import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.util.AltChar;
import io.lumine.mythic.lib.skill.trigger.TriggerType;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -99,7 +98,7 @@ public class AbilityEdition extends EditionInventory {
if (ability != null) {
ConfigurationSection section = getEditedSection().getConfigurationSection("ability." + configKey);
for (String modifier : ability.getHandler().getModifiers()) {
- ItemStack modifierItem = VersionMaterial.GRAY_DYE.toItem();
+ ItemStack modifierItem = new ItemStack(Material.GRAY_DYE);
ItemMeta modifierItemMeta = modifierItem.getItemMeta();
modifierItemMeta.setDisplayName(ChatColor.GREEN + UtilityMethods.caseOnWords(modifier.toLowerCase().replace("-", " ")));
List modifierItemLore = new ArrayList<>();
@@ -129,7 +128,7 @@ public class AbilityEdition extends EditionInventory {
}
}
- ItemStack glass = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(ChatColor.RED + "- No Modifier -");
glass.setItemMeta(glassMeta);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityListEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityListEdition.java
index 53e9d2b8..d41e7c91 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityListEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/AbilityListEdition.java
@@ -5,7 +5,6 @@ import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.util.AltChar;
import io.lumine.mythic.lib.skill.trigger.TriggerType;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate;
import net.Indyuce.mmoitems.api.util.NumericStatFormula;
@@ -88,12 +87,12 @@ public class AbilityListEdition extends EditionInventory {
inventory.setItem(slots[n++], abilityItem);
}
- ItemStack glass = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(ChatColor.RED + "- No Ability -");
glass.setItemMeta(glassMeta);
- ItemStack add = new ItemStack(VersionMaterial.WRITABLE_BOOK.toMaterial());
+ ItemStack add = new ItemStack(Material.WRITABLE_BOOK);
ItemMeta addMeta = add.getItemMeta();
addMeta.setDisplayName(ChatColor.GREEN + "Add an ability...");
add.setItemMeta(addMeta);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ArrowParticlesEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ArrowParticlesEdition.java
index f2808545..96e6af18 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ArrowParticlesEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ArrowParticlesEdition.java
@@ -2,7 +2,6 @@ package net.Indyuce.mmoitems.gui.edition;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -53,7 +52,7 @@ public class ArrowParticlesEdition extends EditionInventory {
particleItemMeta.setLore(particleItemLore);
particleItem.setItemMeta(particleItemMeta);
- ItemStack amount = VersionMaterial.GRAY_DYE.toItem();
+ ItemStack amount = new ItemStack(Material.GRAY_DYE);
ItemMeta amountMeta = amount.getItemMeta();
amountMeta.setDisplayName(ChatColor.GREEN + "Amount");
List amountLore = new ArrayList<>();
@@ -65,7 +64,7 @@ public class ArrowParticlesEdition extends EditionInventory {
amountMeta.setLore(amountLore);
amount.setItemMeta(amountMeta);
- ItemStack offset = VersionMaterial.GRAY_DYE.toItem();
+ ItemStack offset = new ItemStack(Material.GRAY_DYE);
ItemMeta offsetMeta = offset.getItemMeta();
offsetMeta.setDisplayName(ChatColor.GREEN + "Offset");
List offsetLore = new ArrayList<>();
@@ -84,7 +83,7 @@ public class ArrowParticlesEdition extends EditionInventory {
int green = section.getInt("color.green");
int blue = section.getInt("color.blue");
- ItemStack speed = VersionMaterial.GRAY_DYE.toItem();
+ ItemStack speed = new ItemStack(Material.GRAY_DYE);
ItemMeta speedMeta = speed.getItemMeta();
speedMeta.setDisplayName(ChatColor.GREEN + "Particle Color");
List speedLore = new ArrayList<>();
@@ -100,7 +99,7 @@ public class ArrowParticlesEdition extends EditionInventory {
inventory.setItem(41, speed);
} else {
- ItemStack colorItem = VersionMaterial.GRAY_DYE.toItem();
+ ItemStack colorItem = new ItemStack(Material.GRAY_DYE);
ItemMeta colorItemMeta = colorItem.getItemMeta();
colorItemMeta.setDisplayName(ChatColor.GREEN + "Speed");
List colorItemLore = new ArrayList<>();
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/CommandListEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/CommandListEdition.java
index 048e9b6c..b39f3f99 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/CommandListEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/CommandListEdition.java
@@ -4,17 +4,16 @@ import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate;
import net.Indyuce.mmoitems.util.MMOUtils;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
-import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@@ -45,7 +44,7 @@ public class CommandListEdition extends EditionInventory {
boolean console = getEditedSection().getBoolean("commands." + key + ".console"),
op = getEditedSection().getBoolean("commands." + key + ".op");
- ItemStack item = new ItemStack(VersionMaterial.COMPARATOR.toMaterial());
+ ItemStack item = new ItemStack(Material.COMPARATOR);
ItemMeta itemMeta = item.getItemMeta();
itemMeta.setDisplayName(format == null || format.equals("") ? ChatColor.RED + "No Format" : ChatColor.GREEN + format);
List itemLore = new ArrayList<>();
@@ -61,12 +60,12 @@ public class CommandListEdition extends EditionInventory {
inventory.setItem(slots[n++], NBTItem.get(item).addTag(new ItemTag("configKey", key)).toItem());
}
- ItemStack glass = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(ChatColor.RED + "- No Command -");
glass.setItemMeta(glassMeta);
- ItemStack add = new ItemStack(VersionMaterial.WRITABLE_BOOK.toMaterial());
+ ItemStack add = new ItemStack(Material.WRITABLE_BOOK);
ItemMeta addMeta = add.getItemMeta();
addMeta.setDisplayName(ChatColor.GREEN + "Register a command...");
add.setItemMeta(addMeta);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ItemEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ItemEdition.java
index 81779100..d21c340f 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ItemEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ItemEdition.java
@@ -3,7 +3,6 @@ package net.Indyuce.mmoitems.gui.edition;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate;
import net.Indyuce.mmoitems.stat.type.InternalStat;
@@ -63,7 +62,7 @@ public class ItemEdition extends EditionInventory {
inventory.setItem(slots[n++], MythicLib.plugin.getVersion().getWrapper().getNBTItem(item).addTag(new ItemTag("guiStat", stat.getId())).toItem());
}
- ItemStack glass = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(ChatColor.RED + "- No Item Stat -");
glass.setItemMeta(glassMeta);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ParticlesEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ParticlesEdition.java
index 29c340f9..8633476f 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ParticlesEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/ParticlesEdition.java
@@ -4,7 +4,6 @@ import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -18,7 +17,6 @@ import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
-import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@@ -47,7 +45,7 @@ public class ParticlesEdition extends EditionInventory {
} catch (Exception ignored) {
}
- ItemStack particleTypeItem = VersionMaterial.PINK_STAINED_GLASS.toItem();
+ ItemStack particleTypeItem = new ItemStack(Material.PINK_STAINED_GLASS);
ItemMeta particleTypeItemMeta = particleTypeItem.getItemMeta();
particleTypeItemMeta.setDisplayName(ChatColor.GREEN + "Particle Pattern");
List particleTypeItemLore = new ArrayList<>();
@@ -69,7 +67,7 @@ public class ParticlesEdition extends EditionInventory {
if (particleType != null) {
ConfigurationSection psection = getEditedSection().getConfigurationSection("item-particles");
for (String modifier : particleType.getModifiers()) {
- ItemStack modifierItem = VersionMaterial.GRAY_DYE.toItem();
+ ItemStack modifierItem = new ItemStack(Material.GRAY_DYE);
ItemMeta modifierItemMeta = modifierItem.getItemMeta();
modifierItemMeta.setDisplayName(ChatColor.GREEN + UtilityMethods.caseOnWords(modifier.toLowerCase().replace("-", " ")));
List modifierItemLore = new ArrayList<>();
@@ -114,7 +112,7 @@ public class ParticlesEdition extends EditionInventory {
int green = getEditedSection().getInt("item-particles.color.green");
int blue = getEditedSection().getInt("item-particles.color.blue");
- ItemStack colorItem = VersionMaterial.RED_DYE.toItem();
+ ItemStack colorItem = new ItemStack(Material.RED_DYE);
ItemMeta colorItemMeta = colorItem.getItemMeta();
colorItemMeta.setDisplayName(ChatColor.GREEN + "Particle Color");
List colorItemLore = new ArrayList<>();
@@ -132,7 +130,7 @@ public class ParticlesEdition extends EditionInventory {
inventory.setItem(25, colorItem);
}
- ItemStack glass = VersionMaterial.GRAY_STAINED_GLASS_PANE.toItem();
+ ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
ItemMeta glassMeta = glass.getItemMeta();
glassMeta.setDisplayName(ChatColor.RED + "- No Modifier -");
glass.setItemMeta(glassMeta);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java
index b4f08fa3..3d68709b 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java
@@ -2,7 +2,6 @@ package net.Indyuce.mmoitems.gui.edition;
import io.lumine.mythic.lib.api.util.ItemFactory;
import io.lumine.mythic.lib.api.util.ui.SilentNumbers;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate;
@@ -51,7 +50,7 @@ public class RevisionInventory extends EditionInventory {
"The display name of the old item will be transferred to the new one"
, 40, "\u00a77")).build();
- lore = ItemFactory.of(VersionMaterial.WRITABLE_BOOK.toMaterial()).name("\u00a7dLore").lore(SilentNumbers.chop(
+ lore = ItemFactory.of(Material.WRITABLE_BOOK).name("\u00a7dLore").lore(SilentNumbers.chop(
"Specifically keeps lore lines that begin with the color code \u00a7n&7"
, 40, "\u00a77")).build();
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/UpgradingEdition.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/UpgradingEdition.java
index 24f165a5..7d0b6e18 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/UpgradingEdition.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/UpgradingEdition.java
@@ -2,7 +2,6 @@ package net.Indyuce.mmoitems.gui.edition;
import io.lumine.mythic.lib.api.util.AltChar;
import io.lumine.mythic.lib.api.util.ItemFactory;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.Type;
@@ -38,7 +37,7 @@ public class UpgradingEdition extends EditionInventory {
boolean workbench = getEditedSection().getBoolean("upgrade.workbench");
if (!template.getType().corresponds(Type.CONSUMABLE)) {
- ItemStack workbenchItem = new ItemStack(VersionMaterial.CRAFTING_TABLE.toMaterial());
+ ItemStack workbenchItem = new ItemStack(Material.CRAFTING_TABLE);
ItemMeta workbenchItemMeta = workbenchItem.getItemMeta();
workbenchItemMeta.setDisplayName(ChatColor.GREEN + "Workbench Upgrade Only?");
List workbenchItemLore = new ArrayList<>();
@@ -54,7 +53,7 @@ public class UpgradingEdition extends EditionInventory {
inventory.setItem(20, workbenchItem);
String upgradeTemplate = getEditedSection().getString("upgrade.template");
- ItemStack templateItem = new ItemStack(VersionMaterial.OAK_SIGN.toMaterial());
+ ItemStack templateItem = new ItemStack(Material.OAK_SIGN);
ItemMeta templateItemMeta = templateItem.getItemMeta();
templateItemMeta.setDisplayName(ChatColor.GREEN + "Upgrade Template");
List templateItemLore = new ArrayList<>();
@@ -130,7 +129,7 @@ public class UpgradingEdition extends EditionInventory {
inventory.setItem(38, notAvailable);
double success = getEditedSection().getDouble("upgrade.success");
- ItemStack successItem = new ItemStack(VersionMaterial.EXPERIENCE_BOTTLE.toMaterial());
+ ItemStack successItem = new ItemStack(Material.EXPERIENCE_BOTTLE);
ItemMeta successItemMeta = successItem.getItemMeta();
successItemMeta.setDisplayName(ChatColor.GREEN + "Success Chance");
List successItemLore = new ArrayList<>();
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/button/RBA_AmountOutput.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/button/RBA_AmountOutput.java
index 18032dcb..890791b8 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/button/RBA_AmountOutput.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/button/RBA_AmountOutput.java
@@ -9,6 +9,7 @@ import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.api.edition.StatEdition;
import net.Indyuce.mmoitems.api.util.message.FFPMMOItems;
import net.Indyuce.mmoitems.gui.edition.recipe.gui.RecipeEditorGUI;
+import net.Indyuce.mmoitems.stat.HidePotionEffects;
import org.bukkit.ChatColor;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
@@ -49,7 +50,7 @@ public class RBA_AmountOutput extends RecipeButtonAction {
if (MythicLib.plugin.getVersion().isStrictlyHigher(1, 13) && resultMeta.hasCustomModelData()) { buttonMeta.setCustomModelData(resultMeta.getCustomModelData()); }
if (resultMeta instanceof LeatherArmorMeta) { ((LeatherArmorMeta) buttonMeta).setColor(((LeatherArmorMeta) resultMeta).getColor()); }
if (resultMeta instanceof BannerMeta) { ((BannerMeta) buttonMeta).setPatterns(((BannerMeta) resultMeta).getPatterns()); }
- buttonMeta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_DYE, ItemFlag.HIDE_POTION_EFFECTS);
+ buttonMeta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_DYE, HidePotionEffects.ITEM_FLAG);
button.setItemMeta(buttonMeta);
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/registry/burninglegacy/CraftingType.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/registry/burninglegacy/CraftingType.java
index 972e307a..e44f7a4b 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/registry/burninglegacy/CraftingType.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/gui/edition/recipe/registry/burninglegacy/CraftingType.java
@@ -2,8 +2,7 @@ package net.Indyuce.mmoitems.gui.edition.recipe.registry.burninglegacy;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
-import io.lumine.mythic.lib.version.VersionMaterial;
-import net.Indyuce.mmoitems.util.MMOUtils;
+import io.lumine.mythic.lib.version.VMaterial;
import net.Indyuce.mmoitems.manager.RecipeManager;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
@@ -14,9 +13,9 @@ public enum CraftingType {
//SHAPED(21, "The C. Table Recipe (Shaped) for this item", VersionMaterial.CRAFTING_TABLE, null),
//SHAPELESS(22, "The C. Table Recipe (Shapeless) for this item", VersionMaterial.CRAFTING_TABLE, null),
FURNACE(23, "The Furnace Recipe for this item", Material.FURNACE, RecipeManager.BurningRecipeType.FURNACE),
- BLAST(29, "The Blast Furnace Recipe for this item", VersionMaterial.BLAST_FURNACE, RecipeManager.BurningRecipeType.BLAST, 1, 14),
- SMOKER(30, "The Smoker Recipe for this item", VersionMaterial.SMOKER, RecipeManager.BurningRecipeType.SMOKER, 1, 14),
- CAMPFIRE(32, "The Campfire Recipe for this item", VersionMaterial.CAMPFIRE, RecipeManager.BurningRecipeType.CAMPFIRE, 1, 14);
+ BLAST(29, "The Blast Furnace Recipe for this item", VMaterial.BLAST_FURNACE, RecipeManager.BurningRecipeType.BLAST, 1, 14),
+ SMOKER(30, "The Smoker Recipe for this item", VMaterial.SMOKER, RecipeManager.BurningRecipeType.SMOKER, 1, 14),
+ CAMPFIRE(32, "The Campfire Recipe for this item", VMaterial.CAMPFIRE, RecipeManager.BurningRecipeType.CAMPFIRE, 1, 14);
//SMITHING(33, "The Smithing Recipe for this item", VersionMaterial.SMITHING_TABLE, null, 1, 15);
private final int slot;
@@ -25,8 +24,8 @@ public enum CraftingType {
private final int[] mustBeHigher;
private final RecipeManager.BurningRecipeType burning;
- private CraftingType(int slot, String lore, VersionMaterial material, @Nullable RecipeManager.BurningRecipeType burn, int... mustBeHigher) {
- this(slot, lore, material.toMaterial(), burn, mustBeHigher);
+ private CraftingType(int slot, String lore, VMaterial material, @Nullable RecipeManager.BurningRecipeType burn, int... mustBeHigher) {
+ this(slot, lore, material.get(), burn, mustBeHigher);
}
private CraftingType(int slot, String lore, Material material, @Nullable RecipeManager.BurningRecipeType burn, int... mustBeHigher) {
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java
index 721d1347..0b6a7056 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java
@@ -7,7 +7,7 @@ import io.lumine.mythic.lib.UtilityMethods;
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 io.lumine.mythic.lib.version.VersionMaterial;
+import io.lumine.mythic.lib.version.VParticle;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
@@ -19,6 +19,7 @@ import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.Indyuce.mmoitems.util.MMOUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.inventory.InventoryClickEvent;
@@ -31,7 +32,7 @@ import java.util.Optional;
public class ArrowParticles extends ItemStat {
public ArrowParticles() {
- super("ARROW_PARTICLES", VersionMaterial.LIME_STAINED_GLASS.toMaterial(), "Arrow Particles",
+ super("ARROW_PARTICLES", Material.SPECTRAL_ARROW, "Arrow Particles",
new String[] { "Particles that display around", "the arrows your bow fires." }, new String[] { "bow", "crossbow" });
}
@@ -200,6 +201,6 @@ public class ArrowParticles extends ItemStat {
private static final int MAXIMUM_COMMANDS = 15;
public Commands() {
- super("COMMANDS", VersionMaterial.COMMAND_BLOCK_MINECART.toMaterial(), "Commands",
+ super("COMMANDS", Material.COMMAND_BLOCK_MINECART, "Commands",
new String[]{"The commands your item", "performs when right clicked."}, new String[]{"!armor", "!block", "!gem_stone", "all"});
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java
index 5c1ef10c..b1547daa 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java
@@ -6,7 +6,6 @@ import com.google.gson.JsonSyntaxException;
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 io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -18,6 +17,7 @@ import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
@@ -29,7 +29,7 @@ import java.util.Optional;
public class CompatibleIds extends ItemStat {
public CompatibleIds() {
- super("COMPATIBLE_IDS", VersionMaterial.COMMAND_BLOCK.toMaterial(), "Compatible IDs",
+ super("COMPATIBLE_IDS", Material.COMMAND_BLOCK, "Compatible IDs",
new String[]{"The item ids this skin is", "compatible with."}, new String[]{"skin"});
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleMaterials.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleMaterials.java
index 12692893..4a2c31ff 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleMaterials.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleMaterials.java
@@ -6,7 +6,6 @@ import com.google.gson.JsonSyntaxException;
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 io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -33,7 +32,7 @@ import java.util.Optional;
public class CompatibleMaterials extends ItemStat {
public CompatibleMaterials() {
- super("COMPATIBLE_MATERIALS", VersionMaterial.COMMAND_BLOCK.toMaterial(), "Compatible Materials",
+ super("COMPATIBLE_MATERIALS", Material.COMMAND_BLOCK, "Compatible Materials",
new String[]{"The item materials this skin is", "compatible with."}, new String[]{"skin"});
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java
index 30caff1f..320b81a6 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java
@@ -6,7 +6,6 @@ import com.google.gson.JsonSyntaxException;
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 io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -18,6 +17,7 @@ import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
@@ -29,7 +29,7 @@ import java.util.Optional;
public class CompatibleTypes extends ItemStat {
public CompatibleTypes() {
- super("COMPATIBLE_TYPES", VersionMaterial.COMMAND_BLOCK.toMaterial(), "Compatible Types",
+ super("COMPATIBLE_TYPES", Material.COMMAND_BLOCK, "Compatible Types",
new String[]{"The item types this skin is", "compatible with."}, new String[]{"skin"});
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java
index 1b23e761..e02a34ca 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java
@@ -1,39 +1,38 @@
package net.Indyuce.mmoitems.stat;
+import io.lumine.mythic.lib.api.crafting.uimanager.ProvidedUIFilter;
+import io.lumine.mythic.lib.api.crafting.uimanager.UIFilterManager;
+import io.lumine.mythic.lib.api.item.ItemTag;
+import io.lumine.mythic.lib.api.util.AltChar;
+import io.lumine.mythic.lib.api.util.ui.QuickNumberRange;
+import io.lumine.mythic.lib.api.util.ui.SilentNumbers;
+import net.Indyuce.mmoitems.MMOItems;
+import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
+import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
+import net.Indyuce.mmoitems.gui.edition.EditionInventory;
+import net.Indyuce.mmoitems.gui.edition.recipe.RecipeTypeListGUI;
+import net.Indyuce.mmoitems.gui.edition.recipe.button.RecipeButtonAction;
+import net.Indyuce.mmoitems.gui.edition.recipe.gui.RecipeEditorGUI;
+import net.Indyuce.mmoitems.gui.edition.recipe.interpreter.RMG_RecipeInterpreter;
+import net.Indyuce.mmoitems.stat.data.StringData;
+import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
+import net.Indyuce.mmoitems.stat.data.type.StatData;
+import net.Indyuce.mmoitems.stat.type.ItemStat;
+import org.bukkit.ChatColor;
+import org.bukkit.Material;
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.event.inventory.InventoryAction;
+import org.bukkit.event.inventory.InventoryClickEvent;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import io.lumine.mythic.lib.api.crafting.uimanager.ProvidedUIFilter;
-import io.lumine.mythic.lib.api.crafting.uimanager.UIFilterManager;
-import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.api.util.ui.QuickNumberRange;
-import io.lumine.mythic.lib.api.util.ui.SilentNumbers;
-import net.Indyuce.mmoitems.gui.edition.recipe.RecipeTypeListGUI;
-import net.Indyuce.mmoitems.gui.edition.recipe.gui.RecipeEditorGUI;
-import net.Indyuce.mmoitems.gui.edition.recipe.interpreter.RMG_RecipeInterpreter;
-import net.Indyuce.mmoitems.gui.edition.recipe.button.RecipeButtonAction;
-import net.Indyuce.mmoitems.stat.data.StringData;
-import org.bukkit.ChatColor;
-import org.bukkit.configuration.ConfigurationSection;
-import org.bukkit.event.inventory.InventoryAction;
-import org.bukkit.event.inventory.InventoryClickEvent;
-
-import net.Indyuce.mmoitems.MMOItems;
-import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
-import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
-import net.Indyuce.mmoitems.gui.edition.EditionInventory;
-import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
-import net.Indyuce.mmoitems.stat.type.ItemStat;
-import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
public class Crafting extends ItemStat, StatData> {
public Crafting() {
- super("CRAFTING", VersionMaterial.CRAFTING_TABLE.toMaterial(), "Crafting",
+ super("CRAFTING", Material.CRAFTING_TABLE, "Crafting",
new String[] { "The crafting recipes of your item.", "Changing a recipe requires &o/mi reload recipes&7." }, new String[0]);
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java
index 2b3930d1..83a18f8b 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java
@@ -1,13 +1,13 @@
package net.Indyuce.mmoitems.stat;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringStat;
import net.Indyuce.mmoitems.stat.type.TemplateOption;
+import org.bukkit.Material;
public class CraftingPermission extends StringStat implements TemplateOption, GemStoneStat {
public CraftingPermission() {
- super("CRAFT_PERMISSION", VersionMaterial.OAK_SIGN.toMaterial(), "Crafting Recipe Permission",
+ super("CRAFT_PERMISSION", Material.OAK_SIGN, "Crafting Recipe Permission",
new String[]{"The permission needed to craft this item.", "Changing this value requires &o/mi reload recipes&7."},
new String[0]);
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java
index d7d0dbc6..b5d6410d 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java
@@ -4,7 +4,6 @@ import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.SupportedNBTTagValues;
import io.lumine.mythic.lib.comp.adventure.AdventureParser;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.ItemTier;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
@@ -16,6 +15,7 @@ import net.Indyuce.mmoitems.stat.type.StatHistory;
import net.Indyuce.mmoitems.stat.type.StringStat;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -24,7 +24,7 @@ import java.util.ArrayList;
public class DisplayName extends StringStat implements GemStoneStat {
public DisplayName() {
- super("NAME", VersionMaterial.OAK_SIGN.toMaterial(), "Display Name", new String[]{"The item display name."},
+ super("NAME", Material.OAK_SIGN, "Display Name", new String[]{"The item display name."},
new String[0]);
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayedType.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayedType.java
index 2222a5d8..31b604a0 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayedType.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DisplayedType.java
@@ -1,11 +1,11 @@
package net.Indyuce.mmoitems.stat;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringStat;
+import org.bukkit.Material;
public class DisplayedType extends StringStat implements GemStoneStat {
public DisplayedType() {
- super("DISPLAYED_TYPE", VersionMaterial.OAK_SIGN.toMaterial(), "Displayed Type", new String[]{"This option will only affect the", "type displayed on the item lore."}, new String[0]);
+ super("DISPLAYED_TYPE", Material.OAK_SIGN, "Displayed Type", new String[]{"This option will only affect the", "type displayed on the item lore."}, new String[0]);
}
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java
index 0c891a0e..7b9d1c58 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java
@@ -1,10 +1,16 @@
package net.Indyuce.mmoitems.stat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
import io.lumine.mythic.lib.api.item.ItemTag;
+import io.lumine.mythic.lib.api.util.AltChar;
+import net.Indyuce.mmoitems.ItemStats;
+import net.Indyuce.mmoitems.MMOItems;
+import net.Indyuce.mmoitems.api.edition.StatEdition;
+import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
+import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
+import net.Indyuce.mmoitems.gui.edition.EditionInventory;
+import net.Indyuce.mmoitems.stat.data.ColorData;
+import net.Indyuce.mmoitems.stat.data.type.StatData;
+import net.Indyuce.mmoitems.stat.type.ItemStat;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
import org.bukkit.Color;
@@ -13,27 +19,18 @@ import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.LeatherArmorMeta;
-
-import net.Indyuce.mmoitems.ItemStats;
-import net.Indyuce.mmoitems.MMOItems;
-import net.Indyuce.mmoitems.api.edition.StatEdition;
-import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
-import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
-import net.Indyuce.mmoitems.gui.edition.EditionInventory;
-import net.Indyuce.mmoitems.stat.data.ColorData;
-import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
-import net.Indyuce.mmoitems.stat.type.ItemStat;
-import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
public class DyeColor extends ItemStat {
public DyeColor() {
- super("DYE_COLOR", VersionMaterial.RED_DYE.toMaterial(), "Dye Color",
+ super("DYE_COLOR", Material.RED_DYE, "Dye Color",
new String[] { "The color of your item", "(for dyeable items).", "In RGB." }, new String[0], Material.LEATHER_HELMET,
- Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS, VersionMaterial.LEATHER_HORSE_ARMOR.toMaterial());
+ Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS, Material.LEATHER_HORSE_ARMOR);
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java
index e65745be..3b644e58 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java
@@ -1,17 +1,16 @@
package net.Indyuce.mmoitems.stat;
+import io.lumine.mythic.lib.api.item.ItemTag;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.stat.data.StringData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringStat;
-import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.version.VersionMaterial;
+import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
public class GemColor extends StringStat implements GemStoneStat {
public GemColor() {
- super("GEM_COLOR", VersionMaterial.LIGHT_BLUE_DYE.toMaterial(), "Gem Color", new String[] { "Defines the color of the socket in", "which the gem can be applied." }, new String[] { "gem_stone" });
+ super("GEM_COLOR", Material.LIGHT_BLUE_DYE, "Gem Color", new String[] { "Defines the color of the socket in", "which the gem can be applied." }, new String[] { "gem_stone" });
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java
index 2a922f24..9c25fc24 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java
@@ -1,15 +1,12 @@
package net.Indyuce.mmoitems.stat;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.stat.data.StringData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.ChooseStat;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.util.StatChoice;
+import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
-import java.util.HashMap;
-
/**
* Defines how gem stats will scale when the item they are put on upgrades.
*/
@@ -25,7 +22,7 @@ public class GemUpgradeScaling extends ChooseStat implements GemStoneStat {
public static String defaultValue = SUBSEQUENT.getId();
public GemUpgradeScaling() {
- super("GEM_UPGRADE_SCALING", VersionMaterial.LIME_DYE.toMaterial(), "Gem Upgrade Scaling", new String[] { "Gem stones add their stats to items, but you may also", "upgrade your items via crafting stations or consumables.", "", "\u00a76Should this gem stone stats be affected by upgrading?" }, new String[] { "gem_stone" });
+ super("GEM_UPGRADE_SCALING", Material.LIME_DYE, "Gem Upgrade Scaling", new String[] { "Gem stones add their stats to items, but you may also", "upgrade your items via crafting stations or consumables.", "", "\u00a76Should this gem stone stats be affected by upgrading?" }, new String[] { "gem_stone" });
// Set the acceptable values
addChoices(SUBSEQUENT, NEVER, HISTORIC);
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java
index 28dc150c..8af3884d 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java
@@ -1,7 +1,6 @@
package net.Indyuce.mmoitems.stat;
import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
@@ -23,7 +22,7 @@ import java.util.ArrayList;
public class HideDye extends BooleanStat {
public HideDye() {
super("HIDE_DYE", Material.CYAN_DYE, "Hide Dyed", new String[] { "Enable to hide the 'Dyed' tag from the item." }, new String[0],
- Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS, VersionMaterial.LEATHER_HORSE_ARMOR.toMaterial());
+ Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS, Material.LEATHER_HORSE_ARMOR);
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java
index 93d6b72a..05a68b38 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java
@@ -1,11 +1,12 @@
package net.Indyuce.mmoitems.stat;
+import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
+import io.lumine.mythic.lib.util.annotation.BackwardsCompatibility;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
import net.Indyuce.mmoitems.stat.data.BooleanData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.BooleanStat;
import org.bukkit.Material;
import org.bukkit.inventory.ItemFlag;
@@ -13,41 +14,50 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
+import java.util.Arrays;
/**
* @deprecated Merge with other Hide- stats
*/
@Deprecated
public class HidePotionEffects extends BooleanStat {
- public HidePotionEffects() {
- super("HIDE_POTION_EFFECTS", Material.POTION, "Hide Potion Effects", new String[] { "Hides potion effects & 'No Effects'", "from your item lore." }, new String[0], Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION, Material.TIPPED_ARROW);
- }
+ public HidePotionEffects() {
+ super("HIDE_POTION_EFFECTS", Material.POTION, "Hide Additional Tooltips", new String[]{"Hides potion effects & additional", "vanilla tooltips from the item lore."}, new String[0], Material.POTION, Material.SPLASH_POTION, Material.LINGERING_POTION, Material.TIPPED_ARROW);
+ }
- @Override
- public void whenApplied(@NotNull ItemStackBuilder item, @NotNull BooleanData data) {
- if (data.isEnabled())
- item.getMeta().addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
- }
+ @BackwardsCompatibility(version = "1.20.5")
+ public static final ItemFlag ITEM_FLAG = UtilityMethods.resolveEnumField(ItemFlag::valueOf,
+ () -> Arrays.stream(ItemFlag.values()).findAny().get(),
+ "HIDE_ADDITIONAL_TOOLTIP", "HIDE_POTION_EFFECTS");
- @Override
- public void whenLoaded(@NotNull ReadMMOItem mmoitem) {
- if (mmoitem.getNBT().getItem().getItemMeta().hasItemFlag(ItemFlag.HIDE_POTION_EFFECTS))
- mmoitem.setData(ItemStats.HIDE_POTION_EFFECTS, new BooleanData(true));
- }
+ @Override
+ public void whenApplied(@NotNull ItemStackBuilder item, @NotNull BooleanData data) {
+ if (data.isEnabled()) item.getMeta().addItemFlags(ITEM_FLAG);
+ }
- /**
- * This stat is saved not as a custom tag, but as the vanilla HideFlag itself.
- * Alas this is an empty array
- */
- @NotNull
- @Override
- public ArrayList getAppliedNBT(@NotNull BooleanData data) { return new ArrayList<>(); }
+ @Override
+ public void whenLoaded(@NotNull ReadMMOItem mmoitem) {
+ if (mmoitem.getNBT().getItem().getItemMeta().hasItemFlag(ITEM_FLAG))
+ mmoitem.setData(ItemStats.HIDE_POTION_EFFECTS, new BooleanData(true));
+ }
- /**
- * This stat is saved not as a custom tag, but as the vanilla HideFlag itself.
- * Alas this method returns null.
- */
- @Nullable
- @Override
- public BooleanData getLoadedNBT(@NotNull ArrayList storedTags) { return null; }
+ /**
+ * This stat is saved not as a custom tag, but as the vanilla HideFlag itself.
+ * Alas this is an empty array
+ */
+ @NotNull
+ @Override
+ public ArrayList getAppliedNBT(@NotNull BooleanData data) {
+ return new ArrayList<>();
+ }
+
+ /**
+ * This stat is saved not as a custom tag, but as the vanilla HideFlag itself.
+ * Alas this method returns null.
+ */
+ @Nullable
+ @Override
+ public BooleanData getLoadedNBT(@NotNull ArrayList storedTags) {
+ return null;
+ }
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java
index 96e26140..d898b6fd 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java
@@ -1,5 +1,6 @@
package net.Indyuce.mmoitems.stat;
+import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.SupportedNBTTagValues;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
@@ -8,10 +9,9 @@ import net.Indyuce.mmoitems.gui.edition.EditionInventory;
import net.Indyuce.mmoitems.stat.data.DoubleData;
import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.InternalStat;
-import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import org.apache.commons.lang.NotImplementedException;
+import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -22,7 +22,7 @@ import java.util.Optional;
public class ItemLevel extends ItemStat implements InternalStat {
public ItemLevel() {
- super("ITEM_LEVEL", VersionMaterial.EXPERIENCE_BOTTLE.toMaterial(), "Item Level", new String[] { "The item level" }, new String[0]);
+ super("ITEM_LEVEL", Material.EXPERIENCE_BOTTLE, "Item Level", new String[] { "The item level" }, new String[0]);
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java
index a635b9a1..ac1d2e71 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java
@@ -6,7 +6,7 @@ import io.lumine.mythic.lib.UtilityMethods;
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 io.lumine.mythic.lib.version.VersionMaterial;
+import io.lumine.mythic.lib.version.VParticle;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
@@ -19,6 +19,7 @@ import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.Indyuce.mmoitems.util.MMOUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.inventory.InventoryAction;
@@ -32,7 +33,7 @@ import java.util.Optional;
public class ItemParticles extends ItemStat {
public ItemParticles() {
- super("ITEM_PARTICLES", VersionMaterial.PINK_STAINED_GLASS.toMaterial(), "Item Particles", new String[] { "The particles displayed when",
+ super("ITEM_PARTICLES", Material.PINK_STAINED_GLASS, "Item Particles", new String[] { "The particles displayed when",
"holding/wearing your item.", "", ChatColor.BLUE + "A tutorial is available on the wiki." }, new String[] { "all", "!block" });
}
@@ -81,7 +82,7 @@ public class ItemParticles extends ItemStat {
@NotNull
@Override
- public ParticleData getClearStatData() { return new ParticleData(ParticleType.AURA, Particle.EXPLOSION_LARGE); }
+ public ParticleData getClearStatData() { return new ParticleData(ParticleType.AURA, VParticle.LARGE_EXPLOSION.get()); }
@Override
public void whenInput(@NotNull EditionInventory inv, @NotNull String message, Object... info) {
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Lore.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Lore.java
index 252a8830..1ec6ed91 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Lore.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Lore.java
@@ -2,7 +2,6 @@ package net.Indyuce.mmoitems.stat;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -13,6 +12,7 @@ import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringListStat;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
@@ -23,7 +23,7 @@ import java.util.Optional;
public class Lore extends StringListStat implements GemStoneStat {
public Lore() {
- super("LORE", VersionMaterial.WRITABLE_BOOK.toMaterial(), "Lore", new String[]{"The item lore."}, new String[0]);
+ super("LORE", Material.WRITABLE_BOOK, "Lore", new String[]{"The item lore."}, new String[0]);
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java
index edbaf806..a564c5d3 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java
@@ -3,17 +3,15 @@ package net.Indyuce.mmoitems.stat;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.lute.*;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.gui.edition.EditionInventory;
import net.Indyuce.mmoitems.stat.data.StringData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringStat;
-import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
@@ -22,7 +20,7 @@ import java.util.Objects;
public class LuteAttackEffectStat extends StringStat implements GemStoneStat {
public LuteAttackEffectStat() {
- super("LUTE_ATTACK_EFFECT", VersionMaterial.DIAMOND_HORSE_ARMOR.toMaterial(), "Lute Attack Effect",
+ super("LUTE_ATTACK_EFFECT", Material.DIAMOND_HORSE_ARMOR, "Lute Attack Effect",
new String[] { "Changes how your lute behaves", "when right clicked.", "&9Tip: /mi list lute" }, new String[] { "lute" });
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java
index c4f8f5d2..308c06b7 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java
@@ -1,17 +1,16 @@
package net.Indyuce.mmoitems.stat;
+import io.lumine.mythic.lib.api.item.ItemTag;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.stat.data.StringData;
-import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.StringStat;
-import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.version.VersionMaterial;
+import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
public class LuteAttackSoundStat extends StringStat implements GemStoneStat {
public LuteAttackSoundStat() {
- super("LUTE_ATTACK_SOUND", VersionMaterial.GOLDEN_HORSE_ARMOR.toMaterial(), "Lute Attack Sound", new String[] { "The sound played when", "basic attacking with this lute." }, new String[] { "lute" });
+ super("LUTE_ATTACK_SOUND", Material.GOLDEN_HORSE_ARMOR, "Lute Attack Sound", new String[] { "The sound played when", "basic attacking with this lute." }, new String[] { "lute" });
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ManaCost.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ManaCost.java
index 2b99f3c3..bd851201 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ManaCost.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ManaCost.java
@@ -1,7 +1,6 @@
package net.Indyuce.mmoitems.stat;
import io.lumine.mythic.lib.api.item.NBTItem;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem;
import net.Indyuce.mmoitems.api.player.PlayerData;
@@ -12,6 +11,7 @@ import net.Indyuce.mmoitems.stat.type.DoubleStat;
import net.Indyuce.mmoitems.stat.type.ItemRestriction;
import net.Indyuce.mmoitems.stat.type.PlayerConsumable;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
public class ManaCost extends DoubleStat implements ItemRestriction, PlayerConsumable {
public ManaCost() {
- super("MANA_COST", VersionMaterial.LAPIS_LAZULI.toMaterial(), "Mana Cost", new String[]{"Mana spent by your weapon to be used."}, new String[]{"weapon"});
+ super("MANA_COST", Material.LAPIS_LAZULI, "Mana Cost", new String[]{"Mana spent by your weapon to be used."}, new String[]{"weapon"});
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java
index 6caa5c62..e7ecb2c2 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java
@@ -4,7 +4,7 @@ import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.util.AltChar;
import io.lumine.mythic.lib.api.util.EnumUtils;
-import io.lumine.mythic.lib.version.VersionMaterial;
+import io.lumine.mythic.lib.version.VMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
@@ -29,7 +29,7 @@ import java.util.Optional;
public class MaterialStat extends ItemStat {
public MaterialStat() {
- super("MATERIAL", VersionMaterial.GRASS_BLOCK.toMaterial(), "Material", new String[] { "Your item material." }, new String[0]);
+ super("MATERIAL", VMaterial.GRASS_BLOCK.get(), "Material", new String[] { "Your item material." }, new String[0]);
}
@Override
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Permission.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Permission.java
index 9be127f2..a6d2e7a0 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Permission.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/Permission.java
@@ -4,22 +4,20 @@ import io.lumine.mythic.lib.api.item.ItemTag;
import io.lumine.mythic.lib.api.item.NBTItem;
import io.lumine.mythic.lib.api.item.SupportedNBTTagValues;
import io.lumine.mythic.lib.api.util.AltChar;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
-import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
import net.Indyuce.mmoitems.api.player.RPGPlayer;
import net.Indyuce.mmoitems.api.util.message.Message;
import net.Indyuce.mmoitems.gui.edition.EditionInventory;
import net.Indyuce.mmoitems.stat.data.StringListData;
-import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
import net.Indyuce.mmoitems.stat.data.type.StatData;
import net.Indyuce.mmoitems.stat.type.ItemRestriction;
import net.Indyuce.mmoitems.stat.type.StringListStat;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
@@ -33,7 +31,7 @@ import java.util.Optional;
public class Permission extends StringListStat implements ItemRestriction {
public Permission() {
- super("PERMISSION", VersionMaterial.OAK_SIGN.toMaterial(), "Permission",
+ super("PERMISSION", Material.OAK_SIGN, "Permission",
new String[] { "The permission needed to use this item." }, new String[] { "!block", "all" });
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java
index 39ae6add..a1c40be6 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java
@@ -7,7 +7,6 @@ import io.lumine.mythic.lib.UtilityMethods;
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 io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.edition.StatEdition;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
@@ -19,6 +18,7 @@ import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.Indyuce.mmoitems.util.MMOUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
+import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.inventory.InventoryAction;
@@ -37,7 +37,7 @@ import java.util.Optional;
public class ProjectileParticles extends ItemStat {
public ProjectileParticles() {
- super("PROJECTILE_PARTICLES", VersionMaterial.LIME_STAINED_GLASS.toMaterial(), "Projectile Particles",
+ super("PROJECTILE_PARTICLES", Material.LIME_STAINED_GLASS, "Projectile Particles",
new String[]{"The projectile particle that your weapon shoots"}, new String[]{"lute"});
}
@@ -49,7 +49,7 @@ public class ProjectileParticles extends ItemStat {
public SkullTextureStat() {
- super("SKULL_TEXTURE", VersionMaterial.PLAYER_HEAD.toMaterial(), "Skull Texture", new String[]{
+ super("SKULL_TEXTURE", Material.PLAYER_HEAD, "Skull Texture", new String[]{
"The skull texture &nvalue&7 which can be found on",
"head databases. 1.20+ users can also provide the",
"texture URL directly (starting with https://...)."
- }, new String[0], VersionMaterial.PLAYER_HEAD.toMaterial());
+ }, new String[0], Material.PLAYER_HEAD);
}
@Override
@@ -70,7 +70,7 @@ public class SkullTextureStat extends ItemStat, SoulboundData> implements InternalStat, ItemRestriction {
public Soulbound() {
- super("SOULBOUND", VersionMaterial.ENDER_EYE.toMaterial(), "Soulbound", new String[0], new String[0]);
+ super("SOULBOUND", Material.ENDER_EYE, "Soulbound", new String[0], new String[0]);
}
@Nullable
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java
index 5b6b6c9f..9bb6c008 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java
@@ -1,12 +1,12 @@
package net.Indyuce.mmoitems.stat;
import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.version.VersionMaterial;
-import net.Indyuce.mmoitems.util.MMOUtils;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.util.NumericStatFormula;
import net.Indyuce.mmoitems.stat.data.DoubleData;
import net.Indyuce.mmoitems.stat.type.DoubleStat;
+import net.Indyuce.mmoitems.util.MMOUtils;
+import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
/**
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
*/
public class SoulboundLevel extends DoubleStat {
public SoulboundLevel() {
- super("SOULBOUND_LEVEL", VersionMaterial.ENDER_EYE.toMaterial(), "Soulbinding Level", new String[]{"The soulbound level defines how much", "damage players will take when trying", "to use a soulbound item. It also determines", "how hard it is to break the binding."}, new String[]{"consumable"});
+ super("SOULBOUND_LEVEL", Material.ENDER_EYE, "Soulbinding Level", new String[]{"The soulbound level defines how much", "damage players will take when trying", "to use a soulbound item. It also determines", "how hard it is to break the binding."}, new String[]{"consumable"});
}
// Writes soulbound level with roman writing in lore
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java
index 7b40917d..c8a93e15 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java
@@ -1,5 +1,6 @@
package net.Indyuce.mmoitems.stat;
+import io.lumine.mythic.lib.api.item.ItemTag;
import net.Indyuce.mmoitems.ItemStats;
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem;
@@ -8,10 +9,9 @@ import net.Indyuce.mmoitems.stat.data.StoredTagsData;
import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
import net.Indyuce.mmoitems.stat.type.GemStoneStat;
import net.Indyuce.mmoitems.stat.type.InternalStat;
-import io.lumine.mythic.lib.api.item.ItemTag;
-import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmoitems.stat.type.ItemStat;
import org.apache.commons.lang.NotImplementedException;
+import org.bukkit.Material;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -27,7 +27,7 @@ import java.util.Optional;
*/
public class StoredTags extends ItemStat, StoredTagsData> implements InternalStat, GemStoneStat {
public StoredTags() {
- super("STORED_TAGS", VersionMaterial.OAK_SIGN.toMaterial(), "Stored Tags",
+ super("STORED_TAGS", Material.OAK_SIGN, "Stored Tags",
new String[] { "You found a secret dev easter egg", "introduced during the 2020 epidemic!" }, new String[0]);
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ParticleData.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ParticleData.java
index 30cc4ee9..748d1d05 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ParticleData.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ParticleData.java
@@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import io.lumine.mythic.lib.version.VParticle;
import net.Indyuce.mmoitems.util.MMOUtils;
import org.apache.commons.lang.Validate;
import org.bukkit.Color;
@@ -93,10 +94,10 @@ public class ParticleData implements StatData, RandomStatData {
}
public void display(Location location, int amount, float offsetX, float offsetY, float offsetZ, float speed) {
- if (particle == Particle.REDSTONE) {
+ if (particle == VParticle.REDSTONE.get()) {
location.getWorld().spawnParticle(particle, location, amount, offsetX, offsetY, offsetZ, new Particle.DustOptions(color, 1));
}
- else if (particle == Particle.SPELL_MOB || particle == Particle.SPELL_MOB_AMBIENT) {
+ else if (particle == VParticle.ENTITY_EFFECT.get() || particle == VParticle.ENTITY_EFFECT_AMBIENT.get()) {
// 0 for amount to allow colors (Thats why there is a for loop). Then the offsets are RGB values from 0.0 - 1.0, last 1 is the brightness.
for (int i = 0; i < amount; i++) {
location.getWorld().spawnParticle(particle, location, 0, (float) color.getRed() / 255, (float) color.getGreen() / 255, (float) color.getBlue() / 255, 1);
@@ -143,4 +144,8 @@ public class ParticleData implements StatData, RandomStatData {
public ParticleData randomize(MMOItemBuilder builder) {
return this;
}
+
+ public void spawn(Location location, Particle particle, int amount, double speed, double offsetX, double offsetY, double offsetZ) {
+
+ }
}
diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java
index 83d0da6d..e8d41690 100644
--- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java
+++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java
@@ -2,9 +2,11 @@ package net.Indyuce.mmoitems.stat.data;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.gson.JsonObject;
+import io.lumine.mythic.lib.version.VParticle;
import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder;
import net.Indyuce.mmoitems.stat.data.random.RandomStatData;
import net.Indyuce.mmoitems.stat.data.type.StatData;
+import net.Indyuce.mmoitems.util.MMOUtils;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -48,7 +50,7 @@ public class ProjectileParticlesData implements StatData, RandomStatData
- org.spigotmc
- spigot-api
- 1.18-R0.1-SNAPSHOT
+ io.papermc.paper
+ paper-api
+ 1.20.6-R0.1-SNAPSHOT
provided
true
+
+
+
+ com.mojang
+ brigadier
+
+
diff --git a/MMOItems-Dist/src/main/resources/default/language/potion-effects.yml b/MMOItems-Dist/src/main/resources/default/language/potion-effects.yml
index 8f623a06..c9393bd6 100644
--- a/MMOItems-Dist/src/main/resources/default/language/potion-effects.yml
+++ b/MMOItems-Dist/src/main/resources/default/language/potion-effects.yml
@@ -1,12 +1,12 @@
speed: Speed
slow: Slow
-fast-digging: Fast Digging
-slow-digging: Slow Digging
-increase-damage: Increase Damage
+fast-digging: Haste
+slow-digging: Mining Fatigue
+increase-damage: Strength
heal: Heal
harm: Harm
-jump: Jump
-confusion: Confusion
+jump: Jump Boost
+confusion: Nausea
regeneration: Regeneration
damage-resistance: Damage Resistance
fire-resistance: Fire Resistance
@@ -24,10 +24,11 @@ saturation: Saturation
glowing: Glowing
levitation: Levitation
luck: Luck
-unluck: Unluck
+unluck: Bad Luck
slow-falling: Slow Falling
conduit-power: Conduit Power
dolphins-grace: Dolphins Grace
bad-omen: Bad Omen
hero-of-the-village: Hero Of The Village
darkness: Darkness
+wind-charged:
diff --git a/MMOItems-Dist/src/main/resources/plugin.yml b/MMOItems-Dist/src/main/resources/plugin.yml
index 932ed53a..ceffa42e 100644
--- a/MMOItems-Dist/src/main/resources/plugin.yml
+++ b/MMOItems-Dist/src/main/resources/plugin.yml
@@ -5,7 +5,8 @@ author: Indyuce
description: ${project.description}
depend: [MythicLib]
softdepend: [WorldGuard,Residence,BossShopPro,SkillAPI,SkillsPro,MMOCore,MMOProfiles,MythicMobs,MMOInventory,PlaceholderAPI,Vault,Denizen,AureliumSkills,AuraSkills]
-api-version: 1.13
+api-version: 1.14
+website: www.phoenixdevt.fr
commands:
mmoitems:
description: MMOItems main command.