diff --git a/lib/MMOItems.jar b/lib/MMOItems.jar index 09e387f3..0c80ee8b 100644 Binary files a/lib/MMOItems.jar and b/lib/MMOItems.jar differ diff --git a/lib/MMOLib.jar b/lib/MMOLib.jar index 4a1734e6..ce864bd5 100644 Binary files a/lib/MMOLib.jar and b/lib/MMOLib.jar differ diff --git a/src/main/java/net/Indyuce/mmocore/api/eco/Withdraw.java b/src/main/java/net/Indyuce/mmocore/api/eco/Withdraw.java index 2852be9c..ec7784ca 100644 --- a/src/main/java/net/Indyuce/mmocore/api/eco/Withdraw.java +++ b/src/main/java/net/Indyuce/mmocore/api/eco/Withdraw.java @@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.util.item.CurrencyItem; -import net.Indyuce.mmocore.api.util.item.SmartGive; +import net.mmogroup.mmolib.api.util.SmartGive; public class Withdraw implements Listener { private static final Set withdrawing = new HashSet<>(); diff --git a/src/main/java/net/Indyuce/mmocore/api/quest/trigger/ItemTrigger.java b/src/main/java/net/Indyuce/mmocore/api/quest/trigger/ItemTrigger.java index b7900782..f02afb2a 100644 --- a/src/main/java/net/Indyuce/mmocore/api/quest/trigger/ItemTrigger.java +++ b/src/main/java/net/Indyuce/mmocore/api/quest/trigger/ItemTrigger.java @@ -4,8 +4,8 @@ import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import net.Indyuce.mmocore.api.player.PlayerData; -import net.Indyuce.mmocore.api.util.item.SmartGive; import net.mmogroup.mmolib.api.MMOLineConfig; +import net.mmogroup.mmolib.api.util.SmartGive; public class ItemTrigger extends Trigger { private final Material material; diff --git a/src/main/java/net/Indyuce/mmocore/api/util/item/SmartGive.java b/src/main/java/net/Indyuce/mmocore/api/util/item/SmartGive.java deleted file mode 100644 index 506365fa..00000000 --- a/src/main/java/net/Indyuce/mmocore/api/util/item/SmartGive.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.Indyuce.mmocore.api.util.item; - -import java.util.List; - -import org.bukkit.Location; -import org.bukkit.entity.Player; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; - -public class SmartGive { - private final Inventory inv; - private final Location loc; - - public SmartGive(Player player) { - inv = player.getInventory(); - loc = player.getLocation(); - } - - /* - * either give directly the item to the player or drops it on the ground if - * there is not enough space in the player inventory. - */ - public void give(ItemStack... item) { - for (ItemStack drop : inv.addItem(item).values()) - loc.getWorld().dropItem(loc, drop); - } - - public void give(List item) { - for (ItemStack drop : inv.addItem(item.toArray(new ItemStack[item.size()])).values()) - loc.getWorld().dropItem(loc, drop); - } -} diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/CoinsCommandMap.java b/src/main/java/net/Indyuce/mmocore/command/rpg/CoinsCommandMap.java index 9814d8d8..2c4cb93d 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/CoinsCommandMap.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/CoinsCommandMap.java @@ -6,10 +6,10 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import net.Indyuce.mmocore.api.util.item.CurrencyItem; -import net.Indyuce.mmocore.api.util.item.SmartGive; import net.Indyuce.mmocore.command.api.CommandEnd; import net.Indyuce.mmocore.command.api.CommandMap; import net.Indyuce.mmocore.command.api.Parameter; +import net.mmogroup.mmolib.api.util.SmartGive; public class CoinsCommandMap extends CommandEnd { public CoinsCommandMap(CommandMap parent) { diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/NoteCommandMap.java b/src/main/java/net/Indyuce/mmocore/command/rpg/NoteCommandMap.java index b04cb901..5146d213 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/NoteCommandMap.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/NoteCommandMap.java @@ -8,10 +8,10 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import net.Indyuce.mmocore.api.util.item.CurrencyItem; -import net.Indyuce.mmocore.api.util.item.SmartGive; import net.Indyuce.mmocore.command.api.CommandEnd; import net.Indyuce.mmocore.command.api.CommandMap; import net.Indyuce.mmocore.command.api.Parameter; +import net.mmogroup.mmolib.api.util.SmartGive; public class NoteCommandMap extends CommandEnd { public NoteCommandMap(CommandMap parent) { diff --git a/src/main/java/net/Indyuce/mmocore/gui/eco/DepositMenu.java b/src/main/java/net/Indyuce/mmocore/gui/eco/DepositMenu.java index 98681563..de67b523 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/eco/DepositMenu.java +++ b/src/main/java/net/Indyuce/mmocore/gui/eco/DepositMenu.java @@ -13,9 +13,9 @@ import org.bukkit.scheduler.BukkitRunnable; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.api.util.item.ConfigItem; -import net.Indyuce.mmocore.api.util.item.SmartGive; import net.Indyuce.mmocore.gui.api.PluginInventory; import net.mmogroup.mmolib.api.item.NBTItem; +import net.mmogroup.mmolib.api.util.SmartGive; public class DepositMenu extends PluginInventory { private ItemStack depositItem;