From 195a1e1fff584da7b0c491415842d83b5badd8c3 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 23 Dec 2020 00:04:46 +0000 Subject: [PATCH] Removed unused method from DropQueue --- .../command/commands/CommandEnchantinfo.java | 2 +- .../ecoenchants/normal/Spearfishing.java | 17 ++++++++++++----- .../com/willfp/eco/util/drops/DropQueue.java | 12 ------------ 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/commands/CommandEnchantinfo.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/commands/CommandEnchantinfo.java index 259a44b7..89229c19 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/commands/CommandEnchantinfo.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/commands/CommandEnchantinfo.java @@ -26,7 +26,7 @@ public class CommandEnchantinfo extends AbstractCommand { @Override public AbstractTabCompleter getTab() { - return new TabCompleterEnchantinfo(this.getPlugin()); + return new TabCompleterEnchantinfo(); } @Override diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java index 4c244f68..a7b45a41 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java @@ -64,10 +64,17 @@ public class Spearfishing extends EcoEnchant { Collections.shuffle(potentialDrops, new Random(NumberUtils.randInt(0, 100000))); ItemStack drop = new ItemStack(potentialDrops.get(0), 1); - new DropQueue(player) - .addItem(drop) - .setItem(item) - .setLocation(trident.getLocation()) - .push(); + if (EnchantChecks.item(item, EcoEnchants.TELEKINESIS)) { + new DropQueue(player) + .addItem(drop) + .setLocation(trident.getLocation()) + .forceTelekinesis() + .push(); + } else { + new DropQueue(player) + .addItem(drop) + .setLocation(trident.getLocation()) + .push(); + } } } \ No newline at end of file diff --git a/eco-util/src/main/java/com/willfp/eco/util/drops/DropQueue.java b/eco-util/src/main/java/com/willfp/eco/util/drops/DropQueue.java index 6bfb51d8..75551763 100644 --- a/eco-util/src/main/java/com/willfp/eco/util/drops/DropQueue.java +++ b/eco-util/src/main/java/com/willfp/eco/util/drops/DropQueue.java @@ -80,18 +80,6 @@ public class DropQueue { return this; } - /** - * Set the queue to test specific item for telekinesis - * Default item is the player's held item, however for this is required for Tridents. - * - * @param item The item to test - * @return The DropQueue - */ - public DropQueue setItem(ItemStack item) { - handle.setItem(item); - return this; - } - /** * Push the queue */