diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..ab963d8
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6dd29b7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+bin/
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100644
index 0000000..2c9cd87
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ Antidrop+
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..3a21537
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/config.yml b/config.yml
new file mode 100644
index 0000000..8c58491
--- /dev/null
+++ b/config.yml
@@ -0,0 +1,69 @@
+# --------------------------------
+# Antidrop+ v1.0.0 config file
+# Created by despawningbone
+# --------------------------------
+
+# Filter options
+Filter:
+ # Blacklist types of block that you do not want being filtered.
+ # Please use Bukkit's Material list name.
+ # Use a colon after the item name to indicate the damage value if needed.
+ Filter-Blacklist:
+ #- EXAMPLE_MATERIAL
+ -
+
+ # Maximum amount of filters that a player can have.
+ # Set to -1 for infinite (not recommended).
+ Max-amount: 5
+
+ # Here you can set which click type to be blocked by the filter.
+ # Click types can be found in this link:
+ # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
+ Filter-click-type:
+ - CONTROL_DROP
+ - DROP
+ - SHIFT_LEFT
+ - SHIFT_RIGHT
+ - DOUBLE_CLICK
+
+ # Here you can set which type of checks in the filter you want to disable.
+ # Available checks: Name, Lore, Exact, Type, Damage.
+ Disable-filter-check:
+ #- Exact
+ -
+
+#Slot Lock options
+SlotLock:
+ # Maximum amount of slots to be locked.
+ # Set to -1 for infinite.
+ Max-amount: -1
+
+ # Allow Hotbar to be slot locked?
+ Hotbar-slotlock: true
+
+ # Allow armor slots to be locked?
+ Armor-slotlock: false
+
+# Use permissions?
+# If not, every command will be available to all players (except reload),
+# and all bypasses (and reload) will only be available to OPs.
+Use-permissions: true
+
+# Here you can set the antidrop filter and slot lock messages' cooldown
+# Measured in ticks (1 second = 20 ticks in optimal conditiions)
+Antidrop-message-cooldown: 100
+
+# Some servers might encounter the glowing of the GUI indicators not showing up.
+# It is most likely caused by plugin interference.
+# If that happens, turn this off.
+Glow: true
+
+# Allow player with permission adp.death.keepfilter/ado.death.keepslot (or OPs if config Use-permissions is disabled)
+# To keep their antidrop locked items even after death?
+Death-AntiDrop: false
+
+# Use economy? Vault API required.
+Eco:
+ Use: false
+ Filter-fee: 20000.0
+ SlotLock-fee: 10000.0
diff --git a/plugin.yml b/plugin.yml
new file mode 100644
index 0000000..0061912
--- /dev/null
+++ b/plugin.yml
@@ -0,0 +1,13 @@
+name: AntiDropPlus
+description: A plugin that avoids accidental drops and related item loss.
+version: 1.0.0
+author: despawningbone
+
+main: me.despawningbone.antidrop.ADMain
+softdepend: [Vault]
+
+commands:
+ antidrop:
+ description: opens a GUI for the configuration of antidrop.
+ usage: / [filter/lockslot]
+ aliases: [nodrop, adp]
\ No newline at end of file
diff --git a/src/me/despawningbone/antidrop/ADCommandMain.java b/src/me/despawningbone/antidrop/ADCommandMain.java
new file mode 100644
index 0000000..119010b
--- /dev/null
+++ b/src/me/despawningbone/antidrop/ADCommandMain.java
@@ -0,0 +1,192 @@
+package me.despawningbone.antidrop;
+
+import org.bukkit.Material;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.inventory.ItemStack;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.bukkit.Bukkit;
+import org.bukkit.ChatColor;
+
+public class ADCommandMain implements CommandExecutor {
+
+ private ADMain plugin;
+
+ public ADCommandMain(ADMain instance) {
+ plugin = instance;
+ }
+
+ @Override
+ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
+ if(args.length > 0 && args[0].equalsIgnoreCase("reload")) {
+ if((ConfigHandler.usePerms && sender.hasPermission("adp.reload")) || (!ConfigHandler.usePerms && sender.isOp())) {
+ if(ConfigHandler.getConfigValues()) {
+ sender.sendMessage(ADMain.prefix + ChatColor.BLUE + "Antidrop+ has been reloaded.");
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.DARK_RED + "There is a missing dependency. Disabled Antidrop+.");
+ }
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "You do not have permission.");
+ }
+ return true;
+ }
+ if (sender instanceof Player) {
+ Player player = (Player) sender;
+ if (args.length <= 0){
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "Unknown arguments. Do /antidrop help for more info.");
+ } else if(args[0].equalsIgnoreCase("lockslot")) {
+ if((ConfigHandler.usePerms && player.hasPermission("adp.lockslot")) || !ConfigHandler.usePerms) {
+ if(ConfigHandler.eco && GUIHandler.slotParam.containsKey(player.getUniqueId()) && !GUIHandler.slotParam.get(player.getUniqueId()).isEmpty()) {
+ List buffer = new ArrayList(GUIHandler.slotParam.get(player.getUniqueId()));
+ ADListener.slotsBuffer.put(player.getUniqueId(), buffer);
+ }
+ boolean bypassmax = (ConfigHandler.usePerms && sender.hasPermission("adp.bypass.slotmax")) || (!ConfigHandler.usePerms && sender.isOp());
+ if(!bypassmax && GUIHandler.slotParam.containsKey(player.getUniqueId()) && GUIHandler.slotParam.get(player.getUniqueId()).size() >= ConfigHandler.slotMax ) {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "You have reached the slot limit of " + ConfigHandler.slotMax + ".");
+ } else {
+ GUIHandler.OpenSlotLockGUI(player);
+ }
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "You do not have permission.");
+ }
+ } else if(args[0].equalsIgnoreCase("filter")) {
+ if((ConfigHandler.usePerms && player.hasPermission("adp.filter")) || !ConfigHandler.usePerms) {
+ ItemStack item = player.getItemInHand();
+ boolean bypass = (ConfigHandler.usePerms && sender.hasPermission("adp.bypass.filterblacklist")) || (!ConfigHandler.usePerms && sender.isOp());
+ if(item.getType() != Material.AIR) {
+ if(!bypass && (ConfigHandler.filterBlacklist.containsKey(item.getType()) && (ConfigHandler.filterBlacklist.get(item.getType()) == -1 || ConfigHandler.filterBlacklist.get(item.getType()) == item.getDurability()))) {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "Sorry, but you cannot filter this item.");
+ } else {
+ boolean bypassmax = (ConfigHandler.usePerms && sender.hasPermission("adp.bypass.filtermax")) || (!ConfigHandler.usePerms && sender.isOp());
+ if(!bypassmax && (GUIHandler.filterParam.containsKey(player.getUniqueId()) && GUIHandler.filterParam.get(player.getUniqueId()).size() >= ConfigHandler.filterMax)) {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "You have reached the filter limit of " + ConfigHandler.filterMax + "!");
+ } else {
+ GUIHandler.OpenFilterGUI(item, player);
+ }
+ }
+ } else {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "Please hold a item to filter!");
+ }
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "You do not have permission.");
+ }
+ } else if(args[0].equalsIgnoreCase("filterlist")) {
+ if((ConfigHandler.usePerms && player.hasPermission("adp.filter")) || !ConfigHandler.usePerms) {
+ String header = ChatColor.GRAY + (ChatColor.STRIKETHROUGH + "------------------") + ChatColor.GOLD + "AntiDrop+ Filter List" + ChatColor.GRAY + ChatColor.STRIKETHROUGH + "------------------";
+ String nofilter = ADMain.prefix + ChatColor.RED + "You currently have no filters set.";
+ if(args.length > 1) {
+ if((ConfigHandler.usePerms && player.hasPermission("adp.others.filterlist")) || (!ConfigHandler.usePerms && player.isOp())) {
+ String playername = args[1];
+ Player otherPlayer = Bukkit.getServer().getPlayer(playername);
+ if(otherPlayer != null) {
+ player = otherPlayer;
+ int length = 57 - player.getName().length() - 14;
+ String repeat = ChatColor.GRAY + (ChatColor.STRIKETHROUGH + (StringUtils.repeat("-", (int) Math.floor(length / 2))));
+ String lastletter = (length % 2) == 0 ? "" : "-";
+ header = repeat + ChatColor.GOLD + player.getName() + "'s Filter List" + repeat + lastletter;
+ nofilter = nofilter.replace("You", player.getName());
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "Unknown player.");
+ return true;
+ }
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "You do not have permission.");
+ return true;
+ }
+ }
+ //async?
+ if(GUIHandler.filterParam.containsKey(player.getUniqueId()) && !GUIHandler.filterParam.get(player.getUniqueId()).isEmpty()) {
+ List>> filterlist = GUIHandler.filterParam.get(player.getUniqueId());
+ sender.sendMessage(header);
+ for(int i = 0; i < filterlist.size(); i++) {
+ List> filter = filterlist.get(i);
+ sender.sendMessage(ChatColor.GOLD + String.valueOf(i + 1) + ":");
+ for(int i2 = 0; i2 < filter.size(); i2++) {
+ Entry val = filter.get(i2);
+ if(val.getKey().equals("Exact")) {
+ String config = val.getValue().toString().replaceAll("\n", "\n\u00A73");
+ Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "tellraw " + sender.getName() + " {\"text\":\"\u00A76 Exact: \u00A77(Hover me!)\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"\u00A73" + config + "\"}}");
+ } else if(val.getKey().equals("Lore")){
+ sender.sendMessage(ChatColor.GOLD + " " + val.getKey() + ":");
+ @SuppressWarnings("unchecked")
+ List lore = (List) val.getValue();
+ for(int i3 = 0; i3 < lore.size(); i3++) {
+ sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GRAY + lore.get(i3));
+ }
+ } else {
+ sender.sendMessage(ChatColor.GOLD + " " + val.getKey() + ": " + ChatColor.GRAY + val.getValue());
+ }
+ }
+ }
+ sender.sendMessage(ChatColor.GRAY + (ChatColor.STRIKETHROUGH + "-----------------------------------------------------"));
+ } else {
+ sender.sendMessage(nofilter);
+ }
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "You do not have permission.");
+ }
+ } else if(args[0].equalsIgnoreCase("remove")) {
+ if((ConfigHandler.usePerms && player.hasPermission("adp.filter")) || !ConfigHandler.usePerms) {
+ if(GUIHandler.filterParam.containsKey(player.getUniqueId()) && !GUIHandler.filterParam.get(player.getUniqueId()).isEmpty()) {
+ if(args.length > 1) {
+ int filtID = 0;
+ try {
+ filtID = Integer.parseInt(args[1]) - 1;
+ } catch (NumberFormatException e) {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "Please enter a valid integer.");
+ return true;
+ }
+ List>> filterList = GUIHandler.filterParam.get(player.getUniqueId());
+ if(filtID >= 0 && filtID < filterList.size()) {
+ filterList.remove(filtID);
+ GUIHandler.filterParam.put(player.getUniqueId(), filterList);
+ player.sendMessage(ADMain.prefix + ChatColor.YELLOW + "Successfully removed filter #" + (filtID + 1) + ".");
+ plugin.serialize(GUIHandler.filterParam, "FilterData.bin");
+ } else {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "The integer inputted is out of range.");
+ }
+ } else {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "Please input the filter's ID. You can see it in /antidrop filterlist.");
+ }
+ } else {
+ player.sendMessage(ADMain.prefix + ChatColor.RED + "You currently have no filters set.");
+ }
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "You do not have permission.");
+ }
+ } else if(args[0].equalsIgnoreCase("help")) {
+ sender.sendMessage(ChatColor.GRAY + (ChatColor.STRIKETHROUGH + "--------------------") + ChatColor.GOLD + "AntiDrop+ Help" + ChatColor.GRAY + ChatColor.STRIKETHROUGH + "---------------------");
+ sender.sendMessage(ChatColor.DARK_AQUA + "Alias:" + ChatColor.DARK_GRAY + " /adp, /nodrop");
+ if((ConfigHandler.usePerms && player.hasPermission("adp.lockslot")) || !ConfigHandler.usePerms) {
+ sender.sendMessage(ChatColor.GOLD + "/antidrop lockslot" + ChatColor.GRAY + " - " + ChatColor.BLUE + "Opens the slot lock GUI.");
+ }
+ if((ConfigHandler.usePerms && player.hasPermission("adp.filter")) || !ConfigHandler.usePerms) {
+ sender.sendMessage(ChatColor.GOLD + "/antidrop filter" + ChatColor.GRAY + " - " + ChatColor.BLUE + "Opens the filter GUI.");
+ sender.sendMessage(ChatColor.GOLD + "/antidrop filterlist" + ChatColor.GRAY + " - " + ChatColor.BLUE + "Lists the filters you currently have.");
+ sender.sendMessage(ChatColor.GOLD + "/antidrop remove " + ChatColor.GRAY + " - " + ChatColor.BLUE + "Removes a filter.");
+ }
+ if(sender.hasPermission("adp.reload")) {
+ sender.sendMessage(ChatColor.GOLD + "/antidrop reload" + ChatColor.GRAY + " - " + ChatColor.BLUE + "Reloads the config.");
+ }
+ sender.sendMessage(ChatColor.GOLD + "/antidrop about" + ChatColor.GRAY + " - " + ChatColor.BLUE + "Displays the about page.");
+ } else if(args[0].equalsIgnoreCase("about")) {
+ sender.sendMessage(ChatColor.BLUE + "Antidrop+" + ChatColor.DARK_GRAY + " Version: " + ChatColor.GOLD + plugin.getDescription().getVersion());
+ sender.sendMessage(ChatColor.GOLD + "Made by " + ChatColor.DARK_BLUE + "despawningbone");
+ } else {
+ sender.sendMessage(ADMain.prefix + ChatColor.RED + "Unknown arguments. Do /antidrop help for more info.");
+ }
+ } else {
+ sender.sendMessage(ChatColor.RED + "This is a player only command.");
+ }
+ return true;
+ }
+
+}
\ No newline at end of file
diff --git a/src/me/despawningbone/antidrop/ADListener.java b/src/me/despawningbone/antidrop/ADListener.java
new file mode 100644
index 0000000..2306274
--- /dev/null
+++ b/src/me/despawningbone/antidrop/ADListener.java
@@ -0,0 +1,472 @@
+package me.despawningbone.antidrop;
+
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.UUID;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.bukkit.ChatColor;
+import org.bukkit.GameMode;
+import org.bukkit.Material;
+import org.bukkit.configuration.InvalidConfigurationException;
+import org.bukkit.configuration.file.YamlConfiguration;
+import org.bukkit.entity.Player;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
+import org.bukkit.event.entity.PlayerDeathEvent;
+import org.bukkit.event.inventory.InventoryClickEvent;
+import org.bukkit.event.inventory.InventoryCloseEvent;
+import org.bukkit.event.player.PlayerDropItemEvent;
+import org.bukkit.event.player.PlayerRespawnEvent;
+import org.bukkit.inventory.Inventory;
+import org.bukkit.inventory.ItemStack;
+
+import me.despawningbone.antidrop.utils.Timer;
+
+public class ADListener implements Listener {
+
+ private ADMain plugin;
+
+ public ADListener(ADMain instance) {
+ plugin = instance;
+ }
+
+ public static HashMap> slotsBuffer = new HashMap>();
+
+ public static List cooldown = new ArrayList();
+
+ private HashMap>> toBeKeeped = new HashMap>>(); //will reset if player didnt respawn in time
+
+ public void sendCooldownMessage(Player player, String msg) {
+ if(!cooldown.contains(player.getUniqueId())) {
+ player.sendMessage(msg);
+ cooldown.add(player.getUniqueId());
+ Timer.cooldown(player);
+ }
+ }
+
+ @EventHandler
+ public void onPlayerDropItem(PlayerDropItemEvent event) {
+ Player player = event.getPlayer();
+ if(player.getGameMode() != GameMode.CREATIVE) {
+ if((ConfigHandler.usePerms && player.hasPermission("adp.filter")) || !ConfigHandler.usePerms) {
+ boolean cancel = filterCheckStart(player, event.getItemDrop().getItemStack()); //filter check
+ if(cancel) {
+ event.setCancelled(true);
+ sendCooldownMessage(player, ADMain.prefix + ChatColor.BLUE + "Item is in the filter list! You will not be able to drop items the filtered list until you remove it with /antidrop remove.");
+ return;
+ }
+ }
+ if((ConfigHandler.usePerms && player.hasPermission("adp.lockslot")) || !ConfigHandler.usePerms) {
+ //SlotLock check
+ if(runSlotCheck(player, player.getInventory().getHeldItemSlot())) {
+ event.setCancelled(true);
+ sendCooldownMessage(player, ADMain.prefix + ChatColor.BLUE + "Slot is locked! If you want to unlock it, do /antidrop lockslot and click on the slot you want to unlock.");
+ return;
+ }
+ }
+ }
+ }
+
+ //checks run in async?
+ private boolean filterCheckStart(Player player, ItemStack item) {
+ final List ret = new ArrayList(Arrays.asList(false));
+ ExecutorService executor = Executors.newFixedThreadPool(1);
+ executor.execute(new Runnable() {
+ @Override
+ public void run() {
+ if(GUIHandler.filterParam.containsKey(player.getUniqueId())) {
+ for(int i = 0; i < GUIHandler.filterParam.get(player.getUniqueId()).size(); i++) {
+ List> filter = GUIHandler.filterParam.get(player.getUniqueId()).get(i);
+ boolean success = runFilterCheck(filter, item);
+ if(success) {
+ ret.set(0, true);
+ }
+ }
+ }
+ }
+ });
+ executor.shutdown();
+ try {
+ executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
+ }
+ catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return ret.get(0);
+ }
+ private boolean runFilterCheck(List> filter, ItemStack item) {
+ for(int i = 0; i < filter.size(); i++) {
+ String checkType = filter.get(i).getKey();
+ Object value = filter.get(i).getValue();
+ if(checkType.equals("Exact")) {
+ YamlConfiguration check = new YamlConfiguration();
+ YamlConfiguration toCheck = new YamlConfiguration();
+ try {
+ check.loadFromString((String) value);
+ } catch (InvalidConfigurationException e) {
+ e.printStackTrace(); return false;
+ }
+ ItemStack itoCheck = item.clone(); itoCheck.setAmount(1);
+ toCheck.set("i", itoCheck);
+ if(!toCheck.saveToString().equals(check.saveToString())){ return false; }
+ } else {
+ if(checkType.equals("Name")) {
+ if(!(item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(value))) return false;
+ }
+ if(checkType.equals("Lore")) {
+ if(!(item.getItemMeta().hasLore() && item.getItemMeta().getLore().equals(value))) return false;
+ }
+ if(checkType.equals("Type")) {
+ if(!item.getType().equals(value)) return false;
+ }
+ if(checkType.equals("Damage")) {
+ if(item.getDurability() != (short) value) return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ private boolean runSlotCheck(Player player, int slot) {
+ //SlotLock check
+ if(GUIHandler.slotParam.containsKey(player.getUniqueId())) {
+ if(GUIHandler.slotParam.containsKey(player.getUniqueId()) && !GUIHandler.slotParam.get(player.getUniqueId()).isEmpty()) {
+ List slotlist = GUIHandler.slotParam.get(player.getUniqueId());
+ for(int i = 0; i < slotlist.size(); i++) {
+ if(slotlist.get(i) == slot) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ //TODO check if works, update spigot
+
+ @EventHandler
+ public void onPlayerDeath(PlayerDeathEvent event) {
+ System.out.println(event.getKeepInventory());
+ if(ConfigHandler.deathKeepEnable && !event.getKeepInventory()) {
+ Player player = event.getEntity();
+
+ if((ConfigHandler.usePerms && player.hasPermission("adp.death.keepfilter")) || (!ConfigHandler.usePerms && player.isOp())) {
+ System.out.println("deathfil1");
+ if(GUIHandler.filterParam.containsKey(player.getUniqueId()) && !GUIHandler.filterParam.get(player.getUniqueId()).isEmpty()) {
+ System.out.println("deathfil2");
+ List items = event.getDrops();
+ ExecutorService executor = Executors.newFixedThreadPool(1);
+ executor.execute(new Runnable() {
+ @Override
+ public void run() {
+ System.out.println("deathfil3");
+ //HashMap
+ HashMap invVal = new HashMap();
+ List name = new ArrayList();
+ List> lore = new ArrayList>();
+ List damage = new ArrayList();
+ List type = new ArrayList();
+ for(int i = 0; i < items.size(); i++) {
+ System.out.println("deathfilloop1");
+ ItemStack item = items.get(i);
+ name.add((item.hasItemMeta() && item.getItemMeta().hasDisplayName()) ? item.getItemMeta().getDisplayName() : null);
+ lore.add((item.hasItemMeta() && item.getItemMeta().hasLore()) ? item.getItemMeta().getLore() : null);
+ damage.add(item.getDurability());
+ type.add(item.getType());
+ }
+ invVal.put("Name", name); invVal.put("Lore", lore); invVal.put("Damage", damage); invVal.put("Type", type);
+ List>> filters = GUIHandler.filterParam.get(player.getUniqueId());
+ for(int i = 0; i < filters.size(); i++) {
+ System.out.println("deathfilloop2:1");
+ HashMap times = new HashMap();
+ List> filter = filters.get(i);
+ for(int i2 = 0; i2 < filter.size(); i2++) {
+ System.out.println("deathfilloop2:2");
+ Entry check = filter.get(i2);
+ String checkType = check.getKey();
+ if(checkType.equals("Exact")) {
+ System.out.println("deathfiltodo");
+ } else {
+ System.out.println("deathfilcheck");
+ @SuppressWarnings("unchecked")
+ List