This commit is contained in:
Ashijin 2021-06-12 19:23:09 -06:00
parent 47c4a7fb32
commit 689cd230d9
216 changed files with 1607 additions and 1772 deletions

View File

@ -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=<JarFileName>.jar -DartifactId=<ArtifactName> -Dversion=<ArtifactVersion>
```
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:
```
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<artifactId>ArtifactName</artifactId>
<version>ArtifactVersion</version>
</dependency>
```
The artifact names and versions must match in order for the dependency to be recognized.

Binary file not shown.

Binary file not shown.

BIN
lib/MMOCore.jar Normal file

Binary file not shown.

BIN
lib/MMOLib.jar Normal file

Binary file not shown.

BIN
lib/MythicLib.jar Normal file

Binary file not shown.

BIN
lib/MythicMobs.jar Normal file

Binary file not shown.

BIN
lib/PlaceholderAPI.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/spigot-sources.jar Normal file

Binary file not shown.

BIN
lib/spigot.jar Normal file

Binary file not shown.

272
pom.xml
View File

@ -49,7 +49,6 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>lumine-repo</id>
@ -67,73 +66,83 @@
<id>inventive-repo</id>
<url>https://repo.inventivetalent.org/content/groups/public/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<!-- Repository used to fetch all Spigot builds -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<!-- Local reposity used to save external libraries with no repos -->
<repository>
<id>local-repo</id>
<url>file:${project.basedir}/local-repo</url>
</repository>
</repositories>
<!-- Order of dependencies matters in Maven because the first wins when
multiple classes match. -->
<dependencies>
<dependency>
<groupId>net.Indyuce.mmoitems.lib</groupId>
<artifactId>GoogleGSON</artifactId>
<version>2.8.5</version>
</dependency>
<!-- Minecraft -->
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>amalgam</version>
<scope>system</scope>
<systemPath>${basedir}/lib/spigot.jar</systemPath>
</dependency>
<!-- MMOs -->
<dependency>
<groupId>net.Indyuce</groupId>
<artifactId>MMOCore</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicLib</artifactId>
<version>1.1.0</version>
<version>1.0.19</version>
<scope>provided</scope>
</dependency>
<!-- USING THIS FOR INTERNAL TESTING -->
<!-- <dependency>-->
<!-- <groupId>io.lumine</groupId>-->
<!-- <artifactId>MythicLib</artifactId>-->
<!-- <version>1.0. 0</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${basedir}/lib/MythicLib.jar</systemPath>-->
<!-- </dependency>-->
<!--
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicEnchants</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>provided</scope>
<groupId>net.Indyuce</groupId>
<artifactId>MMOLib</artifactId>
<version>1.7.3</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MMOLib.jar</systemPath>
</dependency>
-->
<!-- APIs -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>19.0.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>system</scope>
<systemPath>${basedir}/lib/GoogleGSON.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.klyser8.iridescent</groupId>
<artifactId>Iridescent</artifactId>
<version>1.2.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Iridescent.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.RednedEpic</groupId>
<artifactId>PhatLoots</artifactId>
@ -141,43 +150,186 @@
<scope>provided</scope>
</dependency>
<!-- Other Plugins -->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.9.2</version>
<scope>provided</scope>
<groupId>com.github.Eniripsa96</groupId>
<artifactId>SkillAPI</artifactId>
<version>master-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/SkillAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.Archy-x</groupId>
<artifactId>AureliumSkills</artifactId>
<version>Beta1.0.6</version>
<groupId>n3kas</groupId>
<artifactId>ae.api</artifactId>
<version>5.7.6</version>
<scope>system</scope>
<systemPath>${basedir}/lib/AE-API.jar</systemPath>
</dependency>
<dependency>
<groupId>org.black_ixx</groupId>
<artifactId>BossShop</artifactId>
<version>2.0.9</version>
<scope>system</scope>
<systemPath>${basedir}/lib/BossShopPro.jar</systemPath>
</dependency>
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicEnchants</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.bekvon.bukkit</groupId>
<artifactId>Residence</artifactId>
<version>4.8.7.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Residence.jar</systemPath>
</dependency>
<dependency>
<groupId>com.Zrips</groupId>
<artifactId>CMI</artifactId>
<version>8.6.5.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/CMI.jar</systemPath>
</dependency>
<dependency>
<groupId>com.herocraftonline</groupId>
<artifactId>heroes</artifactId>
<version>1.9.3</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Heroes.jar</systemPath>
</dependency>
<dependency>
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.104</version>
<scope>system</scope>
<systemPath>${basedir}/lib/mcMMO.jar</systemPath>
</dependency>
<dependency>
<groupId>us.eunoians</groupId>
<artifactId>McRPG</artifactId>
<version>1.1.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/McRPG.jar</systemPath>
</dependency>
<dependency>
<groupId>me.baks</groupId>
<artifactId>rpl</artifactId>
<version>3.9.30</version>
<scope>system</scope>
<systemPath>${basedir}/lib/RPGPlayerLeveling.jar</systemPath>
</dependency>
<dependency>
<groupId>me.leothepro555</groupId>
<artifactId>skills</artifactId>
<version>12.3.5</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Skills.jar</systemPath>
</dependency>
<dependency>
<groupId>org.skills.main</groupId>
<artifactId>SkillsPro</artifactId>
<version>18.9.0.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/SkillsPro.jar</systemPath>
</dependency>
<dependency>
<groupId>me.robin</groupId>
<artifactId>BattleLevels</artifactId>
<version>6.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/BattleLevels.jar</systemPath>
</dependency>
<dependency>
<groupId>com.evill4mer</groupId>
<artifactId>RealDualWield</artifactId>
<version>1.1.12</version>
<scope>system</scope>
<systemPath>${basedir}/lib/RealDualWield.jar</systemPath>
</dependency>
<dependency>
<groupId>me.arasple.mc</groupId>
<artifactId>TrHologram</artifactId>
<version>1.11</version>
<scope>system</scope>
<systemPath>${basedir}/lib/TrHologram.jar</systemPath>
</dependency>
<dependency>
<groupId>com.gmail.filoghost</groupId>
<artifactId>HolographicDisplays</artifactId>
<version>6.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/HolographicDisplays.jar</systemPath>
</dependency>
<dependency>
<groupId>io.lumine.xikage</groupId>
<artifactId>MythicMobs</artifactId>
<version>4.11.0-SNAPSHOT</version>
<scope>provided</scope>
<version>4.8.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MythicMobs.jar</systemPath>
</dependency>
<dependency>
<groupId>io.lumine</groupId>
<artifactId>LumineUtils</artifactId>
<version>1.16.1-20210326.031037-28</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
<groupId>de.tobiyas</groupId>
<artifactId>RacesAndClasses</artifactId>
<version>1.2.6</version>
<scope>system</scope>
<systemPath>${basedir}/lib/RacesAndClasses.jar</systemPath>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<groupId>ru.endlesscode</groupId>
<artifactId>rpginventory</artifactId>
<version>2.3.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/RPGInventory.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sainttx.holograms</groupId>
<artifactId>holograms</artifactId>
<version>2.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Holograms.jar</systemPath>
</dependency>
<dependency>
<groupId>net.milkbowl</groupId>
<artifactId>vault</artifactId>
<version>1.7.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Vault.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/WorldGuard.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/WorldEdit.jar</systemPath>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.25-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Citizens.jar</systemPath>
</dependency>
<dependency>
<groupId>org.inventivetalent</groupId>
<artifactId>glowapi</artifactId>
<version>1.4.8-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/GlowAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.7</version>
<scope>system</scope>
<systemPath>${basedir}/lib/PlaceholderAPI.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -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
@ -483,12 +429,11 @@ 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
* <code>getInventory().Register()</code>. This method
* will clear all other PlayerInventories for now, as to
* keep backwards compatibility.
* @deprecated Rather than setting this to the only inventory MMOItems will
* search equipment within, you must add your inventory to the
* handler with <code>getInventory().Register()</code>. 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.
* <p>
* </p>
* 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.
* <p></p>
* 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.
* <p>
* </p>
* <p></p>
* Will return <code>null</code> 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,52 +684,39 @@ 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.
* <p>
* </p>
* <p></p>
* Will return <code>null</code> 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.
* <p>
* </p>
* <p></p>
* Will return <code>null</code> 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
*/
@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());
@ -827,16 +726,11 @@ public class MMOItems extends LuminePlugin {
* @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();
}
@ -847,52 +741,39 @@ public class MMOItems extends LuminePlugin {
*
* @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 :)
* <p>
* </p>
* Parses color codes. <b>Mostly for DEV testing</b>. these may removed any
* release.
* <p></p>
* Parses color codes. <b>Mostly for DEV testing</b>. 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!
* <p>
* </p>
* <p></p>
* 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,10 +781,7 @@ 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.
@ -913,9 +791,7 @@ public class MMOItems extends LuminePlugin {
* @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
}

View File

@ -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;

View File

@ -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() {

View File

@ -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."),

View File

@ -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) -> {

View File

@ -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<Element, Double> relative = new HashMap<>();

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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 :)

View File

@ -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)

View File

@ -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 {

View File

@ -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) {

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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.#");

View File

@ -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" };

View File

@ -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() {

View File

@ -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) {

View File

@ -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<UUID, PlayerData> data = new HashMap<>();

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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),

View File

@ -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

View File

@ -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;

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 <b><i><u>pain</u></i></b> that PhatLoots keeps giving outdated

View File

@ -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)

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -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;
/**

View File

@ -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

View File

@ -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() {

View File

@ -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);
}
}
}

View File

@ -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<SkillType, DamageType> damages = new HashMap<>();

View File

@ -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;

View File

@ -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 {

View File

@ -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<Integer, RegisteredAttack> damageInfo = new HashMap<>();

View File

@ -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 {

View File

@ -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) {

View File

@ -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;

View File

@ -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<String, ItemStack> cached = new LinkedHashMap<>();

View File

@ -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;

View File

@ -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.

View File

@ -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<UUID, CachedRecipe> cachedRecipe = new HashMap<>();

View File

@ -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 {

View File

@ -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) {

View File

@ -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

View File

@ -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<DamageCause> ignoredCauses = Arrays.asList(DamageCause.DROWNING, DamageCause.SUICIDE, DamageCause.FALL, DamageCause.VOID,

View File

@ -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();

View File

@ -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)

View File

@ -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.#");

View File

@ -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<Player, ArrayList<ItemStack>> deathItems = new HashMap<>();

View File

@ -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<Integer> downIds = Arrays.asList(23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,

View File

@ -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 {

View File

@ -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 {

View File

@ -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<EntityType, DropTable> monsters = new HashMap<>();

View File

@ -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 {

View File

@ -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<String, Layout> layouts = new HashMap<>();

View File

@ -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<String, List<String>> formats = new HashMap<>();

View File

@ -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 {
/**

View File

@ -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.

View File

@ -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<String, ItemSet> itemSets = new HashMap<>();

View File

@ -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<String, ItemStat> stats = new LinkedHashMap<>();

View File

@ -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 {

View File

@ -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<String, ItemTier> tiers = new HashMap<>();

View File

@ -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<String, Type> map = new LinkedHashMap<>();

View File

@ -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() {

View File

@ -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<String, UpgradeTemplate> templates = new HashMap<>();

View File

@ -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<String, WorldGenTemplate> templates = new HashMap<>();

View File

@ -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.#");

View File

@ -1,25 +1,27 @@
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
@ -36,7 +38,7 @@ public class Amphibian extends ChooseStat implements ItemRestriction, GemStoneSt
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<String> 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<ItemTag> 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<Block> 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 + ")");

Some files were not shown because too many files have changed in this diff Show More