diff --git a/README.md b/README.md index efed174b..5970de48 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,3 @@ Private repository for MMOItems Premium. Issues: https://git.lumine.io/mythiccraft/mmoitems/-/issues Wiki: https://git.lumine.io/mythiccraft/mmoitems/-/wikis/home - -**How to add or update a dependency to the local repository** - -1. Get the jar file you want to add as a dependency and place it on your desktop -2. You'll need to deploy your jar as a maven artifact for Maven to recognize the jar as a potential dependency. For that you can use the command in your command prompt: -``` -mvn deploy:deploy-file -Durl=file:///C:\Users\cympe\Desktop -DgroupId=net.Indyuce.mmoitems.lib -Dpackaging=jar -Dfile=.jar -DartifactId= -Dversion= -``` - -This will generate a folder on your desktop that you can place in the MI local repo. - -3. Head to the MMOItems pom.xml config file and add a dependency: - -``` - - net.Indyuce.mmoitems.lib - ArtifactName - ArtifactVersion - -``` -The artifact names and versions must match in order for the dependency to be recognized. diff --git a/lib/AureliumSkills.jar b/lib/AureliumSkills.jar deleted file mode 100644 index 44b7e730..00000000 Binary files a/lib/AureliumSkills.jar and /dev/null differ diff --git a/lib/Iridescent.jar b/lib/Iridescent.jar index 1baf773e..004ab3b8 100644 Binary files a/lib/Iridescent.jar and b/lib/Iridescent.jar differ diff --git a/lib/MMOCore.jar b/lib/MMOCore.jar new file mode 100644 index 00000000..1bfb94b4 Binary files /dev/null and b/lib/MMOCore.jar differ diff --git a/lib/MMOLib.jar b/lib/MMOLib.jar new file mode 100644 index 00000000..68d9093e Binary files /dev/null and b/lib/MMOLib.jar differ diff --git a/lib/MythicLib.jar b/lib/MythicLib.jar new file mode 100644 index 00000000..97887491 Binary files /dev/null and b/lib/MythicLib.jar differ diff --git a/lib/MythicMobs.jar b/lib/MythicMobs.jar new file mode 100644 index 00000000..4af8ca91 Binary files /dev/null and b/lib/MythicMobs.jar differ diff --git a/lib/PlaceholderAPI.jar b/lib/PlaceholderAPI.jar new file mode 100644 index 00000000..ac94604d Binary files /dev/null and b/lib/PlaceholderAPI.jar differ diff --git a/lib/Vault.jar b/lib/Vault.jar index 4bcaa890..a215a867 100644 Binary files a/lib/Vault.jar and b/lib/Vault.jar differ diff --git a/lib/WorldGuard.jar b/lib/WorldGuard.jar index 1bcc8485..cd073117 100644 Binary files a/lib/WorldGuard.jar and b/lib/WorldGuard.jar differ diff --git a/lib/spigot-sources.jar b/lib/spigot-sources.jar new file mode 100644 index 00000000..08f1563c Binary files /dev/null and b/lib/spigot-sources.jar differ diff --git a/lib/spigot.jar b/lib/spigot.jar new file mode 100644 index 00000000..49c747cd Binary files /dev/null and b/lib/spigot.jar differ diff --git a/pom.xml b/pom.xml index afc4514e..9099a556 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,6 @@ - lumine-repo @@ -67,73 +66,83 @@ inventive-repo https://repo.inventivetalent.org/content/groups/public/ - - jitpack.io - https://jitpack.io - placeholderapi http://repo.extendedclip.com/content/repositories/placeholderapi/ - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + jitpack.io + https://jitpack.io - - - - local-repo - file:${project.basedir}/local-repo - - - - - - - - net.Indyuce.mmoitems.lib - GoogleGSON - 2.8.5 - - + com.mojang authlib 1.5.21 + + org.spigotmc + spigot-api + amalgam + system + ${basedir}/lib/spigot.jar + + net.Indyuce MMOCore 1.7.1 provided - io.lumine MythicLib - 1.1.0 + 1.0.19 provided + + + + + + + + + + + org.jetbrains annotations 19.0.0 - + + com.google.code.gson + gson + 2.8.5 + system + ${basedir}/lib/GoogleGSON.jar + + + com.github.klyser8.iridescent + Iridescent + 1.2.1 + system + ${basedir}/lib/Iridescent.jar + com.github.RednedEpic PhatLoots @@ -141,43 +150,186 @@ provided + - me.clip - placeholderapi - 2.9.2 - provided + com.github.Eniripsa96 + SkillAPI + master-SNAPSHOT + system + ${basedir}/lib/SkillAPI.jar - - com.github.Archy-x - AureliumSkills - Beta1.0.6 + n3kas + ae.api + 5.7.6 + system + ${basedir}/lib/AE-API.jar + + + org.black_ixx + BossShop + 2.0.9 + system + ${basedir}/lib/BossShopPro.jar + + + io.lumine + MythicEnchants + 0.0.1-SNAPSHOT + + + com.bekvon.bukkit + Residence + 4.8.7.2 + system + ${basedir}/lib/Residence.jar + + + com.Zrips + CMI + 8.6.5.0 + system + ${basedir}/lib/CMI.jar + + + com.herocraftonline + heroes + 1.9.3 + system + ${basedir}/lib/Heroes.jar + + + com.gmail.nossr50 + mcMMO + 2.1.104 + system + ${basedir}/lib/mcMMO.jar + + + us.eunoians + McRPG + 1.1.2 + system + ${basedir}/lib/McRPG.jar + + + me.baks + rpl + 3.9.30 + system + ${basedir}/lib/RPGPlayerLeveling.jar + + + me.leothepro555 + skills + 12.3.5 + system + ${basedir}/lib/Skills.jar + + + org.skills.main + SkillsPro + 18.9.0.1 + system + ${basedir}/lib/SkillsPro.jar + + + me.robin + BattleLevels + 6.9.1 + system + ${basedir}/lib/BattleLevels.jar + + + com.evill4mer + RealDualWield + 1.1.12 + system + ${basedir}/lib/RealDualWield.jar + + + me.arasple.mc + TrHologram + 1.11 + system + ${basedir}/lib/TrHologram.jar + + + com.gmail.filoghost + HolographicDisplays + 6.9.1 + system + ${basedir}/lib/HolographicDisplays.jar io.lumine.xikage MythicMobs - 4.11.0-SNAPSHOT - provided + 4.8.0 + system + ${basedir}/lib/MythicMobs.jar - - io.lumine - LumineUtils - 1.16.1-20210326.031037-28 - compile - - - * - * - - + de.tobiyas + RacesAndClasses + 1.2.6 + system + ${basedir}/lib/RacesAndClasses.jar - - org.spigotmc - spigot-api - 1.17-R0.1-SNAPSHOT + ru.endlesscode + rpginventory + 2.3.0 + system + ${basedir}/lib/RPGInventory.jar + + + com.sainttx.holograms + holograms + 2.9.1 + system + ${basedir}/lib/Holograms.jar + + + net.milkbowl + vault + 1.7.2 + system + ${basedir}/lib/Vault.jar + + + com.sk89q.worldguard + worldguard-bukkit + 7.0.1-SNAPSHOT + system + ${basedir}/lib/WorldGuard.jar + + + com.sk89q.worldedit + worldedit-bukkit + 7.2.0 + system + ${basedir}/lib/WorldEdit.jar + + + net.citizensnpcs + citizens + 2.0.25-SNAPSHOT + system + ${basedir}/lib/Citizens.jar + + + org.inventivetalent + glowapi + 1.4.8-SNAPSHOT + system + ${basedir}/lib/GlowAPI.jar + + + me.clip + placeholderapi + 2.10.7 + system + ${basedir}/lib/PlaceholderAPI.jar - diff --git a/src/main/java/net/Indyuce/mmoitems/MMOItems.java b/src/main/java/net/Indyuce/mmoitems/MMOItems.java index 2d503a7f..ad3575bc 100644 --- a/src/main/java/net/Indyuce/mmoitems/MMOItems.java +++ b/src/main/java/net/Indyuce/mmoitems/MMOItems.java @@ -1,23 +1,5 @@ package net.Indyuce.mmoitems; -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; - -import javax.annotation.Nullable; - -import org.apache.commons.lang.Validate; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.command.ConsoleCommandSender; -import org.bukkit.entity.Player; -import org.bukkit.event.HandlerList; -import org.bukkit.event.Listener; -import org.bukkit.inventory.ItemStack; -import org.bukkit.scheduler.BukkitRunnable; -import org.jetbrains.annotations.NotNull; - import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; @@ -25,12 +7,8 @@ import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackMessage; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import io.lumine.mythic.lib.version.SpigotPlugin; -import io.lumine.utils.plugin.LuminePlugin; -import net.Indyuce.mmoitems.api.ClaseMuyImportante; -import net.Indyuce.mmoitems.api.ConfigFile; -import net.Indyuce.mmoitems.api.ItemTier; -import net.Indyuce.mmoitems.api.SoulboundInfo; -import net.Indyuce.mmoitems.api.Type; +import io.lumine.mythic.utils.plugin.LuminePlugin; +import net.Indyuce.mmoitems.api.*; import net.Indyuce.mmoitems.api.crafting.MMOItemUIFilter; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; @@ -39,28 +17,14 @@ import net.Indyuce.mmoitems.api.util.MMOItemReforger; import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; import net.Indyuce.mmoitems.command.MMOItemsCommandTreeRoot; -import net.Indyuce.mmoitems.comp.AdvancedEnchantmentsHook; -import net.Indyuce.mmoitems.comp.MMOItemsMetrics; -import net.Indyuce.mmoitems.comp.MMOItemsRewardTypes; -import net.Indyuce.mmoitems.comp.McMMONonRPGHook; -import net.Indyuce.mmoitems.comp.PhatLootsHook; -import net.Indyuce.mmoitems.comp.RealDualWieldHook; -import net.Indyuce.mmoitems.comp.WorldEditSupport; +import net.Indyuce.mmoitems.comp.*; import net.Indyuce.mmoitems.comp.eco.VaultSupport; import net.Indyuce.mmoitems.comp.flags.DefaultFlags; import net.Indyuce.mmoitems.comp.flags.FlagPlugin; import net.Indyuce.mmoitems.comp.flags.ResidenceFlags; import net.Indyuce.mmoitems.comp.flags.WorldGuardFlags; -import net.Indyuce.mmoitems.comp.holograms.CMIPlugin; -import net.Indyuce.mmoitems.comp.holograms.HologramSupport; -import net.Indyuce.mmoitems.comp.holograms.HologramsPlugin; -import net.Indyuce.mmoitems.comp.holograms.HolographicDisplaysPlugin; -import net.Indyuce.mmoitems.comp.holograms.TrHologramPlugin; -import net.Indyuce.mmoitems.comp.inventory.DefaultPlayerInventory; -import net.Indyuce.mmoitems.comp.inventory.OrnamentPlayerInventory; -import net.Indyuce.mmoitems.comp.inventory.PlayerInventory; -import net.Indyuce.mmoitems.comp.inventory.PlayerInventoryHandler; -import net.Indyuce.mmoitems.comp.inventory.RPGInventoryHook; +import net.Indyuce.mmoitems.comp.holograms.*; +import net.Indyuce.mmoitems.comp.inventory.*; import net.Indyuce.mmoitems.comp.itemglow.ItemGlowListener; import net.Indyuce.mmoitems.comp.itemglow.NoGlowListener; import net.Indyuce.mmoitems.comp.mmocore.MMOCoreMMOLoader; @@ -78,34 +42,25 @@ import net.Indyuce.mmoitems.comp.rpg.McMMOHook; import net.Indyuce.mmoitems.comp.rpg.RPGHandler; import net.Indyuce.mmoitems.gui.PluginInventory; import net.Indyuce.mmoitems.gui.listener.GuiListener; -import net.Indyuce.mmoitems.listener.CraftingListener; -import net.Indyuce.mmoitems.listener.CustomBlockListener; -import net.Indyuce.mmoitems.listener.CustomSoundListener; -import net.Indyuce.mmoitems.listener.DisableInteractions; -import net.Indyuce.mmoitems.listener.DurabilityListener; -import net.Indyuce.mmoitems.listener.ElementListener; -import net.Indyuce.mmoitems.listener.EquipListener; -import net.Indyuce.mmoitems.listener.ItemListener; -import net.Indyuce.mmoitems.listener.ItemUse; -import net.Indyuce.mmoitems.listener.PlayerListener; -import net.Indyuce.mmoitems.manager.AbilityManager; -import net.Indyuce.mmoitems.manager.BlockManager; -import net.Indyuce.mmoitems.manager.ConfigManager; -import net.Indyuce.mmoitems.manager.CraftingManager; -import net.Indyuce.mmoitems.manager.DropTableManager; -import net.Indyuce.mmoitems.manager.EntityManager; -import net.Indyuce.mmoitems.manager.ItemManager; -import net.Indyuce.mmoitems.manager.LayoutManager; -import net.Indyuce.mmoitems.manager.LoreFormatManager; -import net.Indyuce.mmoitems.manager.PluginUpdateManager; -import net.Indyuce.mmoitems.manager.RecipeManager; -import net.Indyuce.mmoitems.manager.SetManager; -import net.Indyuce.mmoitems.manager.StatManager; -import net.Indyuce.mmoitems.manager.TemplateManager; -import net.Indyuce.mmoitems.manager.TierManager; -import net.Indyuce.mmoitems.manager.TypeManager; -import net.Indyuce.mmoitems.manager.UpgradeManager; -import net.Indyuce.mmoitems.manager.WorldGenManager; +import net.Indyuce.mmoitems.listener.*; +import net.Indyuce.mmoitems.manager.*; +import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.Listener; +import org.bukkit.inventory.ItemStack; +import org.bukkit.scheduler.BukkitRunnable; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.Nullable; +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; + public class MMOItems extends LuminePlugin { public static MMOItems plugin; @@ -182,7 +137,6 @@ public class MMOItems extends LuminePlugin { mythicEnchantsSupport = new MythicEnchantsSupport(); } - @Override public void enable() { @@ -253,8 +207,7 @@ public class MMOItems extends LuminePlugin { Bukkit.getPluginManager().registerEvents(new ElementListener(), this); Bukkit.getPluginManager().registerEvents(new CustomBlockListener(), this); if (Bukkit.getPluginManager().getPlugin("PhatLoots") != null) { - Bukkit.getPluginManager().registerEvents(new PhatLootsHook(), this); - } + Bukkit.getPluginManager().registerEvents(new PhatLootsHook(), this); } MMOItemUIFilter.register(); Bukkit.getScheduler().runTaskTimer(this, () -> Bukkit.getOnlinePlayers().forEach(player -> PlayerData.get(player).updateStats()), 100, 20); @@ -281,8 +234,8 @@ public class MMOItems extends LuminePlugin { Bukkit.getPluginManager().registerEvents(new McMMONonRPGHook(), this); /* - * Registers Player Inventories. Each of these add locations of items to - * search for when doing inventory updates. + * Registers Player Inventories. Each of these add locations of items to search for + * when doing inventory updates. */ registerPlayerInventory(new DefaultPlayerInventory()); if (Bukkit.getPluginManager().getPlugin("RPGInventory") != null) { @@ -337,17 +290,10 @@ public class MMOItems extends LuminePlugin { if (Bukkit.getPluginManager().getPlugin("BossShopPro") != null) { getLogger().log(Level.INFO, "Hooked onto BossShopPro"); - (new BukkitRunnable() { - public void run() { - // noinspection ProhibitedExceptionCaught - try { - new MMOItemsRewardTypes().register(); - } catch (NullPointerException ignored) { - getLogger().log(Level.INFO, "Could not Hook onto BossShopPro"); - } - } - }).runTaskLater(this, 1L); - } + (new BukkitRunnable() { public void run() { + //noinspection ProhibitedExceptionCaught + try { new MMOItemsRewardTypes().register(); } catch (NullPointerException ignored) { getLogger().log(Level.INFO, "Could not Hook onto BossShopPro"); } } + }).runTaskLater(this, 1L); } // compatibility with /reload Bukkit.getScheduler().runTask(this, () -> Bukkit.getOnlinePlayers().forEach(PlayerData::load)); @@ -377,8 +323,8 @@ public class MMOItems extends LuminePlugin { getCommand("mmoitems").setTabCompleter(mmoitemsCommand); // update item command DISABLED - // getCommand("updateitem").setExecutor(new UpdateItemCommand()); - // getCommand("updateitem").setTabCompleter(new UpdateItemCompletion()); + //getCommand("updateitem").setExecutor(new UpdateItemCommand()); + //getCommand("updateitem").setTabCompleter(new UpdateItemCompletion()); } @Override @@ -482,13 +428,12 @@ public class MMOItems extends LuminePlugin { *

* Default instance is DefaultPlayerInventory in comp.inventory * - * @param value The player inventory subclass - * @deprecated Rather than setting this to the only inventory MMOItems - * will search equipment within, you must add your - * inventory to the handler with - * getInventory().Register(). This method - * will clear all other PlayerInventories for now, as to - * keep backwards compatibility. + * @param value The player inventory subclass + * @deprecated Rather than setting this to the only inventory MMOItems will + * search equipment within, you must add your inventory to the + * handler with getInventory().Register(). This method + * will clear all other PlayerInventories for now, as to keep + * backwards compatibility. */ @Deprecated public void setPlayerInventory(PlayerInventory value) { @@ -551,8 +496,7 @@ public class MMOItems extends LuminePlugin { public HologramSupport getHolograms() { return hologramSupport; } - - public EquipListener getEquipListener() { + public EquipListener getEquipListener(){ return equipListener; } @@ -576,7 +520,7 @@ public class MMOItems extends LuminePlugin { return vaultSupport != null && vaultSupport.getPermissions() != null; } - public MythicEnchantsSupport getMythicEnchantsSupport() { + public MythicEnchantsSupport getMythicEnchantsSupport(){ return this.mythicEnchantsSupport; } @@ -592,14 +536,11 @@ public class MMOItems extends LuminePlugin { return stringInputParsers; } - // region Easy-Access API + //region Easy-Access API /** - * Decide by which system will the RPG Requirements of the player will be - * checked. - *

- *

- * For example, required level, is that vanilla XP levels, MMOCore levels, - * McMMO Leves or what? + * Decide by which system will the RPG Requirements of the player will be checked. + *

+ * For example, required level, is that vanilla XP levels, MMOCore levels, McMMO Leves or what? */ public void findRpgPlugin() { if (rpgPlugin != null) @@ -621,8 +562,7 @@ public class MMOItems extends LuminePlugin { return; } else { - print(null, "Preferred RPGPlayer provider $r{0}$b is not installed!", "RPG Provider", preferred); - } + print(null, "Preferred RPGPlayer provider $r{0}$b is not installed!", "RPG Provider", preferred); } } catch (IllegalArgumentException ignored) { @@ -630,9 +570,7 @@ public class MMOItems extends LuminePlugin { FriendlyFeedbackProvider ffp = new FriendlyFeedbackProvider(FFPMMOItems.get()); ffp.activatePrefix(true, "RPG Provider"); ffp.log(FriendlyFeedbackCategory.ERROR, "Invalid RPG Provider '$u{0}$b' --- These are the supported ones:", preferred); - for (RPGHandler.PluginEnum pgrep : RPGHandler.PluginEnum.values()) { - ffp.log(FriendlyFeedbackCategory.ERROR, " $r+ $b{0}", pgrep.getName()); - } + for (RPGHandler.PluginEnum pgrep : RPGHandler.PluginEnum.values()) { ffp.log(FriendlyFeedbackCategory.ERROR, " $r+ $b{0}", pgrep.getName()); } ffp.sendTo(FriendlyFeedbackCategory.ERROR, getConsole()); } } @@ -662,17 +600,12 @@ public class MMOItems extends LuminePlugin { * 'level-item' option. The item will pick a random tier if the * template has the 'tiered' option */ - @Nullable - public MMOItem getMMOItem(@Nullable Type type, @Nullable String id, @NotNull PlayerData player) { - if (type == null || id == null) { - return null; - } + @Nullable public MMOItem getMMOItem(@Nullable Type type, @Nullable String id, @NotNull PlayerData player) { + if (type == null || id == null) { return null; } // Valid template? MMOItemTemplate found = getTemplates().getTemplate(type, id); - if (found == null) { - return null; - } + if (found == null) { return null; } // Build if found return found.newBuilder(player.getRPG()).build(); @@ -684,17 +617,12 @@ public class MMOItems extends LuminePlugin { * 'level-item' option. The item will pick a random tier if the * template has the 'tiered' option */ - @Nullable - public ItemStack getItem(@Nullable Type type, @Nullable String id, @NotNull PlayerData player) { - if (type == null || id == null) { - return null; - } + @Nullable public ItemStack getItem(@Nullable Type type, @Nullable String id, @NotNull PlayerData player) { + if (type == null || id == null) { return null; } // Valid MMOItem? MMOItem m = getMMOItem(type, id, player); - if (m == null) { - return null; - } + if (m == null) { return null; } // Build if found return m.newBuilder().build(); @@ -706,17 +634,12 @@ public class MMOItems extends LuminePlugin { * @return Generates an item given an item template with a * specific item level and item tier */ - @Nullable - public MMOItem getMMOItem(@Nullable Type type, @Nullable String id, int itemLevel, @Nullable ItemTier itemTier) { - if (type == null || id == null) { - return null; - } + @Nullable public MMOItem getMMOItem(@Nullable Type type, @Nullable String id, int itemLevel, @Nullable ItemTier itemTier) { + if (type == null || id == null) { return null; } // Valid template? MMOItemTemplate found = getTemplates().getTemplate(type, id); - if (found == null) { - return null; - } + if (found == null) { return null; } // Build if found return found.newBuilder(itemLevel, itemTier).build(); @@ -728,17 +651,12 @@ public class MMOItems extends LuminePlugin { * @return Generates an item given an item template with a * specific item level and item tier */ - @Nullable - public ItemStack getItem(@Nullable Type type, @Nullable String id, int itemLevel, @Nullable ItemTier itemTier) { - if (type == null || id == null) { - return null; - } + @Nullable public ItemStack getItem(@Nullable Type type, @Nullable String id, int itemLevel, @Nullable ItemTier itemTier) { + if (type == null || id == null) { return null; } // Valid MMOItem? MMOItem m = getMMOItem(type, id, itemLevel, itemTier); - if (m == null) { - return null; - } + if (m == null) { return null; } // Build if found return m.newBuilder().build(); @@ -748,21 +666,15 @@ public class MMOItems extends LuminePlugin { * @return Generates an item given an item template. The item level will be * 0 and the item will have no item tier unless one is specified in * the base item data. - *

- *

+ *

* Will return null if such MMOItem does not exist. */ - @Nullable - public MMOItem getMMOItem(@Nullable Type type, @Nullable String id) { - if (type == null || id == null) { - return null; - } + @Nullable public MMOItem getMMOItem(@Nullable Type type, @Nullable String id) { + if (type == null || id == null) { return null; } // Valid template? MMOItemTemplate found = getTemplates().getTemplate(type, id); - if (found == null) { - return null; - } + if (found == null) { return null; } // Build if found return found.newBuilder(0, null).build(); @@ -772,127 +684,96 @@ public class MMOItems extends LuminePlugin { * @return Generates an item given an item template. The item level will be * 0 and the item will have no item tier unless one is specified in * the base item data. - *

- *

+ *

* Will return null if such MMOItem does not exist. */ - @Nullable - public ItemStack getItem(@Nullable String type, @Nullable String id) { - if (type == null || id == null) { - return null; - } + @Nullable public ItemStack getItem(@Nullable String type, @Nullable String id) { + if (type == null || id == null) { return null; } return getItem(getType(type), id); } - /** * @return Generates an item given an item template. The item level will be * 0 and the item will have no item tier unless one is specified in * the base item data. - *

- *

+ *

* Will return null if such MMOItem does not exist. */ - @Nullable - public ItemStack getItem(@Nullable Type type, @Nullable String id) { - if (type == null || id == null) { - return null; - } + @Nullable public ItemStack getItem(@Nullable Type type, @Nullable String id) { + if (type == null || id == null) { return null; } // Valid MMOItem? MMOItem m = getMMOItem(type, id); - if (m == null) { - return null; - } + if (m == null) { return null; } // Build if found return m.newBuilder().build(); } + /** - * @param nbtItem The NBTItem you are testing - * @return The MMOItem Type of this item, if it is a MMOItem + * @param nbtItem The NBTItem you are testing + * @return The MMOItem Type of this item, if it is a MMOItem */ - @Nullable - public Type getType(@Nullable NBTItem nbtItem) { - if (nbtItem == null || !nbtItem.hasType()) { - return null; - } + @Nullable public Type getType(@Nullable NBTItem nbtItem) { + if (nbtItem == null || !nbtItem.hasType()) { return null; } // Try that one instead return getType(nbtItem.getType()); } /** - * @param nbtItem The NBTItem you are testing - * @return The MMOItem ID of this item, if it is a MMOItem + * @param nbtItem The NBTItem you are testing + * @return The MMOItem ID of this item, if it is a MMOItem */ - @Nullable - public String getID(@Nullable NBTItem nbtItem) { - if (nbtItem == null || !nbtItem.hasType()) { - return null; - } + @Nullable public String getID(@Nullable NBTItem nbtItem) { + if (nbtItem == null || !nbtItem.hasType()) { return null; } ItemTag type = ItemTag.getTagAtPath("MMOITEMS_ITEM_ID", nbtItem, SupportedNBTTagValues.STRING); - if (type == null) { - return null; - } + if (type == null) { return null; } return (String) type.getValue(); } /** * Shorthand to get the specified type. * - * @param type What do you think its called + * @param type What do you think its called * - * @return A type if such exists. + * @return A type if such exists. */ - @Nullable - public Type getType(@Nullable String type) { - if (type == null) { - return null; - } + @Nullable public Type getType(@Nullable String type) { + if (type == null) { return null; } return getTypes().get(type); } /** * Logs something into the console with a cool [MMOItems] prefix :) - *

- *

- * Parses color codes. Mostly for DEV testing. these may removed any - * release. + *

+ * Parses color codes. Mostly for DEV testing. these may removed any release. * * @author Gunging */ public static void log(@Nullable String message) { - if (message == null) { - message = "< null >"; - } - // String prefix = "\u00a78[" + ChatColor.YELLOW + "MMOItems\u00a78] - // \u00a77"; + if (message == null) { message = "< null >"; } + //String prefix = "\u00a78[" + ChatColor.YELLOW + "MMOItems\u00a78] \u00a77"; String prefix = ""; plugin.getServer().getConsoleSender().sendMessage(prefix + message); } /** * Easily log something using the FriendlyFeedbackProvider, nice! - *

- *

+ *

* Use a null level to use the normal console sender. * * @author Gunging */ public static void print(@Nullable Level level, @Nullable String message, @Nullable String prefix, @NotNull String... replaces) { - if (message == null) { - message = "< null >"; - } - if (level != null) { - MMOItems.plugin.getLogger().log(level, FriendlyFeedbackProvider.quickForConsole(FFPMMOItems.get(), message, replaces)); + if (message == null) { message = "< null >"; } + if (level != null) { MMOItems.plugin.getLogger().log(level, FriendlyFeedbackProvider.quickForConsole(FFPMMOItems.get(), message, replaces)); } else { FriendlyFeedbackMessage p = new FriendlyFeedbackMessage("", prefix); FriendlyFeedbackMessage r = FriendlyFeedbackProvider.generateMessage(p, message, replaces); - getConsole().sendMessage(r.forConsole(FFPMMOItems.get())); - } + getConsole().sendMessage(r.forConsole(FFPMMOItems.get())); } } /** @@ -900,22 +781,17 @@ public class MMOItems extends LuminePlugin { * * @author Gunging */ - @NotNull - public static ConsoleCommandSender getConsole() { - return plugin.getServer().getConsoleSender(); - } + @NotNull public static ConsoleCommandSender getConsole() { return plugin.getServer().getConsoleSender(); } /** - * @param item The item stack you are testing. - * @param type MMOItem Type you are expecting {@link Type#getId()} - * @param id MMOItem ID you are expecting + * @param item The item stack you are testing. + * @param type MMOItem Type you are expecting {@link Type#getId()} + * @param id MMOItem ID you are expecting * - * @return If the given item is the desired MMOItem + * @return If the given item is the desired MMOItem */ public static boolean isMMOItem(@Nullable ItemStack item, @NotNull String type, @NotNull String id) { - if (item == null) { - return false; - } + if (item == null) { return false; } // Make it into an NBT Item NBTItem asNBT = NBTItem.get(item); @@ -924,17 +800,13 @@ public class MMOItems extends LuminePlugin { String itemID = MMOItems.plugin.getID(asNBT); // Not a MMOItem - if (itemID == null) { - return false; - } + if (itemID == null) { return false; } // ID matches? - if (!itemID.equals(id)) { - return false; - } + if (!itemID.equals(id)) { return false; } // If the type matches too, we are set. return asNBT.getType().equals(type); } - // endregion + //endregion } \ No newline at end of file diff --git a/src/main/java/net/Indyuce/mmoitems/api/ArrowParticles.java b/src/main/java/net/Indyuce/mmoitems/api/ArrowParticles.java index 14bd4d20..2086bc28 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ArrowParticles.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ArrowParticles.java @@ -1,16 +1,15 @@ package net.Indyuce.mmoitems.api; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import net.Indyuce.mmoitems.MMOItems; +import io.lumine.mythic.lib.api.item.NBTItem; + import org.bukkit.Color; import org.bukkit.Particle; import org.bukkit.entity.Arrow; import org.bukkit.scheduler.BukkitRunnable; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; - -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.MMOItems; - public class ArrowParticles extends BukkitRunnable { private final Arrow arrow; diff --git a/src/main/java/net/Indyuce/mmoitems/api/ClaseMuyImportante.java b/src/main/java/net/Indyuce/mmoitems/api/ClaseMuyImportante.java index 0d2df238..9cb0f61c 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ClaseMuyImportante.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ClaseMuyImportante.java @@ -1,9 +1,6 @@ package net.Indyuce.mmoitems.api; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - +import net.Indyuce.mmoitems.MMOItems; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; @@ -17,7 +14,9 @@ import org.bukkit.inventory.MerchantRecipe; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; -import net.Indyuce.mmoitems.MMOItems; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; public class ClaseMuyImportante { public static void metodoMuyImportante() { diff --git a/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java b/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java index 75bdb613..f15644de 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java +++ b/src/main/java/net/Indyuce/mmoitems/api/CustomSound.java @@ -3,8 +3,8 @@ package net.Indyuce.mmoitems.api; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.MMOUtils; +import io.lumine.mythic.lib.version.VersionMaterial; public enum CustomSound { ON_ATTACK(Material.IRON_SWORD, 19, "Plays when attacking an entity."), diff --git a/src/main/java/net/Indyuce/mmoitems/api/Element.java b/src/main/java/net/Indyuce/mmoitems/api/Element.java index 3c0bed6e..058ff1b0 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/Element.java +++ b/src/main/java/net/Indyuce/mmoitems/api/Element.java @@ -16,13 +16,13 @@ import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Consumer; import org.bukkit.util.Vector; -import io.lumine.mythic.lib.api.DamageType; -import io.lumine.mythic.lib.version.VersionMaterial; -import io.lumine.mythic.lib.version.VersionSound; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; import net.Indyuce.mmoitems.listener.ElementListener; +import io.lumine.mythic.lib.api.DamageType; +import io.lumine.mythic.lib.version.VersionMaterial; +import io.lumine.mythic.lib.version.VersionSound; public enum Element { FIRE(Material.BLAZE_POWDER, ChatColor.DARK_RED, new ElementParticle(Particle.FLAME, .05f, 8), (stats, result, target, attack, absolute) -> { diff --git a/src/main/java/net/Indyuce/mmoitems/api/ElementalAttack.java b/src/main/java/net/Indyuce/mmoitems/api/ElementalAttack.java index 1c8c3985..74f8b6b6 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ElementalAttack.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ElementalAttack.java @@ -7,10 +7,10 @@ import java.util.Random; import org.bukkit.entity.LivingEntity; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.player.PlayerData.CooldownType; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; public class ElementalAttack { private final Map relative = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/api/ItemAttackResult.java b/src/main/java/net/Indyuce/mmoitems/api/ItemAttackResult.java index 8b996e3f..0d3214ce 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ItemAttackResult.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ItemAttackResult.java @@ -1,13 +1,12 @@ package net.Indyuce.mmoitems.api; -import org.bukkit.entity.LivingEntity; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.AttackResult; import io.lumine.mythic.lib.api.DamageType; import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.ability.Ability.CastingMode; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; +import org.bukkit.entity.LivingEntity; public class ItemAttackResult extends AttackResult { public ItemAttackResult(boolean successful, DamageType... types) { diff --git a/src/main/java/net/Indyuce/mmoitems/api/ItemTier.java b/src/main/java/net/Indyuce/mmoitems/api/ItemTier.java index 09241fcb..aa2acc84 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ItemTier.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ItemTier.java @@ -1,18 +1,17 @@ package net.Indyuce.mmoitems.api; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import org.bukkit.Bukkit; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.inventory.ItemStack; - import io.lumine.mythic.lib.MythicLib; import net.Indyuce.mmoitems.api.droptable.DropTable; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.comp.itemglow.TierColor; +import org.bukkit.Bukkit; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.inventory.ItemStack; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; public class ItemTier { private final String name, id; diff --git a/src/main/java/net/Indyuce/mmoitems/api/ProjectileData.java b/src/main/java/net/Indyuce/mmoitems/api/ProjectileData.java index 795bcaf7..59cd4d17 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ProjectileData.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ProjectileData.java @@ -7,10 +7,10 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; import net.Indyuce.mmoitems.stat.data.PotionEffectData; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; public class ProjectileData { private final NBTItem sourceItem; diff --git a/src/main/java/net/Indyuce/mmoitems/api/ReforgeOptions.java b/src/main/java/net/Indyuce/mmoitems/api/ReforgeOptions.java index 89a24e2e..ebc51adc 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ReforgeOptions.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ReforgeOptions.java @@ -1,8 +1,10 @@ package net.Indyuce.mmoitems.api; +import net.Indyuce.mmoitems.MMOItems; import org.bukkit.ChatColor; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class ReforgeOptions { public static boolean dropRestoredGems; diff --git a/src/main/java/net/Indyuce/mmoitems/api/Type.java b/src/main/java/net/Indyuce/mmoitems/api/Type.java index bbfdbb58..e90743e0 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/Type.java +++ b/src/main/java/net/Indyuce/mmoitems/api/Type.java @@ -1,21 +1,19 @@ package net.Indyuce.mmoitems.api; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nullable; - -import org.apache.commons.lang.Validate; -import org.bukkit.Material; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.inventory.ItemStack; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.util.identify.UnidentifiedItem; import net.Indyuce.mmoitems.manager.TypeManager; import net.Indyuce.mmoitems.stat.type.ItemStat; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.inventory.ItemStack; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.List; @SuppressWarnings("unused") public class Type { diff --git a/src/main/java/net/Indyuce/mmoitems/api/TypeSet.java b/src/main/java/net/Indyuce/mmoitems/api/TypeSet.java index 0dcd7006..0456fea4 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/TypeSet.java +++ b/src/main/java/net/Indyuce/mmoitems/api/TypeSet.java @@ -1,15 +1,5 @@ package net.Indyuce.mmoitems.api; -import java.util.Random; - -import org.bukkit.Location; -import org.bukkit.Particle; -import org.bukkit.Sound; -import org.bukkit.entity.Entity; -import org.bukkit.entity.LivingEntity; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; - import io.lumine.mythic.lib.version.VersionSound; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; @@ -17,6 +7,15 @@ import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.interaction.weapon.Weapon; import net.Indyuce.mmoitems.api.player.PlayerData.CooldownType; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; +import org.bukkit.Location; +import org.bukkit.Particle; +import org.bukkit.Sound; +import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import java.util.Random; public enum TypeSet { diff --git a/src/main/java/net/Indyuce/mmoitems/api/UpdaterData.java b/src/main/java/net/Indyuce/mmoitems/api/UpdaterData.java index abd48345..c2063a4d 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/UpdaterData.java +++ b/src/main/java/net/Indyuce/mmoitems/api/UpdaterData.java @@ -8,9 +8,9 @@ import java.util.UUID; import org.apache.commons.lang.Validate; import org.bukkit.configuration.ConfigurationSection; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.manager.UpdaterManager.KeepOption; +import io.lumine.mythic.lib.api.item.NBTItem; public class UpdaterData { diff --git a/src/main/java/net/Indyuce/mmoitems/api/UpgradeTemplate.java b/src/main/java/net/Indyuce/mmoitems/api/UpgradeTemplate.java index 355a8422..26e9151c 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/UpgradeTemplate.java +++ b/src/main/java/net/Indyuce/mmoitems/api/UpgradeTemplate.java @@ -5,24 +5,25 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import org.apache.commons.lang.Validate; -import org.bukkit.configuration.ConfigurationSection; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import net.Indyuce.mmoitems.ItemStats; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; import net.Indyuce.mmoitems.stat.Enchants; import net.Indyuce.mmoitems.stat.data.UpgradeData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; +import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.type.StatHistory; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.ConfigurationSection; + +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; import net.Indyuce.mmoitems.stat.type.ItemStat; -import net.Indyuce.mmoitems.stat.type.StatHistory; import net.Indyuce.mmoitems.stat.type.Upgradable; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class UpgradeTemplate { @NotNull diff --git a/src/main/java/net/Indyuce/mmoitems/api/crafting/ConfigMMOItem.java b/src/main/java/net/Indyuce/mmoitems/api/crafting/ConfigMMOItem.java index 84de594b..3d0cdace 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/crafting/ConfigMMOItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/crafting/ConfigMMOItem.java @@ -3,12 +3,12 @@ package net.Indyuce.mmoitems.api.crafting; import org.apache.commons.lang.Validate; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.api.player.RPGPlayer; +import org.jetbrains.annotations.NotNull; public class ConfigMMOItem { private final MMOItemTemplate template; diff --git a/src/main/java/net/Indyuce/mmoitems/api/crafting/CraftingStation.java b/src/main/java/net/Indyuce/mmoitems/api/crafting/CraftingStation.java index 5e385ff1..bec9ecbb 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/crafting/CraftingStation.java +++ b/src/main/java/net/Indyuce/mmoitems/api/crafting/CraftingStation.java @@ -1,17 +1,5 @@ package net.Indyuce.mmoitems.api.crafting; -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import org.apache.commons.lang.Validate; -import org.bukkit.Sound; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.configuration.file.FileConfiguration; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.util.PostLoadObject; import net.Indyuce.mmoitems.MMOItems; @@ -21,6 +9,13 @@ import net.Indyuce.mmoitems.api.crafting.recipe.Recipe; import net.Indyuce.mmoitems.api.crafting.recipe.Recipe.RecipeOption; import net.Indyuce.mmoitems.api.crafting.recipe.UpgradingRecipe; import net.Indyuce.mmoitems.api.player.PlayerData; +import org.apache.commons.lang.Validate; +import org.bukkit.Sound; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.FileConfiguration; + +import java.util.*; +import java.util.logging.Level; public class CraftingStation extends PostLoadObject { private final String id, name; diff --git a/src/main/java/net/Indyuce/mmoitems/api/crafting/IngredientInventory.java b/src/main/java/net/Indyuce/mmoitems/api/crafting/IngredientInventory.java index d9ec6360..b5138ff6 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/crafting/IngredientInventory.java +++ b/src/main/java/net/Indyuce/mmoitems/api/crafting/IngredientInventory.java @@ -1,18 +1,5 @@ package net.Indyuce.mmoitems.api.crafting; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.ui.QuickNumberRange; @@ -20,6 +7,14 @@ import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.crafting.ingredient.Ingredient; import net.Indyuce.mmoitems.manager.CraftingManager.IngredientType; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; public class IngredientInventory { diff --git a/src/main/java/net/Indyuce/mmoitems/api/crafting/Layout.java b/src/main/java/net/Indyuce/mmoitems/api/crafting/Layout.java index ecb77d1c..a0fb3b75 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/crafting/Layout.java +++ b/src/main/java/net/Indyuce/mmoitems/api/crafting/Layout.java @@ -1,10 +1,10 @@ package net.Indyuce.mmoitems.api.crafting; -import java.util.List; - import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; +import java.util.List; + public class Layout { private final String id; diff --git a/src/main/java/net/Indyuce/mmoitems/api/crafting/MMOItemUIFilter.java b/src/main/java/net/Indyuce/mmoitems/api/crafting/MMOItemUIFilter.java index 83c1ed2d..579c9da6 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/crafting/MMOItemUIFilter.java +++ b/src/main/java/net/Indyuce/mmoitems/api/crafting/MMOItemUIFilter.java @@ -1,12 +1,5 @@ package net.Indyuce.mmoitems.api.crafting; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.crafting.uifilters.UIFilter; import io.lumine.mythic.lib.api.crafting.uimanager.UIFilterManager; import io.lumine.mythic.lib.api.item.NBTItem; @@ -14,7 +7,7 @@ import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import io.lumine.mythic.lib.api.util.ui.QuickNumberRange; import io.lumine.mythic.lib.api.util.ui.SilentNumbers; -import io.lumine.utils.items.ItemFactory; +import io.lumine.mythic.utils.items.ItemFactory; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; @@ -24,6 +17,12 @@ import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.api.item.util.DynamicLore; import net.Indyuce.mmoitems.stat.data.UpgradeData; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; /** * A filter to identify MMOItems :) diff --git a/src/main/java/net/Indyuce/mmoitems/api/crafting/VanillaMMOItemCountermatch.java b/src/main/java/net/Indyuce/mmoitems/api/crafting/VanillaMMOItemCountermatch.java index 17513c4e..a4420e7a 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/crafting/VanillaMMOItemCountermatch.java +++ b/src/main/java/net/Indyuce/mmoitems/api/crafting/VanillaMMOItemCountermatch.java @@ -1,13 +1,12 @@ package net.Indyuce.mmoitems.api.crafting; -import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.crafting.uifilters.VanillaUIFilter; import io.lumine.mythic.lib.api.crafting.uimanager.UIFilterCountermatch; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * To make MMOItems not match as vanilla items (bruh) diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/GemStone.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/GemStone.java index 2d5a7eed..e70993a5 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/GemStone.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/GemStone.java @@ -1,7 +1,27 @@ package net.Indyuce.mmoitems.api.interaction; -import java.util.UUID; - +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.event.item.ApplyGemStoneEvent; +import net.Indyuce.mmoitems.api.item.mmoitem.LiveMMOItem; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; +import net.Indyuce.mmoitems.api.player.PlayerData; +import net.Indyuce.mmoitems.api.util.message.Message; +import net.Indyuce.mmoitems.stat.Enchants; +import net.Indyuce.mmoitems.stat.GemUpgradeScaling; +import net.Indyuce.mmoitems.stat.data.GemSocketsData; +import net.Indyuce.mmoitems.stat.data.GemstoneData; +import net.Indyuce.mmoitems.stat.data.StringData; +import net.Indyuce.mmoitems.stat.data.UpgradeData; +import net.Indyuce.mmoitems.stat.data.type.Mergeable; +import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.type.GemStoneStat; +import net.Indyuce.mmoitems.stat.type.ItemStat; +import io.lumine.mythic.lib.api.item.NBTItem; +import net.Indyuce.mmoitems.stat.type.StatHistory; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Sound; @@ -10,23 +30,7 @@ import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.ItemStats; -import net.Indyuce.mmoitems.MMOUtils; -import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.api.event.item.ApplyGemStoneEvent; -import net.Indyuce.mmoitems.api.item.mmoitem.LiveMMOItem; -import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; -import net.Indyuce.mmoitems.api.util.message.Message; -import net.Indyuce.mmoitems.stat.Enchants; -import net.Indyuce.mmoitems.stat.GemUpgradeScaling; -import net.Indyuce.mmoitems.stat.data.GemSocketsData; -import net.Indyuce.mmoitems.stat.data.GemstoneData; -import net.Indyuce.mmoitems.stat.data.type.Mergeable; -import net.Indyuce.mmoitems.stat.data.type.StatData; -import net.Indyuce.mmoitems.stat.type.GemStoneStat; -import net.Indyuce.mmoitems.stat.type.ItemStat; -import net.Indyuce.mmoitems.stat.type.StatHistory; +import java.util.UUID; public class GemStone extends UseItem { diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java index e09363a4..938c7640 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/ItemSkin.java @@ -1,7 +1,15 @@ package net.Indyuce.mmoitems.api.interaction; -import java.lang.reflect.Field; - +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.util.message.Message; +import net.Indyuce.mmoitems.stat.data.SkullTextureData; +import net.Indyuce.mmoitems.stat.data.StringListData; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.version.VersionMaterial; import org.bukkit.ChatColor; import org.bukkit.Sound; import org.bukkit.entity.Player; @@ -10,16 +18,7 @@ import org.bukkit.inventory.meta.Damageable; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; -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.MMOUtils; -import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.api.util.message.Message; -import net.Indyuce.mmoitems.stat.data.SkullTextureData; -import net.Indyuce.mmoitems.stat.data.StringListData; +import java.lang.reflect.Field; public class ItemSkin extends UseItem { public ItemSkin(Player player, NBTItem item) { diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java index 4e6fa0ba..5809111d 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java @@ -1,6 +1,10 @@ package net.Indyuce.mmoitems.api.interaction; +import io.lumine.mythic.lib.UtilityMethods; +import io.lumine.mythic.lib.api.item.NBTItem; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.comp.flags.FlagPlugin.CustomFlag; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Particle; @@ -12,11 +16,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; -import io.lumine.mythic.lib.UtilityMethods; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.comp.flags.FlagPlugin.CustomFlag; - public class Tool extends UseItem { public Tool(Player player, NBTItem item) { super(player, item); diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/UseItem.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/UseItem.java index f3b94ded..af1889a6 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/UseItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/UseItem.java @@ -5,9 +5,7 @@ import java.util.Random; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; @@ -23,6 +21,8 @@ import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.comp.flags.FlagPlugin.CustomFlag; import net.Indyuce.mmoitems.stat.data.CommandData; import net.Indyuce.mmoitems.stat.data.CommandListData; +import io.lumine.mythic.lib.api.item.NBTItem; +import org.jetbrains.annotations.NotNull; public class UseItem { protected final Player player; diff --git a/src/main/java/net/Indyuce/mmoitems/api/item/build/ItemStackBuilder.java b/src/main/java/net/Indyuce/mmoitems/api/item/build/ItemStackBuilder.java index e6936496..2dbe5704 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/item/build/ItemStackBuilder.java +++ b/src/main/java/net/Indyuce/mmoitems/api/item/build/ItemStackBuilder.java @@ -232,9 +232,9 @@ public class ItemStackBuilder { */ meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, fakeModifier); -// if (mmoitem.hasData(ItemStats.NAME) && meta.hasDisplayName()) { -// meta.setDisplayName(getMeta().getDisplayName()); -// } + if (mmoitem.hasData(ItemStats.NAME) && meta.hasDisplayName()) { + meta.setDisplayName(getMeta().getDisplayName()); + } item.setItemMeta(meta); NBTItem nbtItem = NBTItem.get(item); diff --git a/src/main/java/net/Indyuce/mmoitems/api/item/util/DynamicLore.java b/src/main/java/net/Indyuce/mmoitems/api/item/util/DynamicLore.java index 91b7b98d..4f3e6a04 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/item/util/DynamicLore.java +++ b/src/main/java/net/Indyuce/mmoitems/api/item/util/DynamicLore.java @@ -1,18 +1,16 @@ package net.Indyuce.mmoitems.api.item.util; -import java.util.ArrayList; -import java.util.List; - -import io.lumine.mythic.utils.adventure.text.Component; -import org.bukkit.inventory.ItemStack; - import com.google.gson.JsonArray; import com.google.gson.JsonElement; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.LegacyComponent; +import io.lumine.mythic.utils.adventure.text.Component; import net.Indyuce.mmoitems.MMOItems; +import org.bukkit.inventory.ItemStack; + +import java.util.ArrayList; +import java.util.List; public class DynamicLore { private final NBTItem item; diff --git a/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/CraftingRecipeDisplay.java b/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/CraftingRecipeDisplay.java index abdb61a7..8ec5ba83 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/CraftingRecipeDisplay.java +++ b/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/CraftingRecipeDisplay.java @@ -1,22 +1,10 @@ package net.Indyuce.mmoitems.api.item.util.crafting; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; - +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.LegacyComponent; import io.lumine.mythic.utils.adventure.text.Component; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.inventory.ItemFlag; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; - import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.crafting.ConditionalDisplay; import net.Indyuce.mmoitems.api.crafting.condition.Condition.CheckedCondition; @@ -24,6 +12,18 @@ import net.Indyuce.mmoitems.api.crafting.recipe.CheckedRecipe; import net.Indyuce.mmoitems.api.crafting.recipe.CraftingRecipe; import net.Indyuce.mmoitems.api.item.util.ConfigItem; import net.Indyuce.mmoitems.api.util.message.Message; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; public class CraftingRecipeDisplay extends ConfigItem { private static final DecimalFormat craftingTimeFormat = new DecimalFormat("0.#"); diff --git a/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/QueueItemDisplay.java b/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/QueueItemDisplay.java index 3cb0b434..46930aea 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/QueueItemDisplay.java +++ b/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/QueueItemDisplay.java @@ -1,23 +1,23 @@ package net.Indyuce.mmoitems.api.item.util.crafting; +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.LegacyComponent; +import io.lumine.mythic.utils.adventure.text.Component; +import net.Indyuce.mmoitems.api.crafting.CraftingStatus.CraftingQueue.CraftingInfo; +import net.Indyuce.mmoitems.api.item.util.ConfigItem; +import org.bukkit.Material; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.api.util.LegacyComponent; -import io.lumine.mythic.utils.adventure.text.Component; -import org.bukkit.Material; -import org.bukkit.inventory.ItemFlag; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; - -import net.Indyuce.mmoitems.api.crafting.CraftingStatus.CraftingQueue.CraftingInfo; -import net.Indyuce.mmoitems.api.item.util.ConfigItem; - public class QueueItemDisplay extends ConfigItem { private static final long[] ms = { 1000, 60 * 1000, 60 * 60 * 1000, 24 * 60 * 60 * 1000 }; private static final String[] chars = { "s", "m", "h", "d" }; diff --git a/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/UpgradingRecipeDisplay.java b/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/UpgradingRecipeDisplay.java index d23daf34..6f62bb5a 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/UpgradingRecipeDisplay.java +++ b/src/main/java/net/Indyuce/mmoitems/api/item/util/crafting/UpgradingRecipeDisplay.java @@ -1,5 +1,6 @@ package net.Indyuce.mmoitems.api.item.util.crafting; +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.LegacyComponent; @@ -15,7 +16,11 @@ import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; public class UpgradingRecipeDisplay extends ConfigItem { public UpgradingRecipeDisplay() { diff --git a/src/main/java/net/Indyuce/mmoitems/api/item/util/identify/UnidentifiedItem.java b/src/main/java/net/Indyuce/mmoitems/api/item/util/identify/UnidentifiedItem.java index 527656ca..d8adfc40 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/item/util/identify/UnidentifiedItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/item/util/identify/UnidentifiedItem.java @@ -1,18 +1,5 @@ package net.Indyuce.mmoitems.api.item.util.identify; -import java.io.ByteArrayOutputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.bukkit.inventory.ItemFlag; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.util.io.BukkitObjectOutputStream; -import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.NBTItem; @@ -25,6 +12,18 @@ import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.api.item.util.ConfigItem; import net.Indyuce.mmoitems.api.item.util.DynamicLore; import net.Indyuce.mmoitems.stat.data.DoubleData; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.util.io.BukkitObjectOutputStream; +import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; + +import java.io.ByteArrayOutputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class UnidentifiedItem extends ConfigItem { public UnidentifiedItem(Type type) { diff --git a/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java index de29254a..19466195 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmoitems/api/player/PlayerData.java @@ -1,24 +1,5 @@ package net.Indyuce.mmoitems.api.player; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.Material; -import org.bukkit.OfflinePlayer; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; -import org.bukkit.scheduler.BukkitRunnable; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.DamageType; import io.lumine.mythic.lib.api.item.NBTItem; @@ -44,12 +25,20 @@ import net.Indyuce.mmoitems.api.player.inventory.EquippedPlayerItem; import net.Indyuce.mmoitems.api.player.inventory.InventoryUpdateHandler; import net.Indyuce.mmoitems.comp.flags.FlagPlugin.CustomFlag; import net.Indyuce.mmoitems.particle.api.ParticleRunnable; -import net.Indyuce.mmoitems.stat.data.AbilityData; -import net.Indyuce.mmoitems.stat.data.AbilityListData; -import net.Indyuce.mmoitems.stat.data.ParticleData; -import net.Indyuce.mmoitems.stat.data.PotionEffectListData; -import net.Indyuce.mmoitems.stat.data.StringListData; +import net.Indyuce.mmoitems.stat.data.*; import net.milkbowl.vault.permission.Permission; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.scheduler.BukkitRunnable; + +import java.util.*; public class PlayerData { private static final Map data = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java b/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java index 15c9bcdf..e88546ed 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java +++ b/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java @@ -1,10 +1,5 @@ package net.Indyuce.mmoitems.api.player; -import java.util.HashMap; -import java.util.Map; - -import org.bukkit.entity.Player; - import io.lumine.mythic.lib.api.stat.StatInstance; import io.lumine.mythic.lib.api.stat.StatMap; import io.lumine.mythic.lib.api.stat.modifier.ModifierType; @@ -14,6 +9,10 @@ import net.Indyuce.mmoitems.api.Type.EquipmentSlot; import net.Indyuce.mmoitems.api.player.inventory.EquippedPlayerItem; import net.Indyuce.mmoitems.stat.type.AttributeStat; import net.Indyuce.mmoitems.stat.type.ItemStat; +import org.bukkit.entity.Player; + +import java.util.HashMap; +import java.util.Map; public class PlayerStats { private final PlayerData playerData; diff --git a/src/main/java/net/Indyuce/mmoitems/api/player/RPGPlayer.java b/src/main/java/net/Indyuce/mmoitems/api/player/RPGPlayer.java index 79a3f37d..ad2f99ad 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/player/RPGPlayer.java +++ b/src/main/java/net/Indyuce/mmoitems/api/player/RPGPlayer.java @@ -1,16 +1,15 @@ package net.Indyuce.mmoitems.api.player; -import java.text.DecimalFormat; - -import org.bukkit.ChatColor; -import org.bukkit.Sound; -import org.bukkit.entity.Player; - import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.data.AbilityData; import net.Indyuce.mmoitems.stat.type.ItemRestriction; +import org.bukkit.ChatColor; +import org.bukkit.Sound; +import org.bukkit.entity.Player; + +import java.text.DecimalFormat; public abstract class RPGPlayer { private final PlayerData playerData; diff --git a/src/main/java/net/Indyuce/mmoitems/api/player/RefreshInventoryEvent.java b/src/main/java/net/Indyuce/mmoitems/api/player/RefreshInventoryEvent.java index 9cd273ac..143184b9 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/player/RefreshInventoryEvent.java +++ b/src/main/java/net/Indyuce/mmoitems/api/player/RefreshInventoryEvent.java @@ -1,13 +1,12 @@ package net.Indyuce.mmoitems.api.player; -import java.util.List; - +import net.Indyuce.mmoitems.api.player.inventory.EquippedPlayerItem; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; import org.jetbrains.annotations.NotNull; -import net.Indyuce.mmoitems.api.player.inventory.EquippedPlayerItem; +import java.util.List; public class RefreshInventoryEvent extends Event { diff --git a/src/main/java/net/Indyuce/mmoitems/api/recipe/CraftingType.java b/src/main/java/net/Indyuce/mmoitems/api/recipe/CraftingType.java index bd2f050d..10e7bb34 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/recipe/CraftingType.java +++ b/src/main/java/net/Indyuce/mmoitems/api/recipe/CraftingType.java @@ -1,11 +1,10 @@ package net.Indyuce.mmoitems.api.recipe; -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.MMOUtils; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; public enum CraftingType { SHAPED(21, "The C. Table Recipe (Shaped) for this item", VersionMaterial.CRAFTING_TABLE), diff --git a/src/main/java/net/Indyuce/mmoitems/api/util/MMOItemReforger.java b/src/main/java/net/Indyuce/mmoitems/api/util/MMOItemReforger.java index ee9bf013..cb473304 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/util/MMOItemReforger.java +++ b/src/main/java/net/Indyuce/mmoitems/api/util/MMOItemReforger.java @@ -1,20 +1,5 @@ package net.Indyuce.mmoitems.api.util; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.commons.lang.Validate; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.Damageable; -import org.bukkit.inventory.meta.ItemMeta; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.Ref; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; @@ -33,13 +18,7 @@ import net.Indyuce.mmoitems.api.player.RPGPlayer; import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; import net.Indyuce.mmoitems.stat.Enchants; import net.Indyuce.mmoitems.stat.RevisionID; -import net.Indyuce.mmoitems.stat.data.DoubleData; -import net.Indyuce.mmoitems.stat.data.EnchantListData; -import net.Indyuce.mmoitems.stat.data.GemSocketsData; -import net.Indyuce.mmoitems.stat.data.GemstoneData; -import net.Indyuce.mmoitems.stat.data.SoulboundData; -import net.Indyuce.mmoitems.stat.data.StringListData; -import net.Indyuce.mmoitems.stat.data.UpgradeData; +import net.Indyuce.mmoitems.stat.data.*; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.random.UpdatableRandomStatData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; @@ -47,6 +26,16 @@ import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.ItemStat; import net.Indyuce.mmoitems.stat.type.NameData; import net.Indyuce.mmoitems.stat.type.StatHistory; +import org.apache.commons.lang.Validate; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.Damageable; +import org.bukkit.inventory.meta.ItemMeta; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; /** * A class to manage modification of items with reference to what they used to be diff --git a/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java b/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java index 936dcb56..69cd68e9 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java @@ -22,10 +22,10 @@ import org.bukkit.inventory.meta.SkullMeta; import com.mojang.authlib.GameProfile; +import net.Indyuce.mmoitems.MMOItems; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.MMOItems; public class NoClipItem implements Listener { private final Item item; diff --git a/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java b/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java index ca052305..0fe6c64e 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java +++ b/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java @@ -3,18 +3,19 @@ package net.Indyuce.mmoitems.api.util; import java.text.DecimalFormat; import java.util.Random; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.stat.data.random.UpdatableRandomStatData; +import net.Indyuce.mmoitems.stat.data.type.Mergeable; +import net.Indyuce.mmoitems.stat.type.ItemStat; import org.apache.commons.lang.Validate; import org.bukkit.configuration.ConfigurationSection; -import org.jetbrains.annotations.NotNull; -import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; -import net.Indyuce.mmoitems.stat.data.random.UpdatableRandomStatData; -import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; -import net.Indyuce.mmoitems.stat.type.ItemStat; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * That Gaussian spread distribution thing that no one understands. diff --git a/src/main/java/net/Indyuce/mmoitems/api/util/TemplateMap.java b/src/main/java/net/Indyuce/mmoitems/api/util/TemplateMap.java index 0b466e9c..c0c9c8a9 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/util/TemplateMap.java +++ b/src/main/java/net/Indyuce/mmoitems/api/util/TemplateMap.java @@ -1,18 +1,12 @@ package net.Indyuce.mmoitems.api.util; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Set; -import java.util.function.Consumer; - +import net.Indyuce.mmoitems.api.Type; import org.apache.commons.lang.Validate; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import net.Indyuce.mmoitems.api.Type; +import java.util.*; +import java.util.function.Consumer; /** * Allows the use of two nested maps to efficiently store data about mmoitem diff --git a/src/main/java/net/Indyuce/mmoitems/comp/AdvancedEnchantmentsHook.java b/src/main/java/net/Indyuce/mmoitems/comp/AdvancedEnchantmentsHook.java index 461df103..90c218a9 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/AdvancedEnchantmentsHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/AdvancedEnchantmentsHook.java @@ -3,9 +3,9 @@ package net.Indyuce.mmoitems.comp; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +import n3kas.ae.api.EnchantApplyEvent; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.NBTItem; -import n3kas.ae.api.EnchantApplyEvent; public class AdvancedEnchantmentsHook implements Listener { @EventHandler diff --git a/src/main/java/net/Indyuce/mmoitems/comp/PhatLootsHook.java b/src/main/java/net/Indyuce/mmoitems/comp/PhatLootsHook.java index cf30c89a..cf38c216 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/PhatLootsHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/PhatLootsHook.java @@ -1,19 +1,22 @@ package net.Indyuce.mmoitems.comp; +import com.codisimus.plugins.phatloots.events.LootEvent; +import com.codisimus.plugins.phatloots.events.MobDropLootEvent; +import com.codisimus.plugins.phatloots.events.PhatLootsEvent; +import com.codisimus.plugins.phatloots.events.PlayerLootEvent; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import net.Indyuce.mmoitems.api.player.RPGPlayer; +import net.Indyuce.mmoitems.api.util.MMOItemReforger; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import com.codisimus.plugins.phatloots.events.LootEvent; -import com.codisimus.plugins.phatloots.events.MobDropLootEvent; -import com.codisimus.plugins.phatloots.events.PlayerLootEvent; - -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.api.util.ui.SilentNumbers; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.player.RPGPlayer; -import net.Indyuce.mmoitems.api.util.MMOItemReforger; +import java.util.ArrayList; /** * Its absolute pain that PhatLoots keeps giving outdated diff --git a/src/main/java/net/Indyuce/mmoitems/comp/RealDualWieldHook.java b/src/main/java/net/Indyuce/mmoitems/comp/RealDualWieldHook.java index ebec36a3..c4cedec9 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/RealDualWieldHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/RealDualWieldHook.java @@ -1,13 +1,6 @@ package net.Indyuce.mmoitems.comp; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; - import com.evill4mer.RealDualWield.Api.PlayerDamageEntityWithOffhandEvent; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.DamageType; import io.lumine.mythic.lib.api.item.NBTItem; @@ -16,6 +9,11 @@ import net.Indyuce.mmoitems.api.TypeSet; import net.Indyuce.mmoitems.api.interaction.weapon.Weapon; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; public class RealDualWieldHook implements Listener { @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) diff --git a/src/main/java/net/Indyuce/mmoitems/comp/WorldEditSupport.java b/src/main/java/net/Indyuce/mmoitems/comp/WorldEditSupport.java index b574c124..f2d50ca2 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/WorldEditSupport.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/WorldEditSupport.java @@ -8,7 +8,6 @@ import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; - import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.block.CustomBlock; import net.Indyuce.mmoitems.api.util.MushroomState; diff --git a/src/main/java/net/Indyuce/mmoitems/comp/inventory/OrnamentPlayerInventory.java b/src/main/java/net/Indyuce/mmoitems/comp/inventory/OrnamentPlayerInventory.java index fe56c0ba..b6c5ddbc 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/inventory/OrnamentPlayerInventory.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/inventory/OrnamentPlayerInventory.java @@ -12,13 +12,13 @@ import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.Type.EquipmentSlot; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.inventory.EquippedItem; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; /** * Tells MMOItems where to find additional equipment. diff --git a/src/main/java/net/Indyuce/mmoitems/comp/inventory/PlayerInventoryHandler.java b/src/main/java/net/Indyuce/mmoitems/comp/inventory/PlayerInventoryHandler.java index f6a0ad40..32088962 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/inventory/PlayerInventoryHandler.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/inventory/PlayerInventoryHandler.java @@ -1,14 +1,15 @@ package net.Indyuce.mmoitems.comp.inventory; -import java.util.ArrayList; -import java.util.List; - +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.player.inventory.EquippedItem; +import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import org.jetbrains.annotations.NotNull; -import net.Indyuce.mmoitems.api.player.inventory.EquippedItem; +import java.util.ArrayList; +import java.util.List; /** * Previously, only one Player Inventory was allowed. diff --git a/src/main/java/net/Indyuce/mmoitems/comp/inventory/RPGInventoryHook.java b/src/main/java/net/Indyuce/mmoitems/comp/inventory/RPGInventoryHook.java index 9729939c..dd53575f 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/inventory/RPGInventoryHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/inventory/RPGInventoryHook.java @@ -11,9 +11,12 @@ import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.inventory.ItemStack; import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.Type.EquipmentSlot; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.inventory.EquippedItem; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; import ru.endlesscode.rpginventory.api.InventoryAPI; /** diff --git a/src/main/java/net/Indyuce/mmoitems/comp/parse/IridescentParser.java b/src/main/java/net/Indyuce/mmoitems/comp/parse/IridescentParser.java index adcd33cc..b94c7635 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/parse/IridescentParser.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/parse/IridescentParser.java @@ -1,8 +1,9 @@ package net.Indyuce.mmoitems.comp.parse; -import com.github.klyser8.iridescent.api.ColorUtil; import org.bukkit.entity.Player; +import com.github.klyser8.iridescent.util.ColorUtil; + public class IridescentParser implements StringInputParser { @Override diff --git a/src/main/java/net/Indyuce/mmoitems/comp/parse/placeholders/PlaceholderAPIParser.java b/src/main/java/net/Indyuce/mmoitems/comp/parse/placeholders/PlaceholderAPIParser.java index 3a56bdf2..62282701 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/parse/placeholders/PlaceholderAPIParser.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/parse/placeholders/PlaceholderAPIParser.java @@ -2,8 +2,8 @@ package net.Indyuce.mmoitems.comp.parse.placeholders; import org.bukkit.OfflinePlayer; -import io.lumine.mythic.lib.MythicLib; import me.clip.placeholderapi.PlaceholderAPI; +import io.lumine.mythic.lib.MythicLib; public class PlaceholderAPIParser implements PlaceholderParser { public PlaceholderAPIParser() { diff --git a/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java b/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java deleted file mode 100644 index 7fe287a2..00000000 --- a/src/main/java/net/Indyuce/mmoitems/comp/rpg/AureliumSkillsHook.java +++ /dev/null @@ -1,73 +0,0 @@ -package net.Indyuce.mmoitems.comp.rpg; - -import org.bukkit.Bukkit; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; - -import com.archyx.aureliumskills.AureliumSkills; -import com.archyx.aureliumskills.api.event.SkillLevelUpEvent; - -import net.Indyuce.mmoitems.api.player.PlayerData; -import net.Indyuce.mmoitems.api.player.RPGPlayer; - -public class AureliumSkillsHook implements RPGHandler, Listener { - - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) - public void a(SkillLevelUpEvent event) { - PlayerData.get(event.getPlayer()).getInventory().scheduleUpdate(); - } - - @Override - public void refreshStats(PlayerData data) { -// com.archyx.aureliumskills.data.PlayerData info = ((SkillsPlayer) data.getRPG()).info; -// info.removeStatModifier("MMOItemsMana"); -// info.addStatModifier(new StatModifier("MMOItemsMana", Stats., 0)); - } - - @Override - public RPGPlayer getInfo(PlayerData data) { - return new SkillsPlayer(data); - } - - public static class SkillsPlayer extends RPGPlayer { - private final com.archyx.aureliumskills.data.PlayerData info; - - public SkillsPlayer(PlayerData playerData) { - super(playerData); - - AureliumSkills plugin = (AureliumSkills) Bukkit.getPluginManager().getPlugin("AureliumSkills"); - info = plugin.getPlayerManager().getPlayerData(playerData.getUniqueId()); - } - - @Override - public int getLevel() { - return info.getPowerLevel(); - } - - @Override - public String getClassName() { - return ""; - } - - @Override - public double getMana() { - return info.getMana(); - } - - @Override - public double getStamina() { - return getPlayer().getFoodLevel(); - } - - @Override - public void setMana(double value) { - info.setMana(value); - } - - @Override - public void setStamina(double value) { - getPlayer().setFoodLevel((int) value); - } - } -} \ No newline at end of file diff --git a/src/main/java/net/Indyuce/mmoitems/comp/rpg/HeroesHook.java b/src/main/java/net/Indyuce/mmoitems/comp/rpg/HeroesHook.java index 9b81e23e..0a38d29a 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/rpg/HeroesHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/rpg/HeroesHook.java @@ -1,20 +1,11 @@ package net.Indyuce.mmoitems.comp.rpg; -import java.util.HashMap; -import java.util.Map; -import java.util.stream.Collectors; - -import org.bukkit.entity.Entity; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; - import com.herocraftonline.heroes.Heroes; import com.herocraftonline.heroes.api.SkillUseInfo; import com.herocraftonline.heroes.api.events.ClassChangeEvent; import com.herocraftonline.heroes.api.events.HeroChangeLevelEvent; import com.herocraftonline.heroes.characters.Hero; import com.herocraftonline.heroes.characters.skill.SkillType; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.AttackResult; import io.lumine.mythic.lib.api.DamageHandler; @@ -23,6 +14,13 @@ import io.lumine.mythic.lib.api.RegisteredAttack; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.RPGPlayer; +import org.bukkit.entity.Entity; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; + +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; public class HeroesHook implements RPGHandler, Listener, DamageHandler { private final Map damages = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/comp/rpg/McMMOHook.java b/src/main/java/net/Indyuce/mmoitems/comp/rpg/McMMOHook.java index aa710e77..9b6d73ef 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/rpg/McMMOHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/rpg/McMMOHook.java @@ -1,5 +1,6 @@ package net.Indyuce.mmoitems.comp.rpg; +import net.Indyuce.mmoitems.MMOItems; import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/main/java/net/Indyuce/mmoitems/comp/rpg/RacesAndClassesHook.java b/src/main/java/net/Indyuce/mmoitems/comp/rpg/RacesAndClassesHook.java index 1ad59847..b3ffa1b0 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/rpg/RacesAndClassesHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/rpg/RacesAndClassesHook.java @@ -1,8 +1,5 @@ package net.Indyuce.mmoitems.comp.rpg; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; - import de.tobiyas.racesandclasses.eventprocessing.events.leveling.LevelDownEvent; import de.tobiyas.racesandclasses.eventprocessing.events.leveling.LevelUpEvent; import de.tobiyas.racesandclasses.playermanagement.player.RaCPlayer; @@ -10,6 +7,8 @@ import de.tobiyas.racesandclasses.playermanagement.player.RaCPlayerManager; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.RPGPlayer; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; public class RacesAndClassesHook implements RPGHandler, Listener { diff --git a/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillAPIHook.java b/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillAPIHook.java index c25f06f5..2d71e5a9 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillAPIHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillAPIHook.java @@ -1,8 +1,16 @@ package net.Indyuce.mmoitems.comp.rpg; -import java.util.HashMap; -import java.util.Map; - +import com.sucy.skill.SkillAPI; +import com.sucy.skill.api.event.PlayerLevelUpEvent; +import com.sucy.skill.api.event.SkillDamageEvent; +import com.sucy.skill.api.player.PlayerData; +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.api.player.RPGPlayer; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.AttackResult; +import io.lumine.mythic.lib.api.DamageHandler; +import io.lumine.mythic.lib.api.DamageType; +import io.lumine.mythic.lib.api.RegisteredAttack; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -10,18 +18,8 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageByEntityEvent; -import com.sucy.skill.SkillAPI; -import com.sucy.skill.api.event.PlayerLevelUpEvent; -import com.sucy.skill.api.event.SkillDamageEvent; -import com.sucy.skill.api.player.PlayerData; - -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.AttackResult; -import io.lumine.mythic.lib.api.DamageHandler; -import io.lumine.mythic.lib.api.DamageType; -import io.lumine.mythic.lib.api.RegisteredAttack; -import net.Indyuce.mmoitems.ItemStats; -import net.Indyuce.mmoitems.api.player.RPGPlayer; +import java.util.HashMap; +import java.util.Map; public class SkillAPIHook implements RPGHandler, Listener, DamageHandler { private final Map damageInfo = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillsProHook.java b/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillsProHook.java index 75d91fe3..b2308a73 100644 --- a/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillsProHook.java +++ b/src/main/java/net/Indyuce/mmoitems/comp/rpg/SkillsProHook.java @@ -4,12 +4,12 @@ import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.skills.api.events.SkillLevelUpEvent; -import org.skills.data.managers.SkilledPlayer; -import org.skills.main.SkillsPro; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.RPGPlayer; +import org.skills.api.events.SkillLevelUpEvent; +import org.skills.data.managers.SkilledPlayer; +import org.skills.main.SkillsPro; public class SkillsProHook implements RPGHandler, Listener { diff --git a/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationPreview.java b/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationPreview.java index 3baa3af9..01537d90 100644 --- a/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationPreview.java +++ b/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationPreview.java @@ -1,9 +1,17 @@ package net.Indyuce.mmoitems.gui; -import java.util.ArrayList; -import java.util.List; - +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.api.util.LegacyComponent; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import io.lumine.mythic.utils.adventure.text.Component; +import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.crafting.ingredient.Ingredient.CheckedIngredient; +import net.Indyuce.mmoitems.api.crafting.recipe.CheckedRecipe; +import net.Indyuce.mmoitems.api.crafting.recipe.CraftingRecipe; +import net.Indyuce.mmoitems.api.crafting.recipe.UpgradingRecipe; +import net.Indyuce.mmoitems.api.item.util.ConfigItems; +import net.Indyuce.mmoitems.api.util.message.Message; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -13,16 +21,8 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.api.util.LegacyComponent; -import net.Indyuce.mmoitems.MMOUtils; -import net.Indyuce.mmoitems.api.crafting.ingredient.Ingredient.CheckedIngredient; -import net.Indyuce.mmoitems.api.crafting.recipe.CheckedRecipe; -import net.Indyuce.mmoitems.api.crafting.recipe.CraftingRecipe; -import net.Indyuce.mmoitems.api.crafting.recipe.UpgradingRecipe; -import net.Indyuce.mmoitems.api.item.util.ConfigItems; -import net.Indyuce.mmoitems.api.util.message.Message; +import java.util.ArrayList; +import java.util.List; public class CraftingStationPreview extends PluginInventory { private final CraftingStationView previous; @@ -61,7 +61,7 @@ public class CraftingStationPreview extends PluginInventory { * Time to calculate the stacks and put through the crafting station space. */ int amount = ing.getIngredient().getAmount(); -// int stacks = SilentNumbers.floor(amount / 64D); + int stacks = SilentNumbers.floor(amount / 64D); // Add what must be added while (amount > 0) { diff --git a/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationView.java b/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationView.java index 2bef8bc6..b6d48ec5 100644 --- a/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationView.java +++ b/src/main/java/net/Indyuce/mmoitems/gui/CraftingStationView.java @@ -1,18 +1,5 @@ package net.Indyuce.mmoitems.gui; -import java.util.List; -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; -import org.bukkit.scheduler.BukkitRunnable; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.SmartGive; @@ -31,6 +18,18 @@ import net.Indyuce.mmoitems.api.event.PlayerUseCraftingStationEvent; import net.Indyuce.mmoitems.api.item.util.ConfigItems; import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.listener.CustomSoundListener; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.scheduler.BukkitRunnable; + +import java.util.List; +import java.util.UUID; public class CraftingStationView extends PluginInventory { private final CraftingStation station; diff --git a/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java b/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java index 5c115aa4..858d40c9 100644 --- a/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java +++ b/src/main/java/net/Indyuce/mmoitems/gui/ItemBrowser.java @@ -1,14 +1,18 @@ package net.Indyuce.mmoitems.gui; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - +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.api.util.LegacyComponent; import io.lumine.mythic.lib.version.VersionMaterial; import io.lumine.mythic.utils.adventure.text.Component; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.edition.NewItemEdition; +import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; +import net.Indyuce.mmoitems.gui.edition.ItemEdition; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -21,16 +25,11 @@ import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -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 net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.MMOUtils; -import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.api.edition.NewItemEdition; -import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; -import net.Indyuce.mmoitems.gui.edition.ItemEdition; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; public class ItemBrowser extends PluginInventory { private final Map cached = new LinkedHashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/gui/PluginInventory.java b/src/main/java/net/Indyuce/mmoitems/gui/PluginInventory.java index fb49ab2f..5be9c89e 100644 --- a/src/main/java/net/Indyuce/mmoitems/gui/PluginInventory.java +++ b/src/main/java/net/Indyuce/mmoitems/gui/PluginInventory.java @@ -1,14 +1,13 @@ package net.Indyuce.mmoitems.gui; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.player.PlayerData; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.player.PlayerData; - public abstract class PluginInventory implements InventoryHolder { protected final PlayerData playerData; protected final Player player; diff --git a/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java b/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java index 1918f3c8..48e71266 100644 --- a/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java +++ b/src/main/java/net/Indyuce/mmoitems/gui/edition/RevisionInventory.java @@ -1,10 +1,18 @@ package net.Indyuce.mmoitems.gui.edition; -import java.util.ArrayList; -import java.util.Arrays; - +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import io.lumine.mythic.lib.version.VersionMaterial; +import io.lumine.mythic.utils.items.ItemFactory; +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; +import net.Indyuce.mmoitems.api.util.MMOItemReforger; +import net.Indyuce.mmoitems.stat.RevisionID; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; @@ -13,15 +21,8 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.util.ui.SilentNumbers; -import io.lumine.mythic.lib.version.VersionMaterial; -import io.lumine.utils.items.ItemFactory; -import net.Indyuce.mmoitems.ItemStats; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.MMOUtils; -import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; -import net.Indyuce.mmoitems.api.util.MMOItemReforger; -import net.Indyuce.mmoitems.stat.RevisionID; +import java.util.ArrayList; +import java.util.Arrays; /** * Inventory displayed when enabling the item updater. diff --git a/src/main/java/net/Indyuce/mmoitems/listener/CraftingListener.java b/src/main/java/net/Indyuce/mmoitems/listener/CraftingListener.java index edd97d3b..5c4e5ebd 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/CraftingListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/CraftingListener.java @@ -1,13 +1,11 @@ package net.Indyuce.mmoitems.listener; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.UUID; - +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.event.CraftMMOItemEvent; +import net.Indyuce.mmoitems.api.player.PlayerData; +import net.Indyuce.mmoitems.api.recipe.workbench.CachedRecipe; +import net.Indyuce.mmoitems.api.recipe.workbench.CustomRecipe; +import net.Indyuce.mmoitems.api.recipe.workbench.ingredients.WorkbenchIngredient; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -19,12 +17,8 @@ import org.bukkit.event.inventory.PrepareItemCraftEvent; import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.ItemStack; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.event.CraftMMOItemEvent; -import net.Indyuce.mmoitems.api.player.PlayerData; -import net.Indyuce.mmoitems.api.recipe.workbench.CachedRecipe; -import net.Indyuce.mmoitems.api.recipe.workbench.CustomRecipe; -import net.Indyuce.mmoitems.api.recipe.workbench.ingredients.WorkbenchIngredient; +import java.util.*; +import java.util.Map.Entry; public class CraftingListener implements Listener { final Map cachedRecipe = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/listener/CustomBlockListener.java b/src/main/java/net/Indyuce/mmoitems/listener/CustomBlockListener.java index f2aadf46..78a3b9e8 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/CustomBlockListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/CustomBlockListener.java @@ -1,9 +1,9 @@ package net.Indyuce.mmoitems.listener; -import java.util.Optional; -import java.util.Random; -import java.util.logging.Level; - +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.block.CustomBlock; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Material; @@ -21,10 +21,9 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.block.CustomBlock; +import java.util.Optional; +import java.util.Random; +import java.util.logging.Level; public class CustomBlockListener implements Listener { diff --git a/src/main/java/net/Indyuce/mmoitems/listener/CustomSoundListener.java b/src/main/java/net/Indyuce/mmoitems/listener/CustomSoundListener.java index 015c57d9..0bf71039 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/CustomSoundListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/CustomSoundListener.java @@ -1,5 +1,7 @@ package net.Indyuce.mmoitems.listener; +import net.Indyuce.mmoitems.api.util.SoundReader; +import io.lumine.mythic.lib.api.item.NBTItem; import org.bukkit.Location; import org.bukkit.Sound; import org.bukkit.entity.EntityType; @@ -20,9 +22,6 @@ import org.bukkit.event.player.PlayerItemBreakEvent; import org.bukkit.event.player.PlayerItemConsumeEvent; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.api.util.SoundReader; - public class CustomSoundListener implements Listener { @EventHandler(priority = EventPriority.HIGH) public void a(EntityDamageByEntityEvent event) { diff --git a/src/main/java/net/Indyuce/mmoitems/listener/DisableInteractions.java b/src/main/java/net/Indyuce/mmoitems/listener/DisableInteractions.java index ce86c875..4544e31e 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/DisableInteractions.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/DisableInteractions.java @@ -1,5 +1,9 @@ package net.Indyuce.mmoitems.listener; +import net.Indyuce.mmoitems.MMOItems; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; +import net.Indyuce.mmoitems.api.interaction.util.DurabilityItem; import org.bukkit.Keyed; import org.bukkit.entity.ArmorStand; import org.bukkit.entity.LivingEntity; @@ -22,11 +26,6 @@ import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.interaction.util.DurabilityItem; - public class DisableInteractions implements Listener { // anvils diff --git a/src/main/java/net/Indyuce/mmoitems/listener/DurabilityListener.java b/src/main/java/net/Indyuce/mmoitems/listener/DurabilityListener.java index 96a74a13..3875dea8 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/DurabilityListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/DurabilityListener.java @@ -1,8 +1,6 @@ package net.Indyuce.mmoitems.listener; -import java.util.Arrays; -import java.util.List; - +import net.Indyuce.mmoitems.api.interaction.util.DurabilityItem; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.EntityType; @@ -20,7 +18,8 @@ import org.bukkit.event.player.PlayerItemMendEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; -import net.Indyuce.mmoitems.api.interaction.util.DurabilityItem; +import java.util.Arrays; +import java.util.List; public class DurabilityListener implements Listener { private final List ignoredCauses = Arrays.asList(DamageCause.DROWNING, DamageCause.SUICIDE, DamageCause.FALL, DamageCause.VOID, diff --git a/src/main/java/net/Indyuce/mmoitems/listener/EquipListener.java b/src/main/java/net/Indyuce/mmoitems/listener/EquipListener.java index c00fd13d..19d632af 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/EquipListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/EquipListener.java @@ -1,15 +1,14 @@ package net.Indyuce.mmoitems.listener; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.utils.Events; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.manager.Reloadable; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.utils.Events; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.manager.Reloadable; - public class EquipListener implements Reloadable, Listener { public EquipListener(){ this.reload(); diff --git a/src/main/java/net/Indyuce/mmoitems/listener/ItemListener.java b/src/main/java/net/Indyuce/mmoitems/listener/ItemListener.java index d4aa3564..f0f03cd8 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/ItemListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/ItemListener.java @@ -1,7 +1,15 @@ package net.Indyuce.mmoitems.listener; -import java.util.ArrayList; - +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ReforgeOptions; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; +import net.Indyuce.mmoitems.api.util.MMOItemReforger; +import io.lumine.mythic.lib.api.item.NBTItem; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.type.ItemStat; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -13,16 +21,11 @@ import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.Damageable; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.api.util.ui.SilentNumbers; -import net.Indyuce.mmoitems.ItemStats; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ReforgeOptions; -import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; -import net.Indyuce.mmoitems.api.util.MMOItemReforger; +import java.util.ArrayList; public class ItemListener implements Listener { @EventHandler(ignoreCancelled = true) diff --git a/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java b/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java index 1297ce6e..d22b2d76 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java @@ -1,30 +1,5 @@ package net.Indyuce.mmoitems.listener; -import java.text.DecimalFormat; - -import org.bukkit.ChatColor; -import org.bukkit.GameMode; -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.entity.Arrow; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.entity.EntityDamageByEntityEvent; -import org.bukkit.event.entity.EntityDamageEvent.DamageCause; -import org.bukkit.event.entity.EntityShootBowEvent; -import org.bukkit.event.inventory.InventoryAction; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.player.PlayerInteractEntityEvent; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.event.player.PlayerItemConsumeEvent; -import org.bukkit.inventory.EquipmentSlot; -import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.DamageType; import io.lumine.mythic.lib.api.item.NBTItem; @@ -47,6 +22,30 @@ import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; import net.Indyuce.mmoitems.api.player.inventory.EquippedItem; import net.Indyuce.mmoitems.api.util.message.Message; +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.entity.EntityShootBowEvent; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerItemConsumeEvent; +import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +import java.text.DecimalFormat; public class ItemUse implements Listener { private static final DecimalFormat DIGIT = new DecimalFormat("0.#"); diff --git a/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java b/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java index 422ebebb..20fe68b6 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java @@ -1,10 +1,21 @@ package net.Indyuce.mmoitems.listener; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.DamageType; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.utils.Schedulers; +import io.lumine.mythic.utils.events.extra.ArmorEquipEvent; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.ItemAttackResult; +import net.Indyuce.mmoitems.api.SoulboundInfo; +import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.ability.Ability.CastingMode; +import net.Indyuce.mmoitems.api.interaction.util.InteractItem; +import net.Indyuce.mmoitems.api.interaction.weapon.Weapon; +import net.Indyuce.mmoitems.api.player.PlayerData; +import net.Indyuce.mmoitems.api.player.RPGPlayer; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -22,21 +33,10 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.DamageType; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.utils.Schedulers; -import io.lumine.utils.events.extra.ArmorEquipEvent; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.MMOUtils; -import net.Indyuce.mmoitems.api.ItemAttackResult; -import net.Indyuce.mmoitems.api.SoulboundInfo; -import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.api.ability.Ability.CastingMode; -import net.Indyuce.mmoitems.api.interaction.util.InteractItem; -import net.Indyuce.mmoitems.api.interaction.weapon.Weapon; -import net.Indyuce.mmoitems.api.player.PlayerData; -import net.Indyuce.mmoitems.api.player.RPGPlayer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; public class PlayerListener implements Listener { private final Map> deathItems = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/BlockManager.java b/src/main/java/net/Indyuce/mmoitems/manager/BlockManager.java index bd155b41..d6f2c7ed 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/BlockManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/BlockManager.java @@ -1,19 +1,5 @@ package net.Indyuce.mmoitems.manager; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.logging.Level; - -import org.bukkit.Material; -import org.bukkit.block.BlockFace; -import org.bukkit.block.data.BlockData; -import org.bukkit.block.data.MultipleFacing; - import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; @@ -22,6 +8,19 @@ import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.api.util.MushroomState; import net.Indyuce.mmoitems.stat.data.DoubleData; +import org.bukkit.Material; +import org.bukkit.block.BlockFace; +import org.bukkit.block.data.BlockData; +import org.bukkit.block.data.MultipleFacing; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.logging.Level; public class BlockManager implements Reloadable { private final static List downIds = Arrays.asList(23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, diff --git a/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java b/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java index 7974e64f..e5334bf9 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java @@ -1,22 +1,5 @@ package net.Indyuce.mmoitems.manager; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.StandardCopyOption; -import java.text.DecimalFormat; -import java.util.Base64; -import java.util.Enumeration; -import java.util.List; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.logging.Level; - -import org.bukkit.Material; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.potion.PotionEffectType; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.MMOItems; @@ -32,6 +15,22 @@ import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.GemUpgradeScaling; import net.Indyuce.mmoitems.stat.LuteAttackEffectStat.LuteAttackEffect; import net.Indyuce.mmoitems.stat.StaffSpiritStat.StaffSpirit; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.potion.PotionEffectType; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.text.DecimalFormat; +import java.util.Base64; +import java.util.Enumeration; +import java.util.List; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.logging.Level; public class ConfigManager implements Reloadable { diff --git a/src/main/java/net/Indyuce/mmoitems/manager/CraftingManager.java b/src/main/java/net/Indyuce/mmoitems/manager/CraftingManager.java index f8733922..dd0515e6 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/CraftingManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/CraftingManager.java @@ -1,22 +1,6 @@ package net.Indyuce.mmoitems.manager; -import java.io.File; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.logging.Level; - -import org.bukkit.Bukkit; -import org.bukkit.configuration.file.YamlConfiguration; - import com.google.gson.JsonParser; - import io.lumine.mythic.lib.api.MMOLineConfig; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.AltChar; @@ -24,25 +8,21 @@ import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.ConfigFile; import net.Indyuce.mmoitems.api.crafting.ConditionalDisplay; import net.Indyuce.mmoitems.api.crafting.CraftingStation; -import net.Indyuce.mmoitems.api.crafting.condition.ClassCondition; -import net.Indyuce.mmoitems.api.crafting.condition.Condition; -import net.Indyuce.mmoitems.api.crafting.condition.FoodCondition; -import net.Indyuce.mmoitems.api.crafting.condition.LevelCondition; -import net.Indyuce.mmoitems.api.crafting.condition.ManaCondition; -import net.Indyuce.mmoitems.api.crafting.condition.PermissionCondition; -import net.Indyuce.mmoitems.api.crafting.condition.PlaceholderCondition; -import net.Indyuce.mmoitems.api.crafting.condition.StaminaCondition; +import net.Indyuce.mmoitems.api.crafting.condition.*; import net.Indyuce.mmoitems.api.crafting.ingredient.Ingredient; import net.Indyuce.mmoitems.api.crafting.ingredient.MMOItemIngredient; import net.Indyuce.mmoitems.api.crafting.ingredient.VanillaIngredient; -import net.Indyuce.mmoitems.api.crafting.trigger.CommandTrigger; -import net.Indyuce.mmoitems.api.crafting.trigger.MMOItemTrigger; -import net.Indyuce.mmoitems.api.crafting.trigger.MessageTrigger; -import net.Indyuce.mmoitems.api.crafting.trigger.SoundTrigger; -import net.Indyuce.mmoitems.api.crafting.trigger.Trigger; -import net.Indyuce.mmoitems.api.crafting.trigger.VanillaTrigger; +import net.Indyuce.mmoitems.api.crafting.trigger.*; import net.Indyuce.mmoitems.comp.mythicmobs.crafting.MythicItemIngredient; import net.Indyuce.mmoitems.comp.mythicmobs.crafting.MythicMobsSkillTrigger; +import org.bukkit.Bukkit; +import org.bukkit.configuration.file.YamlConfiguration; + +import java.io.File; +import java.util.*; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.logging.Level; public class CraftingManager implements Reloadable { diff --git a/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java b/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java index 641833ea..f989f3d4 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java @@ -1,11 +1,13 @@ package net.Indyuce.mmoitems.manager; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.logging.Level; - +import io.lumine.mythic.lib.UtilityMethods; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ConfigFile; +import net.Indyuce.mmoitems.api.block.CustomBlock; +import net.Indyuce.mmoitems.api.droptable.DropTable; +import net.Indyuce.mmoitems.api.event.CustomBlockDropEvent; +import net.Indyuce.mmoitems.api.player.PlayerData; +import net.Indyuce.mmoitems.listener.CustomBlockListener; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Material; @@ -22,14 +24,11 @@ import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.inventory.ItemStack; -import io.lumine.mythic.lib.UtilityMethods; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ConfigFile; -import net.Indyuce.mmoitems.api.block.CustomBlock; -import net.Indyuce.mmoitems.api.droptable.DropTable; -import net.Indyuce.mmoitems.api.event.CustomBlockDropEvent; -import net.Indyuce.mmoitems.api.player.PlayerData; -import net.Indyuce.mmoitems.listener.CustomBlockListener; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.logging.Level; public class DropTableManager implements Listener, Reloadable { private final Map monsters = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/EntityManager.java b/src/main/java/net/Indyuce/mmoitems/manager/EntityManager.java index e9374586..1fca941c 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/EntityManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/EntityManager.java @@ -1,9 +1,13 @@ package net.Indyuce.mmoitems.manager; -import java.util.HashMap; -import java.util.Map; -import java.util.WeakHashMap; - +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ArrowParticles; +import net.Indyuce.mmoitems.api.ItemAttackResult; +import net.Indyuce.mmoitems.api.ProjectileData; +import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; +import io.lumine.mythic.lib.api.DamageType; +import io.lumine.mythic.lib.api.item.NBTItem; import org.bukkit.Bukkit; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Arrow; @@ -16,14 +20,9 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDeathEvent; -import io.lumine.mythic.lib.api.DamageType; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.ItemStats; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ArrowParticles; -import net.Indyuce.mmoitems.api.ItemAttackResult; -import net.Indyuce.mmoitems.api.ProjectileData; -import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats; +import java.util.HashMap; +import java.util.Map; +import java.util.WeakHashMap; public class EntityManager implements Listener { diff --git a/src/main/java/net/Indyuce/mmoitems/manager/LayoutManager.java b/src/main/java/net/Indyuce/mmoitems/manager/LayoutManager.java index 78c2e098..96d9fb0d 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/LayoutManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/LayoutManager.java @@ -1,16 +1,15 @@ package net.Indyuce.mmoitems.manager; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.crafting.Layout; +import org.bukkit.configuration.file.YamlConfiguration; + import java.io.File; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; -import org.bukkit.configuration.file.YamlConfiguration; - -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.crafting.Layout; - public class LayoutManager implements Reloadable { private final Map layouts = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/LoreFormatManager.java b/src/main/java/net/Indyuce/mmoitems/manager/LoreFormatManager.java index 169f5a94..94b14cae 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/LoreFormatManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/LoreFormatManager.java @@ -1,5 +1,9 @@ package net.Indyuce.mmoitems.manager; +import net.Indyuce.mmoitems.MMOItems; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.file.YamlConfiguration; + import java.io.File; import java.util.Collection; import java.util.HashMap; @@ -7,11 +11,6 @@ import java.util.List; import java.util.Map; import java.util.logging.Level; -import org.apache.commons.lang.Validate; -import org.bukkit.configuration.file.YamlConfiguration; - -import net.Indyuce.mmoitems.MMOItems; - public class LoreFormatManager implements Reloadable { private final Map> formats = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/PluginUpdateManager.java b/src/main/java/net/Indyuce/mmoitems/manager/PluginUpdateManager.java index 10034249..db6c1306 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/PluginUpdateManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/PluginUpdateManager.java @@ -1,5 +1,15 @@ package net.Indyuce.mmoitems.manager; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ConfigFile; +import net.Indyuce.mmoitems.api.PluginUpdate; +import net.Indyuce.mmoitems.api.Type; +import net.md_5.bungee.api.ChatColor; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; + import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -10,17 +20,6 @@ import java.util.Map; import java.util.UUID; import java.util.logging.Level; -import org.apache.commons.lang.Validate; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; - -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ConfigFile; -import net.Indyuce.mmoitems.api.PluginUpdate; -import net.Indyuce.mmoitems.api.Type; -import net.md_5.bungee.api.ChatColor; - public class PluginUpdateManager { /** diff --git a/src/main/java/net/Indyuce/mmoitems/manager/RecipeManager.java b/src/main/java/net/Indyuce/mmoitems/manager/RecipeManager.java index a31bbbf3..0c89b297 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/RecipeManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/RecipeManager.java @@ -1,12 +1,15 @@ package net.Indyuce.mmoitems.manager; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; +import io.lumine.mythic.lib.api.crafting.recipes.MythicRecipeBlueprint; +import io.lumine.mythic.lib.api.crafting.recipes.MythicRecipeStation; +import io.lumine.mythic.lib.api.util.Ref; +import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; +import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; +import net.Indyuce.mmoitems.api.crafting.recipe.SmithingCombinationType; +import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.Keyed; @@ -23,18 +26,10 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.Recipe; import org.bukkit.inventory.RecipeChoice; import org.bukkit.inventory.SmokingRecipe; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.crafting.recipes.MythicRecipeBlueprint; -import io.lumine.mythic.lib.api.crafting.recipes.MythicRecipeStation; -import io.lumine.mythic.lib.api.util.Ref; -import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; -import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.api.crafting.recipe.SmithingCombinationType; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.api.recipe.workbench.CustomRecipe; @@ -42,8 +37,10 @@ import net.Indyuce.mmoitems.api.recipe.workbench.ingredients.AirIngredient; import net.Indyuce.mmoitems.api.recipe.workbench.ingredients.MMOItemIngredient; import net.Indyuce.mmoitems.api.recipe.workbench.ingredients.VanillaIngredient; import net.Indyuce.mmoitems.api.recipe.workbench.ingredients.WorkbenchIngredient; -import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; import net.Indyuce.mmoitems.stat.data.DoubleData; +import io.lumine.mythic.lib.MythicLib; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Manages the custom crafting of MMOItem components and stuff. diff --git a/src/main/java/net/Indyuce/mmoitems/manager/SetManager.java b/src/main/java/net/Indyuce/mmoitems/manager/SetManager.java index 0d851116..1180f098 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/SetManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/SetManager.java @@ -1,14 +1,14 @@ package net.Indyuce.mmoitems.manager; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ConfigFile; +import net.Indyuce.mmoitems.api.ItemSet; + import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ConfigFile; -import net.Indyuce.mmoitems.api.ItemSet; - public class SetManager implements Reloadable { private final Map itemSets = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java b/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java index 9ae93863..22cee064 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java @@ -12,13 +12,7 @@ import java.util.logging.Level; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.stat.type.AttributeStat; -import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; -import net.Indyuce.mmoitems.stat.type.DoubleStat; -import net.Indyuce.mmoitems.stat.type.GemStoneStat; -import net.Indyuce.mmoitems.stat.type.ItemRestriction; -import net.Indyuce.mmoitems.stat.type.ItemStat; -import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import net.Indyuce.mmoitems.stat.type.*; public class StatManager { private final Map stats = new LinkedHashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/TemplateManager.java b/src/main/java/net/Indyuce/mmoitems/manager/TemplateManager.java index 6c2e1069..e9b98515 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/TemplateManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/TemplateManager.java @@ -1,20 +1,5 @@ package net.Indyuce.mmoitems.manager; -import java.io.File; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.logging.Level; - -import org.apache.commons.lang.Validate; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import net.Indyuce.mmoitems.MMOItems; @@ -24,7 +9,17 @@ import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.api.item.template.TemplateModifier; import net.Indyuce.mmoitems.api.util.TemplateMap; +import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.io.File; +import java.util.*; +import java.util.logging.Level; public class TemplateManager implements Reloadable { diff --git a/src/main/java/net/Indyuce/mmoitems/manager/TierManager.java b/src/main/java/net/Indyuce/mmoitems/manager/TierManager.java index 168d4df2..2f5e5706 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/TierManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/TierManager.java @@ -1,17 +1,16 @@ package net.Indyuce.mmoitems.manager; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; - -import org.apache.commons.lang.Validate; - import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.ConfigFile; import net.Indyuce.mmoitems.api.ItemTier; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import org.apache.commons.lang.Validate; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; public class TierManager implements Reloadable{ private final Map tiers = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/TypeManager.java b/src/main/java/net/Indyuce/mmoitems/manager/TypeManager.java index 0900192d..36ffda85 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/TypeManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/TypeManager.java @@ -1,19 +1,15 @@ package net.Indyuce.mmoitems.manager; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.logging.Level; - -import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.Nullable; - import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.ConfigFile; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.manager.ConfigManager.DefaultFile; +import org.apache.commons.lang.Validate; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; +import java.util.logging.Level; public class TypeManager implements Reloadable { private final Map map = new LinkedHashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/UpdaterManager.java b/src/main/java/net/Indyuce/mmoitems/manager/UpdaterManager.java index a2a8646e..15db65cf 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/UpdaterManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/UpdaterManager.java @@ -1,12 +1,15 @@ package net.Indyuce.mmoitems.manager; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; - +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.LegacyComponent; import io.lumine.mythic.utils.adventure.text.Component; import io.lumine.mythic.utils.adventure.text.format.NamedTextColor; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; +import net.Indyuce.mmoitems.api.player.PlayerData; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -18,13 +21,9 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.Damageable; import org.bukkit.inventory.meta.ItemMeta; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.Type; -import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; -import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; -import net.Indyuce.mmoitems.api.player.PlayerData; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; public class UpdaterManager implements Listener { /*public UpdaterManager() { diff --git a/src/main/java/net/Indyuce/mmoitems/manager/UpgradeManager.java b/src/main/java/net/Indyuce/mmoitems/manager/UpgradeManager.java index b7c6b9a9..5c24def6 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/UpgradeManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/UpgradeManager.java @@ -1,15 +1,16 @@ package net.Indyuce.mmoitems.manager; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ConfigFile; +import net.Indyuce.mmoitems.api.UpgradeTemplate; import org.bukkit.configuration.file.FileConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import net.Indyuce.mmoitems.api.ConfigFile; -import net.Indyuce.mmoitems.api.UpgradeTemplate; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; public class UpgradeManager implements Reloadable { private final Map templates = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/manager/WorldGenManager.java b/src/main/java/net/Indyuce/mmoitems/manager/WorldGenManager.java index b0806c8a..d16d236e 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/WorldGenManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/WorldGenManager.java @@ -1,10 +1,9 @@ package net.Indyuce.mmoitems.manager; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.logging.Level; - +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ConfigFile; +import net.Indyuce.mmoitems.api.block.CustomBlock; +import net.Indyuce.mmoitems.api.block.WorldGenTemplate; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -15,10 +14,10 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.world.ChunkLoadEvent; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ConfigFile; -import net.Indyuce.mmoitems.api.block.CustomBlock; -import net.Indyuce.mmoitems.api.block.WorldGenTemplate; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +import java.util.logging.Level; public class WorldGenManager implements Listener, Reloadable { private final Map templates = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Abilities.java b/src/main/java/net/Indyuce/mmoitems/stat/Abilities.java index 5d149f55..3a51a5bc 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Abilities.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Abilities.java @@ -5,23 +5,15 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import com.google.gson.*; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -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 net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.ability.Ability; @@ -39,6 +31,10 @@ import net.Indyuce.mmoitems.stat.data.random.RandomAbilityListData; 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.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class Abilities extends ItemStat { private final DecimalFormat modifierFormat = new DecimalFormat("0.#"); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Amphibian.java b/src/main/java/net/Indyuce/mmoitems/stat/Amphibian.java index 5fcf7156..acd1aca5 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Amphibian.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Amphibian.java @@ -1,42 +1,44 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; - -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.util.BoundingBox; -import org.jetbrains.annotations.NotNull; - 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.ui.SilentNumbers; +import io.lumine.mythic.lib.version.VersionMaterial; +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.player.RPGPlayer; 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.stat.type.ItemRestriction; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.util.BoundingBox; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; /** * @author Gunging */ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneStat { public static final String - NORMAL = "UNRESTRICTED", - DRY = "DRY", - WET = "WET", - DAMP = "DAMP", - LAVA = "LAVA", - MOLTEN = "MOLTEN", - LIQUID = "LIQUID", - SUBMERGED = "SUBMERGED"; + NORMAL = "UNRESTRICTED", + DRY = "DRY", + WET = "WET", + DAMP = "DAMP", + LAVA = "LAVA", + MOLTEN = "MOLTEN", + LIQUID = "LIQUID", + SUBMERGED = "SUBMERGED"; public Amphibian() { - super("AMPHIBIAN", Material.WATER_BUCKET, "Amphibian", new String[]{"May this item only be used in specific", "environments regarding liquids?"}, new String[]{"!block", "all"}); + super("AMPHIBIAN", Material.WATER_BUCKET, "Amphibian", new String[] { "May this item only be used in specific", "environments regarding liquids?" }, new String[] { "!block", "all" }); // Create the list ArrayList amphibianStuff = new ArrayList<>(); @@ -61,24 +63,17 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt } @NotNull - @Override - public StatData getClearStatData() { - return new StringData(NORMAL); - } + @Override public StatData getClearStatData() { return new StringData(NORMAL); } @Override public boolean canUse(RPGPlayer player, NBTItem item, boolean message) { // bruh - if (!item.hasTag(getNBTPath())) { - return true; - } + if (!item.hasTag(getNBTPath())) { return true; } // Find the relevant tags ArrayList relevantTags = new ArrayList<>(); - if (item.hasTag(getNBTPath())) { - relevantTags.add(ItemTag.getTagAtPath(getNBTPath(), item, SupportedNBTTagValues.STRING)); - } + if (item.hasTag(getNBTPath())) { relevantTags.add(ItemTag.getTagAtPath(getNBTPath(), item, SupportedNBTTagValues.STRING)); } // Generate data StringData data = (StringData) getLoadedNBT(relevantTags); @@ -98,9 +93,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (b.isLiquid()) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); - return false; - } - } + return false; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); return true; case WET: @@ -108,9 +101,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (b.getType().equals(Material.WATER)) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); - return true; - } - } + return true; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); return false; case DAMP: @@ -118,9 +109,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (!b.getType().equals(Material.WATER)) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); - return false; - } - } + return false; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); return true; case LAVA: @@ -128,9 +117,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (b.getType().equals(Material.LAVA)) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); - return true; - } - } + return true; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); return false; case MOLTEN: @@ -138,9 +125,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (!b.getType().equals(Material.LAVA)) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); - return false; - } - } + return false; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); return true; case LIQUID: @@ -148,9 +133,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (b.isLiquid()) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); - return true; - } - } + return true; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); return false; case SUBMERGED: @@ -158,9 +141,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt //BKK//MMOItems. Log(" \u00a77>\u00a77>\u00a73>\u00a77 Examining \u00a7f" + b.getType().toString()); if (!b.isLiquid()) { //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7cFail"); - return false; - } - } + return false; } } //BKK//MMOItems. Log(" \u00a7a>\u00a73>\u00a7a> \u00a7aSucceed"); return true; } @@ -169,9 +150,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt } @Override - public boolean isDynamic() { - return true; - } + public boolean isDynamic() { return true; } // Yes ArrayList blocksTouchedByPlayer(@NotNull Player p) { @@ -188,9 +167,9 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt for (double dz = box.getMinZ(); dz <= box.getMaxZ(); dz += Math.min(1, Math.max(box.getWidthZ() - (dz - box.getMinZ()), 0.001))) { // Exclusion - int dxI = SilentNumbers.floor(dx); - int dyI = SilentNumbers.floor(dy); - int dzI = SilentNumbers.floor(dz); + int dxI =SilentNumbers.floor(dx); + int dyI =SilentNumbers.floor(dy); + int dzI =SilentNumbers.floor(dz); //BKK//MMOItems. Log(" \u00a77at \u00a76" + dxI + " " + dyI + " " + dzI + "\u00a78 (" + dx + " " + dy + " " + dz + ")"); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Armor.java b/src/main/java/net/Indyuce/mmoitems/stat/Armor.java index 375dcac6..e4f87f87 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Armor.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Armor.java @@ -1,9 +1,14 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.attribute.Attribute; - -import io.lumine.mythic.lib.version.VersionMaterial; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.bukkit.attribute.Attribute; +import org.jetbrains.annotations.NotNull; public class Armor extends AttributeStat { public Armor() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ArmorToughness.java b/src/main/java/net/Indyuce/mmoitems/stat/ArmorToughness.java index c7275339..329e7775 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ArmorToughness.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ArmorToughness.java @@ -1,10 +1,14 @@ package net.Indyuce.mmoitems.stat; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; import org.bukkit.Material; import org.bukkit.attribute.Attribute; -import net.Indyuce.mmoitems.stat.type.AttributeStat; - public class ArmorToughness extends AttributeStat { public ArmorToughness() { super("ARMOR_TOUGHNESS", Material.DIAMOND_CHESTPLATE, "Armor Toughness", diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java b/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java index 3b908722..3fae5d6a 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ArrowParticles.java @@ -4,22 +4,19 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Particle; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Item; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonObject; import com.google.gson.JsonParser; 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.MMOUtils; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -31,6 +28,11 @@ import net.Indyuce.mmoitems.stat.data.ParticleData; 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.item.ItemTag; +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 ArrowParticles extends ItemStat { public ArrowParticles() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java b/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java index 7ee10841..a0319af4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ArrowPotionEffects.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -14,17 +15,11 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.potion.PotionEffectType; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -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.api.util.AltChar; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -39,6 +34,11 @@ import net.Indyuce.mmoitems.stat.data.random.RandomPotionEffectListData; 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.MythicLib; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class ArrowPotionEffects extends ItemStat { private final DecimalFormat durationFormat = new DecimalFormat("0.#"); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/AttackDamage.java b/src/main/java/net/Indyuce/mmoitems/stat/AttackDamage.java index add49e3b..cbc165a3 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/AttackDamage.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/AttackDamage.java @@ -1,10 +1,14 @@ package net.Indyuce.mmoitems.stat; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; import org.bukkit.Material; import org.bukkit.attribute.Attribute; -import net.Indyuce.mmoitems.stat.type.AttributeStat; - public class AttackDamage extends AttributeStat { public AttackDamage() { super("ATTACK_DAMAGE", Material.IRON_SWORD, "Attack Damage", new String[] { "The amount of damage", "your weapon deals." }, diff --git a/src/main/java/net/Indyuce/mmoitems/stat/AttackSpeed.java b/src/main/java/net/Indyuce/mmoitems/stat/AttackSpeed.java index ffa7b8ce..aac12447 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/AttackSpeed.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/AttackSpeed.java @@ -1,9 +1,13 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.attribute.Attribute; - -import io.lumine.mythic.lib.version.VersionMaterial; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.bukkit.attribute.Attribute; public class AttackSpeed extends AttributeStat { public AttackSpeed() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CanDeconstruct.java b/src/main/java/net/Indyuce/mmoitems/stat/CanDeconstruct.java index 22e763da..a355a6c2 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CanDeconstruct.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CanDeconstruct.java @@ -9,9 +9,7 @@ import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.ItemTier; @@ -22,6 +20,8 @@ import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.type.BooleanStat; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; +import io.lumine.mythic.lib.api.item.NBTItem; +import org.jetbrains.annotations.NotNull; public class CanDeconstruct extends BooleanStat implements ConsumableItemInteraction { public CanDeconstruct() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CanDeskin.java b/src/main/java/net/Indyuce/mmoitems/stat/CanDeskin.java index 607de4b4..650f4da4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CanDeskin.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CanDeskin.java @@ -10,14 +10,9 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.Damageable; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; -import org.jetbrains.annotations.NotNull; import com.google.gson.JsonObject; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.api.util.SmartGive; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -31,6 +26,11 @@ import net.Indyuce.mmoitems.stat.data.ParticleData; import net.Indyuce.mmoitems.stat.data.SkullTextureData; import net.Indyuce.mmoitems.stat.type.BooleanStat; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.api.util.SmartGive; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.jetbrains.annotations.NotNull; public class CanDeskin extends BooleanStat implements ConsumableItemInteraction { public CanDeskin() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CanIdentify.java b/src/main/java/net/Indyuce/mmoitems/stat/CanIdentify.java index 8150be1f..1ad24870 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CanIdentify.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CanIdentify.java @@ -6,9 +6,7 @@ import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.event.item.IdentifyItemEvent; @@ -18,6 +16,8 @@ import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.type.BooleanStat; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; +import io.lumine.mythic.lib.api.item.NBTItem; +import org.jetbrains.annotations.NotNull; public class CanIdentify extends BooleanStat implements ConsumableItemInteraction { public CanIdentify() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CanUnsocket.java b/src/main/java/net/Indyuce/mmoitems/stat/CanUnsocket.java index 3c7e4e37..01503dcc 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CanUnsocket.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CanUnsocket.java @@ -1,17 +1,12 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; - import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.ItemTier; import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.event.item.DeconstructItemEvent; import net.Indyuce.mmoitems.api.interaction.Consumable; import net.Indyuce.mmoitems.api.item.mmoitem.LiveMMOItem; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; @@ -21,6 +16,17 @@ import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.data.GemSocketsData; import net.Indyuce.mmoitems.stat.type.BooleanStat; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.List; /** * This item will be able to be used on other items, and diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Commands.java b/src/main/java/net/Indyuce/mmoitems/stat/Commands.java index 1e656fa7..7fd1bc26 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Commands.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Commands.java @@ -1,26 +1,11 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import org.apache.commons.lang.Validate; -import org.bukkit.ChatColor; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import com.google.gson.JsonSyntaxException; - +import com.google.gson.*; 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.MMOUtils; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -32,6 +17,16 @@ import net.Indyuce.mmoitems.stat.data.CommandListData; 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.apache.commons.lang.Validate; +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +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; public class Commands extends ItemStat { private static final int max = 15; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java b/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java index 62d83e9e..80933175 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CompatibleIds.java @@ -1,24 +1,9 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import org.apache.commons.lang.Validate; -import org.bukkit.ChatColor; -import org.bukkit.event.inventory.InventoryAction; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import com.google.gson.JsonArray; import com.google.gson.JsonParser; 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; @@ -29,6 +14,19 @@ 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.ItemStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.apache.commons.lang.Validate; +import org.bukkit.ChatColor; +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; public class CompatibleIds extends ItemStat { public CompatibleIds() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java b/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java index 87a26b51..823ec835 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CompatibleTypes.java @@ -4,21 +4,16 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import com.google.gson.JsonSyntaxException; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonArray; import com.google.gson.JsonParser; -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; @@ -29,6 +24,11 @@ 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.ItemStat; +import io.lumine.mythic.lib.api.item.ItemTag; +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 CompatibleTypes extends ItemStat { public CompatibleTypes() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java b/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java index b57e5d4b..f65beddd 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Crafting.java @@ -4,26 +4,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.ItemTag; +import net.Indyuce.mmoitems.stat.data.StringData; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.util.AltChar; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; 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.RecipeListEdition; -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 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 { public Crafting() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java b/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java index 5eb09ab2..b3564b07 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CraftingPermission.java @@ -1,16 +1,16 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - +import io.lumine.mythic.lib.api.item.ItemTag; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem; +import net.Indyuce.mmoitems.stat.data.StringData; +import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.version.VersionMaterial; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -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.stat.data.type.StatData; -import net.Indyuce.mmoitems.stat.type.StringStat; +import java.util.ArrayList; public class CraftingPermission extends StringStat { public CraftingPermission() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CustomModelData.java b/src/main/java/net/Indyuce/mmoitems/stat/CustomModelData.java index 3fc79e25..00a714b1 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CustomModelData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CustomModelData.java @@ -1,21 +1,24 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -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.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem; +import net.Indyuce.mmoitems.api.util.NumericStatFormula; +import net.Indyuce.mmoitems.api.util.StatFormat; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.GemStoneStat; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class CustomModelData extends DoubleStat implements GemStoneStat { public CustomModelData() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/CustomSounds.java b/src/main/java/net/Indyuce/mmoitems/stat/CustomSounds.java index 2c3fc6b2..56553969 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/CustomSounds.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/CustomSounds.java @@ -4,6 +4,9 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; +import net.Indyuce.mmoitems.stat.type.SelfConsumable; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -12,19 +15,13 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; -import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.CustomSound; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem; -import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.gui.edition.SoundsEdition; import net.Indyuce.mmoitems.stat.data.SoundData; @@ -33,7 +30,10 @@ import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.ItemStat; -import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class CustomSounds extends ItemStat implements GemStoneStat, SelfConsumable { public CustomSounds() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/DisableDeathDrop.java b/src/main/java/net/Indyuce/mmoitems/stat/DisableDeathDrop.java index 1a5f09aa..b2d10066 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/DisableDeathDrop.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/DisableDeathDrop.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.BooleanStat; +import org.bukkit.Material; public class DisableDeathDrop extends BooleanStat { public DisableDeathDrop() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java b/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java index 2d109ba6..5f944418 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/DisplayName.java @@ -1,11 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.ChatColor; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; @@ -14,12 +8,19 @@ import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.ItemTier; 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.StringData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.NameData; import net.Indyuce.mmoitems.stat.type.StatHistory; import net.Indyuce.mmoitems.stat.type.StringStat; +import org.bukkit.ChatColor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class DisplayName extends StringStat implements GemStoneStat { private final String[] cleanFilter = {ChatColor.BOLD.toString(), ChatColor.ITALIC.toString(), ChatColor.UNDERLINE.toString(), ChatColor.STRIKETHROUGH.toString(), ChatColor.MAGIC.toString()}; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java b/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java index a14def32..101c1109 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/DurabilityBar.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.BooleanStat; +import org.bukkit.Material; public class DurabilityBar extends BooleanStat { public DurabilityBar() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java b/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java index fbcd9609..79a49c5b 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/DyeColor.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.ItemTag; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Color; @@ -12,12 +13,7 @@ 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 org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -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; @@ -28,6 +24,10 @@ 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; public class DyeColor extends ItemStat { public DyeColor() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Effects.java b/src/main/java/net/Indyuce/mmoitems/stat/Effects.java index c7c8d8c1..0383bd9e 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Effects.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Effects.java @@ -7,6 +7,12 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import com.google.gson.*; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; +import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; +import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; +import net.Indyuce.mmoitems.stat.type.SelfConsumable; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -15,28 +21,14 @@ import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.potion.PotionEffectType; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -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.api.util.ui.FriendlyFeedbackProvider; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; 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.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.api.util.NumericStatFormula; -import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.PotionEffectData; import net.Indyuce.mmoitems.stat.data.PotionEffectListData; @@ -45,7 +37,10 @@ import net.Indyuce.mmoitems.stat.data.random.RandomPotionEffectListData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.ItemStat; -import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class Effects extends ItemStat implements SelfConsumable { private final DecimalFormat durationFormat = new DecimalFormat("0.#"); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Elements.java b/src/main/java/net/Indyuce/mmoitems/stat/Elements.java index cf443af0..17231b77 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Elements.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Elements.java @@ -1,19 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; - -import org.apache.commons.lang.Validate; -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 io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import io.lumine.mythic.lib.api.util.AltChar; @@ -24,8 +10,10 @@ import net.Indyuce.mmoitems.api.Element; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem; import net.Indyuce.mmoitems.api.util.NumericStatFormula; +import net.Indyuce.mmoitems.api.util.StatFormat; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.gui.edition.ElementsEdition; +import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.ElementListData; import net.Indyuce.mmoitems.stat.data.random.RandomElementListData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; @@ -33,6 +21,19 @@ import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.ItemStat; import net.Indyuce.mmoitems.stat.type.Previewable; +import org.apache.commons.lang.Validate; +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.HashMap; +import java.util.List; +import java.util.Optional; public class Elements extends ItemStat implements Previewable { public Elements() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Enchants.java b/src/main/java/net/Indyuce/mmoitems/stat/Enchants.java index 7056e2e7..577d1ec0 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Enchants.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Enchants.java @@ -1,23 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; -import java.util.Set; - -import org.apache.commons.lang.Validate; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.NamespacedKey; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.event.inventory.InventoryAction; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import io.lumine.mythic.lib.api.util.AltChar; @@ -25,6 +7,7 @@ import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import io.lumine.mythic.lib.api.util.ui.PlusMinusPercent; import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import io.lumine.mythicenchants.MythicEnchants; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -43,6 +26,23 @@ import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; import net.Indyuce.mmoitems.stat.type.ItemStat; import net.Indyuce.mmoitems.stat.type.StatHistory; import net.Indyuce.mmoitems.stat.type.Upgradable; +import org.apache.commons.lang.Validate; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.enchantments.Enchantment; +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.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; +import java.util.Set; public class Enchants extends ItemStat implements Upgradable { public Enchants() { @@ -425,10 +425,9 @@ public class Enchants extends ItemStat implements Upgradable { if (enchant == null) { if (MMOItems.plugin.getMythicEnchantsSupport() != null) { -// Object enchants = MythicEnchants.inst(); -// enchant = Enchantment.getByKey(new NamespacedKey((Plugin) MythicEnchants.inst(), key)); -// if (enchant != null) -// return enchant; + enchant = Enchantment.getByKey(new NamespacedKey(MythicEnchants.inst(), key)); + if (enchant != null) + return enchant; } enchant = Enchantment.getByName(key); } diff --git a/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java b/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java index 34bc159e..386e62be 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/GemColor.java @@ -1,12 +1,11 @@ package net.Indyuce.mmoitems.stat; -import org.jetbrains.annotations.NotNull; - -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.jetbrains.annotations.NotNull; public class GemColor extends StringStat { public GemColor() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/GemSockets.java b/src/main/java/net/Indyuce/mmoitems/stat/GemSockets.java index bc270654..979d2a74 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/GemSockets.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/GemSockets.java @@ -4,22 +4,18 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; 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; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParser; 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 net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.edition.StatEdition; @@ -31,6 +27,10 @@ import net.Indyuce.mmoitems.stat.data.GemstoneData; 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.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class GemSockets extends ItemStat { public GemSockets() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java b/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java index 6b81fd3d..f78b364b 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/GemUpgradeScaling.java @@ -1,16 +1,16 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; - -import org.jetbrains.annotations.NotNull; - -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 io.lumine.mythic.lib.version.VersionMaterial; +import org.bukkit.Material; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; /** * Defines how gem stats will scale when the item they are put on upgrades. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/GrantedPermissions.java b/src/main/java/net/Indyuce/mmoitems/stat/GrantedPermissions.java index 4b7af6b0..72561ffb 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/GrantedPermissions.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/GrantedPermissions.java @@ -9,18 +9,25 @@ 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; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.util.AltChar; +import com.google.gson.JsonArray; +import com.google.gson.JsonParser; + 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.StringListData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.StringListStat; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; public class GrantedPermissions extends StringListStat implements GemStoneStat { public GrantedPermissions() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java b/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java index 10e20d20..a8698348 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/HideDye.java @@ -1,20 +1,19 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.bukkit.inventory.ItemFlag; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - 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; import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.BooleanStat; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.bukkit.Material; +import org.bukkit.inventory.ItemFlag; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class HideDye extends BooleanStat { public HideDye() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/HideEnchants.java b/src/main/java/net/Indyuce/mmoitems/stat/HideEnchants.java index 51803f9a..e98f8232 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/HideEnchants.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/HideEnchants.java @@ -1,12 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.bukkit.inventory.ItemFlag; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -14,6 +7,12 @@ 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; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class HideEnchants extends BooleanStat { public HideEnchants() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java b/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java index 4db3e3f1..99d3cec4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/HidePotionEffects.java @@ -1,12 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.bukkit.inventory.ItemFlag; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -14,6 +7,12 @@ 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; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class HidePotionEffects extends BooleanStat { public HidePotionEffects() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/InternalRevisionID.java b/src/main/java/net/Indyuce/mmoitems/stat/InternalRevisionID.java index ca34adff..2b0ea33f 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/InternalRevisionID.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/InternalRevisionID.java @@ -1,19 +1,19 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; 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.api.util.StatFormat; 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 org.bukkit.Material; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class InternalRevisionID extends InternalStat { public InternalRevisionID() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ItemDamage.java b/src/main/java/net/Indyuce/mmoitems/stat/ItemDamage.java index 13ff24e1..2bfe8cfb 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ItemDamage.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ItemDamage.java @@ -1,21 +1,24 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.bukkit.inventory.meta.Damageable; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; 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.api.util.NumericStatFormula; +import net.Indyuce.mmoitems.api.util.StatFormat; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.GemStoneStat; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.inventory.meta.Damageable; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class ItemDamage extends DoubleStat implements GemStoneStat { public ItemDamage() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java b/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java index 71b3d0cf..7175fc90 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ItemLevel.java @@ -1,18 +1,17 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; -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.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 org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class ItemLevel extends InternalStat { public ItemLevel() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java b/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java index 34b6af25..6cb4ccf2 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ItemParticles.java @@ -4,21 +4,18 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Particle; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonParser; 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.MMOUtils; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -30,6 +27,11 @@ import net.Indyuce.mmoitems.stat.data.ParticleData; 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.item.ItemTag; +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 ItemParticles extends ItemStat { public ItemParticles() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ItemSetStat.java b/src/main/java/net/Indyuce/mmoitems/stat/ItemSetStat.java index bcdf3823..c2f99f8a 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ItemSetStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ItemSetStat.java @@ -1,7 +1,14 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.ItemSet; +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.StringData; +import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.api.item.ItemTag; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -9,13 +16,7 @@ import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.ItemSet; -import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; -import net.Indyuce.mmoitems.gui.edition.EditionInventory; -import net.Indyuce.mmoitems.stat.data.type.StatData; -import net.Indyuce.mmoitems.stat.type.StringStat; +import java.util.ArrayList; public class ItemSetStat extends StringStat { public ItemSetStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ItemTierStat.java b/src/main/java/net/Indyuce/mmoitems/stat/ItemTierStat.java index 526e3c10..ca25cd0d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ItemTierStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ItemTierStat.java @@ -2,15 +2,15 @@ package net.Indyuce.mmoitems.stat; import org.apache.commons.lang.Validate; import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.ItemTier; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class ItemTierStat extends StringStat { public ItemTierStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ItemTypeRestriction.java b/src/main/java/net/Indyuce/mmoitems/stat/ItemTypeRestriction.java index 5babb4b4..69ef82c5 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ItemTypeRestriction.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ItemTypeRestriction.java @@ -4,30 +4,31 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem; +import net.Indyuce.mmoitems.stat.data.StringData; 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; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; -import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.TypeSet; 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.StringData; 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.StringStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class ItemTypeRestriction extends StringStat { public ItemTypeRestriction() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/KnockbackResistance.java b/src/main/java/net/Indyuce/mmoitems/stat/KnockbackResistance.java index 9da9e589..5525b176 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/KnockbackResistance.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/KnockbackResistance.java @@ -3,7 +3,12 @@ package net.Indyuce.mmoitems.stat; import org.bukkit.Material; import org.bukkit.attribute.Attribute; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; public class KnockbackResistance extends AttributeStat { public KnockbackResistance() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Lore.java b/src/main/java/net/Indyuce/mmoitems/stat/Lore.java index af380f44..0a061e86 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Lore.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Lore.java @@ -8,19 +8,27 @@ import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.util.AltChar; -import io.lumine.mythic.lib.version.VersionMaterial; +import com.google.gson.JsonArray; +import com.google.gson.JsonParser; + 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.StringListData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.StringListStat; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.ItemTag; +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 Lore extends StringListStat implements GemStoneStat { public Lore() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/LoreFormat.java b/src/main/java/net/Indyuce/mmoitems/stat/LoreFormat.java index d670703b..aab68748 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/LoreFormat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/LoreFormat.java @@ -2,14 +2,14 @@ package net.Indyuce.mmoitems.stat; import org.apache.commons.lang.Validate; import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class LoreFormat extends StringStat { public LoreFormat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/LostWhenBroken.java b/src/main/java/net/Indyuce/mmoitems/stat/LostWhenBroken.java index 27ea7759..d59ae6dd 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/LostWhenBroken.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/LostWhenBroken.java @@ -1,13 +1,13 @@ package net.Indyuce.mmoitems.stat; import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.BooleanStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class LostWhenBroken extends BooleanStat { public LostWhenBroken() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java b/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java index cac29d2a..642054b3 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackEffectStat.java @@ -1,24 +1,18 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.event.inventory.InventoryAction; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; - 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.BruteLuteAttack; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.lute.CircularLuteAttack; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.lute.LuteAttackHandler; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.lute.SimpleLuteAttack; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.lute.SlashLuteAttack; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.lute.WaveLuteAttack; +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.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.jetbrains.annotations.NotNull; public class LuteAttackEffectStat extends StringStat { public LuteAttackEffectStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java b/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java index c34594a7..b2643616 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/LuteAttackSoundStat.java @@ -1,12 +1,11 @@ package net.Indyuce.mmoitems.stat; -import org.jetbrains.annotations.NotNull; - -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.jetbrains.annotations.NotNull; public class LuteAttackSoundStat extends StringStat { public LuteAttackSoundStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java b/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java index 4efd675d..2aefe5d9 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/MaterialStat.java @@ -1,15 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import org.apache.commons.lang.Validate; -import org.bukkit.Material; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.util.AltChar; import io.lumine.mythic.lib.api.util.EnumUtils; @@ -29,6 +19,15 @@ import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent.Action; import net.md_5.bungee.api.chat.ComponentBuilder; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +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; public class MaterialStat extends ItemStat { public MaterialStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/MaxHealth.java b/src/main/java/net/Indyuce/mmoitems/stat/MaxHealth.java index fe49f87b..a263a6b2 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/MaxHealth.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/MaxHealth.java @@ -3,7 +3,12 @@ package net.Indyuce.mmoitems.stat; import org.bukkit.Material; import org.bukkit.attribute.Attribute; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; public class MaxHealth extends AttributeStat { public MaxHealth() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/MaximumDurability.java b/src/main/java/net/Indyuce/mmoitems/stat/MaximumDurability.java index 35df4625..8f935199 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/MaximumDurability.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/MaximumDurability.java @@ -1,29 +1,29 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - +import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import net.Indyuce.mmoitems.stat.data.MaterialData; +import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; +import net.Indyuce.mmoitems.stat.type.Upgradable; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Sound; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; -import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.player.RPGPlayer; import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.data.DoubleData; -import net.Indyuce.mmoitems.stat.data.MaterialData; -import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; -import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; import net.Indyuce.mmoitems.stat.type.DoubleStat; -import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.ItemRestriction; -import net.Indyuce.mmoitems.stat.type.Upgradable; +import net.Indyuce.mmoitems.stat.type.GemStoneStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.item.NBTItem; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class MaximumDurability extends DoubleStat implements ItemRestriction, GemStoneStat, Upgradable { public MaximumDurability() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/MovementSpeed.java b/src/main/java/net/Indyuce/mmoitems/stat/MovementSpeed.java index 291407e7..1ae9be8d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/MovementSpeed.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/MovementSpeed.java @@ -3,7 +3,12 @@ package net.Indyuce.mmoitems.stat; import org.bukkit.Material; import org.bukkit.attribute.Attribute; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.AttributeStat; +import io.lumine.mythic.lib.api.item.ItemTag; public class MovementSpeed extends AttributeStat { public MovementSpeed() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/NBTTags.java b/src/main/java/net/Indyuce/mmoitems/stat/NBTTags.java index d4147154..cb243e97 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/NBTTags.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/NBTTags.java @@ -9,20 +9,23 @@ 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; import com.google.gson.JsonArray; +import com.google.gson.JsonParser; -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.StringListData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringListStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; public class NBTTags extends StringListStat { public NBTTags() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/PermanentEffects.java b/src/main/java/net/Indyuce/mmoitems/stat/PermanentEffects.java index 10614c8f..8f2dd1f4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/PermanentEffects.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/PermanentEffects.java @@ -5,6 +5,8 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import com.google.gson.JsonSyntaxException; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -12,17 +14,11 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.potion.PotionEffectType; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -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 net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -38,6 +34,10 @@ import net.Indyuce.mmoitems.stat.data.random.RandomPotionEffectListData; 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.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * This class has not been updated for the item generation update!!! The potion diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Permission.java b/src/main/java/net/Indyuce/mmoitems/stat/Permission.java index 44509ffc..5ba5efb9 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Permission.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Permission.java @@ -1,18 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; - -import org.apache.commons.lang.Validate; -import org.bukkit.ChatColor; -import org.bukkit.Sound; -import org.bukkit.event.inventory.InventoryAction; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; @@ -31,6 +18,18 @@ 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.Sound; +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.Arrays; +import java.util.List; +import java.util.Optional; public class Permission extends StringListStat implements ItemRestriction { public Permission() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/PickaxePower.java b/src/main/java/net/Indyuce/mmoitems/stat/PickaxePower.java index da25252c..13b7aac8 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/PickaxePower.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/PickaxePower.java @@ -1,18 +1,18 @@ package net.Indyuce.mmoitems.stat; -import org.apache.commons.lang.Validate; -import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; - -import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.util.ui.SilentNumbers; -import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.api.util.StatFormat; -import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; + +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class PickaxePower extends DoubleStat { public PickaxePower() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/PotionColor.java b/src/main/java/net/Indyuce/mmoitems/stat/PotionColor.java index 90f6af64..1b64718e 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/PotionColor.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/PotionColor.java @@ -9,9 +9,7 @@ import org.bukkit.Material; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.meta.PotionMeta; -import org.jetbrains.annotations.NotNull; -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; @@ -21,6 +19,8 @@ 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.StringStat; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; public class PotionColor extends StringStat { public PotionColor() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java b/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java index 5c8234f0..fedce509 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/PotionEffects.java @@ -5,6 +5,8 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -13,12 +15,7 @@ import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.meta.PotionMeta; import org.bukkit.potion.PotionEffectType; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; -import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -35,6 +32,9 @@ import net.Indyuce.mmoitems.stat.data.random.RandomPotionEffectListData; 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 org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class PotionEffects extends ItemStat { public PotionEffects() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java b/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java index a2deb81b..8ff7f6ce 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ProjectileParticles.java @@ -1,21 +1,8 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import org.apache.commons.lang.Validate; -import org.bukkit.ChatColor; -import org.bukkit.Particle; -import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.event.inventory.InventoryAction; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; - import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; @@ -31,6 +18,17 @@ import net.Indyuce.mmoitems.stat.data.ProjectileParticlesData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import org.apache.commons.lang.Validate; +import org.bukkit.ChatColor; +import org.bukkit.Particle; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; /** * Projectile Particles are the particles fired in place of a projectile for certain weapons such as the Lute, Musket, or Whip [WIP] diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RandomUnsocket.java b/src/main/java/net/Indyuce/mmoitems/stat/RandomUnsocket.java index 3e5443c1..f4d1266d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RandomUnsocket.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RandomUnsocket.java @@ -1,22 +1,13 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; -import java.util.logging.Level; - -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; - import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; +import net.Indyuce.mmoitems.api.ItemTier; import net.Indyuce.mmoitems.api.Type; +import net.Indyuce.mmoitems.api.event.item.DeconstructItemEvent; import net.Indyuce.mmoitems.api.interaction.Consumable; import net.Indyuce.mmoitems.api.item.mmoitem.LiveMMOItem; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; @@ -28,6 +19,18 @@ import net.Indyuce.mmoitems.stat.data.GemSocketsData; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.StatHistory; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; /** * When used on an item with Gem Sockets Data, it will diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RepairPower.java b/src/main/java/net/Indyuce/mmoitems/stat/RepairPower.java index 8b392848..06ef178f 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RepairPower.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RepairPower.java @@ -1,5 +1,6 @@ package net.Indyuce.mmoitems.stat; +import net.Indyuce.mmoitems.listener.CustomSoundListener; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -8,9 +9,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.meta.Damageable; import org.bukkit.inventory.meta.ItemMeta; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.Type; @@ -19,9 +18,10 @@ import net.Indyuce.mmoitems.api.interaction.Consumable; import net.Indyuce.mmoitems.api.interaction.util.DurabilityItem; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.api.util.message.Message; -import net.Indyuce.mmoitems.listener.CustomSoundListener; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import io.lumine.mythic.lib.api.item.NBTItem; +import org.jetbrains.annotations.NotNull; public class RepairPower extends DoubleStat implements ConsumableItemInteraction { public RepairPower() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RepairPowerPercent.java b/src/main/java/net/Indyuce/mmoitems/stat/RepairPowerPercent.java index 37a401be..30bd264c 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RepairPowerPercent.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RepairPowerPercent.java @@ -1,16 +1,5 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.inventory.meta.Damageable; -import org.bukkit.inventory.meta.ItemMeta; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOUtils; @@ -23,6 +12,16 @@ import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.listener.CustomSoundListener; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.meta.Damageable; +import org.bukkit.inventory.meta.ItemMeta; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class RepairPowerPercent extends DoubleStat implements ConsumableItemInteraction { public RepairPowerPercent() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RepairType.java b/src/main/java/net/Indyuce/mmoitems/stat/RepairType.java index 760a3bef..e1e6638d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RepairType.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RepairType.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.StringStat; +import org.bukkit.Material; public class RepairType extends StringStat { public RepairType() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RequiredBiomes.java b/src/main/java/net/Indyuce/mmoitems/stat/RequiredBiomes.java index 054c648d..4ec579e5 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RequiredBiomes.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RequiredBiomes.java @@ -1,17 +1,18 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; - 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 net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.player.RPGPlayer; import net.Indyuce.mmoitems.stat.data.StringListData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.ItemRestriction; import net.Indyuce.mmoitems.stat.type.StringListStat; +import org.bukkit.Material; + +import java.util.ArrayList; /** * @author Gunging diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RequiredClass.java b/src/main/java/net/Indyuce/mmoitems/stat/RequiredClass.java index 4b6372b2..1ebe2c6a 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RequiredClass.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RequiredClass.java @@ -5,20 +5,16 @@ import java.util.List; import java.util.Optional; import java.util.regex.Pattern; +import com.google.gson.JsonArray; +import com.google.gson.JsonParser; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import net.Indyuce.mmoitems.ItemStats; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Sound; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -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; @@ -32,6 +28,12 @@ import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.ItemRestriction; import net.Indyuce.mmoitems.stat.type.StringListStat; +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 org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class RequiredClass extends StringListStat implements ItemRestriction, GemStoneStat { public RequiredClass() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RequiredLevel.java b/src/main/java/net/Indyuce/mmoitems/stat/RequiredLevel.java index 3d15c81b..e1589c60 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RequiredLevel.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RequiredLevel.java @@ -1,16 +1,9 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.apache.commons.lang.Validate; -import org.bukkit.ChatColor; -import org.bukkit.Sound; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - 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.ui.PlusMinusPercent; import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; @@ -18,14 +11,23 @@ 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.NumericStatFormula; +import net.Indyuce.mmoitems.api.util.StatFormat; import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.RequiredLevelData; import net.Indyuce.mmoitems.stat.data.random.RandomRequiredLevelData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; +import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.ItemRestriction; +import org.apache.commons.lang.Validate; +import org.bukkit.ChatColor; +import org.bukkit.Sound; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class RequiredLevel extends DoubleStat implements ItemRestriction { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RestoreFood.java b/src/main/java/net/Indyuce/mmoitems/stat/RestoreFood.java index 57136439..222376e0 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RestoreFood.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RestoreFood.java @@ -1,8 +1,5 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; @@ -11,6 +8,8 @@ import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; /** * When a consumable is eaten, restores health. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RestoreHealth.java b/src/main/java/net/Indyuce/mmoitems/stat/RestoreHealth.java index bf7cd7ba..d62af4e8 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RestoreHealth.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RestoreHealth.java @@ -1,8 +1,6 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - +import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOUtils; @@ -10,6 +8,9 @@ import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; /** * When a consumable is eaten, restores health. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RestoreMana.java b/src/main/java/net/Indyuce/mmoitems/stat/RestoreMana.java index 11bb17e4..142879e0 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RestoreMana.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RestoreMana.java @@ -1,15 +1,16 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - +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.MMOUtils; import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; /** * When a consumable is eaten, restores health. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RestoreSaturation.java b/src/main/java/net/Indyuce/mmoitems/stat/RestoreSaturation.java index 26d9f09e..2b35bcb2 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RestoreSaturation.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RestoreSaturation.java @@ -1,16 +1,16 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - 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.MMOUtils; import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; /** * When a consumable is eaten, restores health. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RestoreStamina.java b/src/main/java/net/Indyuce/mmoitems/stat/RestoreStamina.java index 4449bc31..ce34f1bf 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RestoreStamina.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RestoreStamina.java @@ -1,15 +1,15 @@ package net.Indyuce.mmoitems.stat; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.type.DoubleStat; import net.Indyuce.mmoitems.stat.type.SelfConsumable; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; /** * When a consumable is eaten, restores health. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/RevisionID.java b/src/main/java/net/Indyuce/mmoitems/stat/RevisionID.java index 8d00734f..4cb4ba3f 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/RevisionID.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/RevisionID.java @@ -4,26 +4,28 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import net.Indyuce.mmoitems.api.util.MMOItemReforger; +import net.Indyuce.mmoitems.gui.edition.AbilityListEdition; +import net.Indyuce.mmoitems.gui.edition.RevisionInventory; +import net.Indyuce.mmoitems.stat.type.GemStoneStat; 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; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; -import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.api.item.mmoitem.ReadMMOItem; -import net.Indyuce.mmoitems.api.util.MMOItemReforger; import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.gui.edition.EditionInventory; -import net.Indyuce.mmoitems.gui.edition.RevisionInventory; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; -import net.Indyuce.mmoitems.stat.type.GemStoneStat; import net.Indyuce.mmoitems.stat.type.ItemStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Regarding the auto updating of items diff --git a/src/main/java/net/Indyuce/mmoitems/stat/ShieldPatternStat.java b/src/main/java/net/Indyuce/mmoitems/stat/ShieldPatternStat.java index 9e68d158..830250cf 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/ShieldPatternStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/ShieldPatternStat.java @@ -5,6 +5,8 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import io.lumine.mythic.lib.api.item.ItemTag; +import net.Indyuce.mmoitems.stat.data.BooleanData; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.DyeColor; @@ -17,11 +19,7 @@ import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.meta.BlockStateMeta; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -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.MMOUtils; @@ -33,6 +31,9 @@ import net.Indyuce.mmoitems.stat.data.ShieldPatternData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class ShieldPatternStat extends StringStat { public ShieldPatternStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/SkullTextureStat.java b/src/main/java/net/Indyuce/mmoitems/stat/SkullTextureStat.java index 3b63fdcf..cab46faa 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/SkullTextureStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/SkullTextureStat.java @@ -1,28 +1,27 @@ package net.Indyuce.mmoitems.stat; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.UUID; - -import org.apache.commons.lang.Validate; -import org.bukkit.configuration.ConfigurationSection; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; - import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; 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.BooleanData; import net.Indyuce.mmoitems.stat.data.SkullTextureData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.ConfigurationSection; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.UUID; public class SkullTextureStat extends StringStat { public SkullTextureStat() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingBreakChance.java b/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingBreakChance.java index 4359f3ea..ecd41df0 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingBreakChance.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingBreakChance.java @@ -7,10 +7,7 @@ import org.bukkit.ChatColor; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.Type; @@ -24,6 +21,9 @@ import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.data.SoulboundData; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.jetbrains.annotations.NotNull; public class SoulbindingBreakChance extends DoubleStat implements ConsumableItemInteraction { private static final Random random = new Random(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingChance.java b/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingChance.java index 1914643b..9b891b4d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingChance.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/SoulbindingChance.java @@ -7,10 +7,7 @@ import org.bukkit.ChatColor; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.Type; @@ -24,6 +21,9 @@ import net.Indyuce.mmoitems.api.util.message.Message; import net.Indyuce.mmoitems.stat.data.SoulboundData; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.jetbrains.annotations.NotNull; public class SoulbindingChance extends DoubleStat implements ConsumableItemInteraction { private static final Random random = new Random(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Soulbound.java b/src/main/java/net/Indyuce/mmoitems/stat/Soulbound.java index 9e33a3c3..5e29828c 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Soulbound.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Soulbound.java @@ -4,18 +4,13 @@ import java.util.ArrayList; import java.util.UUID; import java.util.regex.Pattern; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; import org.bukkit.ChatColor; import org.bukkit.Sound; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; -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.VersionMaterial; import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -27,6 +22,11 @@ import net.Indyuce.mmoitems.stat.data.SoulboundData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.InternalStat; import net.Indyuce.mmoitems.stat.type.ItemRestriction; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class Soulbound extends InternalStat implements ItemRestriction { public Soulbound() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java b/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java index 579b457c..f99b0aef 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/SoulboundLevel.java @@ -1,15 +1,17 @@ package net.Indyuce.mmoitems.stat; -import org.jetbrains.annotations.NotNull; - -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.version.VersionMaterial; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.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.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.version.VersionMaterial; +import org.apache.commons.lang.Validate; +import org.jetbrains.annotations.NotNull; public class SoulboundLevel extends DoubleStat { public SoulboundLevel() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/StaffSpiritStat.java b/src/main/java/net/Indyuce/mmoitems/stat/StaffSpiritStat.java index b0c72608..115631ec 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/StaffSpiritStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/StaffSpiritStat.java @@ -1,23 +1,15 @@ package net.Indyuce.mmoitems.stat; -import org.jetbrains.annotations.NotNull; - 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.interaction.weapon.untargeted.staff.LightningSpirit; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.ManaSpirit; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.NetherSpirit; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.StaffAttackHandler; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.SunfireSpirit; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.ThunderSpirit; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.VoidSpirit; -import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.XRaySpirit; +import net.Indyuce.mmoitems.api.interaction.weapon.untargeted.staff.*; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.StringStat; +import org.jetbrains.annotations.NotNull; public class StaffSpiritStat extends StringStat { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java b/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java index 2469ec2f..1fb98371 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/StoredTags.java @@ -1,12 +1,5 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -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; @@ -14,6 +7,12 @@ import net.Indyuce.mmoitems.stat.data.StoredTagsData; import net.Indyuce.mmoitems.stat.data.type.StatData; 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 org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class StoredTags extends InternalStat implements GemStoneStat { public StoredTags() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Unbreakable.java b/src/main/java/net/Indyuce/mmoitems/stat/Unbreakable.java index 5bef57ac..904502da 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Unbreakable.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Unbreakable.java @@ -1,19 +1,18 @@ package net.Indyuce.mmoitems.stat; -import java.util.ArrayList; - -import org.bukkit.Material; -import org.bukkit.inventory.ItemFlag; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -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; import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.BooleanStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.bukkit.Material; +import org.bukkit.inventory.ItemFlag; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; public class Unbreakable extends BooleanStat { public Unbreakable() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/Unstackable.java b/src/main/java/net/Indyuce/mmoitems/stat/Unstackable.java index 3254e3ee..747ae063 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/Unstackable.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/Unstackable.java @@ -3,13 +3,13 @@ package net.Indyuce.mmoitems.stat; import java.util.UUID; import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.BooleanStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class Unstackable extends BooleanStat { public Unstackable() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java b/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java index 4094e051..dfae2d9d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java @@ -5,6 +5,10 @@ import java.util.List; import java.util.Optional; import java.util.Random; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import net.Indyuce.mmoitems.stat.type.StatHistory; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -14,16 +18,9 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonParser; -import com.google.gson.JsonSyntaxException; -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 net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; @@ -45,6 +42,11 @@ import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.ConsumableItemInteraction; import net.Indyuce.mmoitems.stat.type.ItemStat; +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 org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class UpgradeStat extends ItemStat implements ConsumableItemInteraction { private static final Random random = new Random(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/VanillaEatingAnimation.java b/src/main/java/net/Indyuce/mmoitems/stat/VanillaEatingAnimation.java index a7c2507e..fb1e8c4c 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/VanillaEatingAnimation.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/VanillaEatingAnimation.java @@ -1,13 +1,13 @@ package net.Indyuce.mmoitems.stat; import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.BooleanStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class VanillaEatingAnimation extends BooleanStat { public VanillaEatingAnimation() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/block/BlockID.java b/src/main/java/net/Indyuce/mmoitems/stat/block/BlockID.java index b35f0870..2c6eb686 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/block/BlockID.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/block/BlockID.java @@ -1,14 +1,17 @@ package net.Indyuce.mmoitems.stat.block; -import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; - -import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.NumericStatFormula; +import net.Indyuce.mmoitems.api.util.StatFormat; import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.DoubleStat; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.jetbrains.annotations.NotNull; public class BlockID extends DoubleStat { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/block/GenTemplate.java b/src/main/java/net/Indyuce/mmoitems/stat/block/GenTemplate.java index ebecd203..02cdba69 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/block/GenTemplate.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/block/GenTemplate.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat.block; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.StringStat; +import org.bukkit.Material; public class GenTemplate extends StringStat { public GenTemplate() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/block/MaxXP.java b/src/main/java/net/Indyuce/mmoitems/stat/block/MaxXP.java index 3773f932..e2e4150d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/block/MaxXP.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/block/MaxXP.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat.block; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.DoubleStat; +import org.bukkit.Material; public class MaxXP extends DoubleStat { public MaxXP() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/block/MinXP.java b/src/main/java/net/Indyuce/mmoitems/stat/block/MinXP.java index 9d05d316..8e09f610 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/block/MinXP.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/block/MinXP.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat.block; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.DoubleStat; +import org.bukkit.Material; public class MinXP extends DoubleStat { public MinXP() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/block/RequiredPower.java b/src/main/java/net/Indyuce/mmoitems/stat/block/RequiredPower.java index 0cdde4d4..5795f43f 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/block/RequiredPower.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/block/RequiredPower.java @@ -1,8 +1,7 @@ package net.Indyuce.mmoitems.stat.block; -import org.bukkit.Material; - import net.Indyuce.mmoitems.stat.type.DoubleStat; +import org.bukkit.Material; public class RequiredPower extends DoubleStat { public RequiredPower() { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/AbilityListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/AbilityListData.java index bdf46b6f..26c77bba 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/AbilityListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/AbilityListData.java @@ -4,11 +4,12 @@ import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class AbilityListData implements StatData, Mergeable { @NotNull private final Set abilities = new LinkedHashSet<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/CommandListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/CommandListData.java index 80e4edda..5cd2d8e4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/CommandListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/CommandListData.java @@ -4,13 +4,14 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class CommandListData implements StatData, Mergeable, RandomStatData { @NotNull private final Set commands; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/DoubleData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/DoubleData.java index 94db5188..c3f45981 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/DoubleData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/DoubleData.java @@ -1,10 +1,10 @@ package net.Indyuce.mmoitems.stat.data; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class DoubleData implements StatData, Mergeable { private double value; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/ElementListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/ElementListData.java index 63b2314d..7f3affc4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/ElementListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/ElementListData.java @@ -5,11 +5,11 @@ import java.util.Map; import java.util.Set; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.api.Element; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class ElementListData implements StatData, Mergeable { @NotNull private final Map damage = new HashMap<>(), defense = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/EnchantListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/EnchantListData.java index b82666e0..29785cbf 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/EnchantListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/EnchantListData.java @@ -4,16 +4,17 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.commons.lang.Validate; -import org.bukkit.Material; -import org.bukkit.enchantments.Enchantment; -import org.jetbrains.annotations.NotNull; - import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; + import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class EnchantListData implements StatData, Mergeable { private final Map enchants = new HashMap<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/GemSocketsData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/GemSocketsData.java index 634df000..ade41c00 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/GemSocketsData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/GemSocketsData.java @@ -1,24 +1,23 @@ package net.Indyuce.mmoitems.stat.data; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; +import java.util.*; +import io.lumine.mythic.lib.api.util.Ref; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import net.Indyuce.mmoitems.api.interaction.GemStone; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import com.google.gson.JsonArray; import com.google.gson.JsonObject; -import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class GemSocketsData implements StatData, Mergeable, RandomStatData { @NotNull private final Set gems = new HashSet<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/GemstoneData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/GemstoneData.java index 35a2d2d6..49cf6ab5 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/GemstoneData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/GemstoneData.java @@ -1,24 +1,21 @@ package net.Indyuce.mmoitems.stat.data; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import com.google.gson.JsonElement; import com.google.gson.JsonObject; - import net.Indyuce.mmoitems.ItemStats; +import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.item.mmoitem.LiveMMOItem; +import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.stat.GemUpgradeScaling; +import net.Indyuce.mmoitems.stat.data.type.Mergeable; +import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.type.ItemStat; +import net.Indyuce.mmoitems.stat.type.StatHistory; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; @SuppressWarnings("unused") public class GemstoneData { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/PotionEffectListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/PotionEffectListData.java index 50202720..e93c0bf8 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/PotionEffectListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/PotionEffectListData.java @@ -5,10 +5,10 @@ import java.util.Arrays; import java.util.List; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class PotionEffectListData implements StatData, Mergeable { private final List effects = new ArrayList<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java index 04111e97..aa33bf92 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/ProjectileParticlesData.java @@ -1,5 +1,9 @@ package net.Indyuce.mmoitems.stat.data; +import com.google.gson.JsonObject; +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 org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Material; @@ -8,12 +12,6 @@ import org.bukkit.block.data.BlockData; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import com.google.gson.JsonObject; - -import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; -import net.Indyuce.mmoitems.stat.data.random.RandomStatData; -import net.Indyuce.mmoitems.stat.data.type.StatData; - public class ProjectileParticlesData implements StatData, RandomStatData { private final Particle particle; private final int red, green, blue; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/RequiredLevelData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/RequiredLevelData.java index c694a1cc..f2a5ced0 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/RequiredLevelData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/RequiredLevelData.java @@ -1,10 +1,9 @@ package net.Indyuce.mmoitems.stat.data; -import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; - import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.apache.commons.lang.Validate; +import org.jetbrains.annotations.NotNull; public class RequiredLevelData extends DoubleData { public RequiredLevelData(double value) { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/RestoreData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/RestoreData.java index ce7447a8..a24f4f3c 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/RestoreData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/RestoreData.java @@ -1,10 +1,10 @@ package net.Indyuce.mmoitems.stat.data; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class RestoreData implements StatData, Mergeable { private double health, food, saturation; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/SoundListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/SoundListData.java index b4bf0cf3..f4b584d4 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/SoundListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/SoundListData.java @@ -5,14 +5,14 @@ import java.util.Map; import java.util.Set; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import net.Indyuce.mmoitems.api.CustomSound; import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class SoundListData implements StatData, Mergeable, RandomStatData { private final Map sounds; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/StoredTagsData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/StoredTagsData.java index 7cab0a13..667c6520 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/StoredTagsData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/StoredTagsData.java @@ -1,18 +1,19 @@ package net.Indyuce.mmoitems.stat.data; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.stat.StoredTags; +import net.Indyuce.mmoitems.stat.data.type.Mergeable; +import net.Indyuce.mmoitems.stat.data.type.StatData; import org.apache.commons.lang.Validate; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.NBTItem; -import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; -import net.Indyuce.mmoitems.stat.data.type.Mergeable; -import net.Indyuce.mmoitems.stat.data.type.StatData; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; public class StoredTagsData implements StatData, Mergeable { private final List tags = new ArrayList<>(); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/StringListData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/StringListData.java index c817ae8d..b179dd0d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/StringListData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/StringListData.java @@ -4,16 +4,16 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; import com.google.gson.JsonArray; -import io.lumine.mythic.lib.api.util.ui.SilentNumbers; import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; public class StringListData implements StatData, RandomStatData, Mergeable { @NotNull private final List list; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/data/UpgradeData.java b/src/main/java/net/Indyuce/mmoitems/stat/data/UpgradeData.java index 0d60058b..a9aa5422 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/data/UpgradeData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/data/UpgradeData.java @@ -1,17 +1,15 @@ package net.Indyuce.mmoitems.stat.data; -import org.bukkit.configuration.ConfigurationSection; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import com.google.gson.JsonObject; - import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.UpgradeTemplate; import net.Indyuce.mmoitems.api.item.build.MMOItemBuilder; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.bukkit.configuration.ConfigurationSection; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * A class containing the Upgrading stuff of an item. Things like: diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java index 361a7c16..db95a49a 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java @@ -1,7 +1,12 @@ package net.Indyuce.mmoitems.stat.type; +import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; +import net.Indyuce.mmoitems.api.util.StatFormat; +import net.Indyuce.mmoitems.stat.data.DoubleData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import org.bukkit.Material; import org.bukkit.attribute.Attribute; +import org.jetbrains.annotations.NotNull; /** * Attribute stats are also collected when registered in the StatManager because diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/BooleanStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/BooleanStat.java index ac894d72..b9a2042f 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/BooleanStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/BooleanStat.java @@ -5,17 +5,14 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; +import net.Indyuce.mmoitems.stat.data.DoubleData; 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; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; -import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; -import io.lumine.mythic.lib.api.util.AltChar; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOUtils; import net.Indyuce.mmoitems.api.edition.StatEdition; @@ -26,6 +23,10 @@ import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.random.RandomBooleanData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class BooleanStat extends ItemStat { private static final DecimalFormat digit = new DecimalFormat("0.#"); diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/ChooseStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/ChooseStat.java index 8279fdfb..2f423209 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/ChooseStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/ChooseStat.java @@ -1,10 +1,16 @@ package net.Indyuce.mmoitems.stat.type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; - +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +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.stat.data.StringData; +import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import net.Indyuce.mmoitems.stat.data.type.StatData; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -12,11 +18,10 @@ import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.util.AltChar; -import io.lumine.mythic.lib.api.util.ui.SilentNumbers; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.gui.edition.EditionInventory; -import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; /** * Choose Stats present a list of options from which the user may choose one. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/ConsumableItemInteraction.java b/src/main/java/net/Indyuce/mmoitems/stat/type/ConsumableItemInteraction.java index 43af8dab..9c7699f8 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/ConsumableItemInteraction.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/ConsumableItemInteraction.java @@ -1,13 +1,13 @@ package net.Indyuce.mmoitems.stat.type; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.interaction.Consumable; import net.Indyuce.mmoitems.api.player.PlayerData; +import io.lumine.mythic.lib.api.item.NBTItem; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Stats which implement a consumable action like deconstructing, identifying, diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/DisableStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/DisableStat.java index a7b9adb5..a8f2cf5d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/DisableStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/DisableStat.java @@ -1,12 +1,12 @@ package net.Indyuce.mmoitems.stat.type; import org.bukkit.Material; -import org.jetbrains.annotations.NotNull; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.BooleanData; import net.Indyuce.mmoitems.stat.data.type.StatData; +import io.lumine.mythic.lib.api.item.ItemTag; +import org.jetbrains.annotations.NotNull; public class DisableStat extends BooleanStat { public DisableStat(String id, Material material, String name, String... lore) { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/DoubleStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/DoubleStat.java index 545f6d31..eb04d2a1 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/DoubleStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/DoubleStat.java @@ -1,21 +1,5 @@ package net.Indyuce.mmoitems.stat.type; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.regex.Pattern; - -import org.apache.commons.lang.Validate; -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 io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; @@ -38,6 +22,21 @@ import net.Indyuce.mmoitems.stat.data.DoubleData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; +import org.apache.commons.lang.Validate; +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.text.DecimalFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.regex.Pattern; public class DoubleStat extends ItemStat implements Upgradable, Previewable { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/InternalStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/InternalStat.java index b2f992fc..a38c64ce 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/InternalStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/InternalStat.java @@ -5,10 +5,10 @@ import java.util.Optional; import org.bukkit.Material; import org.bukkit.event.inventory.InventoryClickEvent; -import org.jetbrains.annotations.NotNull; import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; +import org.jetbrains.annotations.NotNull; public abstract class InternalStat extends ItemStat { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/ItemRestriction.java b/src/main/java/net/Indyuce/mmoitems/stat/type/ItemRestriction.java index 1a56d440..48f8e13d 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/ItemRestriction.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/ItemRestriction.java @@ -1,7 +1,7 @@ package net.Indyuce.mmoitems.stat.type; -import io.lumine.mythic.lib.api.item.NBTItem; import net.Indyuce.mmoitems.api.player.RPGPlayer; +import io.lumine.mythic.lib.api.item.NBTItem; /** * Stats which implement an item restriction. They are automatically collected diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/ItemStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/ItemStat.java index 3bdb08fa..bf491fbe 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/ItemStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/ItemStat.java @@ -5,13 +5,11 @@ import java.util.Arrays; import java.util.List; import java.util.Optional; +import io.lumine.mythic.lib.api.item.ItemTag; import org.bukkit.Material; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import io.lumine.mythic.lib.api.item.ItemTag; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.Type; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -19,6 +17,8 @@ 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 org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public abstract class ItemStat { @NotNull private final String id, name; diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/NameData.java b/src/main/java/net/Indyuce/mmoitems/stat/type/NameData.java index f3ea3991..5b575716 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/NameData.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/NameData.java @@ -1,14 +1,14 @@ package net.Indyuce.mmoitems.stat.type; -import java.util.ArrayList; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.api.item.ItemTag; +import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.stat.data.StringData; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; /** * Data that stores what an item is originally named like and prefixes or whatever. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/Previewable.java b/src/main/java/net/Indyuce/mmoitems/stat/type/Previewable.java index 887e1097..27661d92 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/Previewable.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/Previewable.java @@ -1,10 +1,9 @@ package net.Indyuce.mmoitems.stat.type; -import org.jetbrains.annotations.NotNull; - import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; +import org.jetbrains.annotations.NotNull; /** * Suppose this stat may display different in an item before diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/SelfConsumable.java b/src/main/java/net/Indyuce/mmoitems/stat/type/SelfConsumable.java index 082c2e3f..3872dbd3 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/SelfConsumable.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/SelfConsumable.java @@ -1,10 +1,10 @@ package net.Indyuce.mmoitems.stat.type; +import io.lumine.mythic.lib.api.item.NBTItem; +import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -import net.Indyuce.mmoitems.api.item.mmoitem.VolatileMMOItem; - /** * Self consumables just means that the player eats this * item itself, rather than using it on another item. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/StatHistory.java b/src/main/java/net/Indyuce/mmoitems/stat/type/StatHistory.java index 1ae60b39..310d297c 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/StatHistory.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/StatHistory.java @@ -1,21 +1,6 @@ package net.Indyuce.mmoitems.stat.type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.Contract; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; - +import com.google.gson.*; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory; import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; @@ -23,13 +8,16 @@ import net.Indyuce.mmoitems.ItemStats; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; -import net.Indyuce.mmoitems.stat.data.EnchantListData; -import net.Indyuce.mmoitems.stat.data.GemSocketsData; -import net.Indyuce.mmoitems.stat.data.GemstoneData; -import net.Indyuce.mmoitems.stat.data.StringListData; +import net.Indyuce.mmoitems.stat.data.*; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; +import org.apache.commons.lang.Validate; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; /** * The primordial problem is removing Gem Stones. diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/StringListStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/StringListStat.java index 1c96e283..37efdf59 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/StringListStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/StringListStat.java @@ -1,25 +1,10 @@ package net.Indyuce.mmoitems.stat.type; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -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; -import org.jetbrains.annotations.Nullable; - import com.google.gson.JsonArray; +import com.google.gson.JsonElement; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; - -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.api.util.AltChar; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.edition.StatEdition; import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder; @@ -28,6 +13,20 @@ 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 io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.ItemTag; +import io.lumine.mythic.lib.api.util.AltChar; +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; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; public class StringListStat extends ItemStat { public StringListStat(String id, Material mat, String name, String[] lore, String[] types, Material... materials) { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/StringStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/StringStat.java index f2453737..b8db7c52 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/StringStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/StringStat.java @@ -1,16 +1,5 @@ package net.Indyuce.mmoitems.stat.type; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -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; -import org.jetbrains.annotations.Nullable; - import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.item.ItemTag; import io.lumine.mythic.lib.api.item.SupportedNBTTagValues; @@ -23,6 +12,16 @@ import net.Indyuce.mmoitems.gui.edition.EditionInventory; import net.Indyuce.mmoitems.stat.data.StringData; import net.Indyuce.mmoitems.stat.data.random.RandomStatData; import net.Indyuce.mmoitems.stat.data.type.StatData; +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; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; public class StringStat extends ItemStat { public StringStat(String id, Material mat, String name, String[] lore, String[] types, Material... materials) { diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/Upgradable.java b/src/main/java/net/Indyuce/mmoitems/stat/type/Upgradable.java index 27160a34..775f3ad7 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/Upgradable.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/Upgradable.java @@ -1,12 +1,11 @@ package net.Indyuce.mmoitems.stat.type; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.stat.data.type.Mergeable; import net.Indyuce.mmoitems.stat.data.type.StatData; import net.Indyuce.mmoitems.stat.data.type.UpgradeInfo; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * The methods required for this ItemStat to be Upgradeable.