From 9ef08cdebcf8966891bcaa766640c71c2421c21c Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 13 Jun 2021 18:30:48 -0500 Subject: [PATCH] Updated to use the new Lootables engine. --- .../commands/CommandLootables.java | 2 +- .../listeners/DeathListeners.java | 4 +-- .../lootables/LootablesManager.java | 29 ++++++++++++++----- .../stackable/entity/EntityStack.java | 4 +-- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/songoda/ultimatestacker/commands/CommandLootables.java b/src/main/java/com/songoda/ultimatestacker/commands/CommandLootables.java index d8f2f05..04d93a5 100644 --- a/src/main/java/com/songoda/ultimatestacker/commands/CommandLootables.java +++ b/src/main/java/com/songoda/ultimatestacker/commands/CommandLootables.java @@ -1,7 +1,7 @@ package com.songoda.ultimatestacker.commands; import com.songoda.core.commands.AbstractCommand; -import com.songoda.lootables.gui.GuiEditor; +import com.songoda.core.lootables.gui.GuiEditor; import com.songoda.ultimatestacker.UltimateStacker; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/com/songoda/ultimatestacker/listeners/DeathListeners.java b/src/main/java/com/songoda/ultimatestacker/listeners/DeathListeners.java index 7fb6612..0232f20 100644 --- a/src/main/java/com/songoda/ultimatestacker/listeners/DeathListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/listeners/DeathListeners.java @@ -2,8 +2,8 @@ package com.songoda.ultimatestacker.listeners; import com.songoda.core.compatibility.ServerProject; import com.songoda.core.compatibility.ServerVersion; -import com.songoda.lootables.loot.Drop; -import com.songoda.lootables.loot.DropUtils; +import com.songoda.core.lootables.loot.Drop; +import com.songoda.core.lootables.loot.DropUtils; import com.songoda.ultimatestacker.UltimateStacker; import com.songoda.ultimatestacker.settings.Settings; import com.songoda.ultimatestacker.stackable.entity.EntityStack; diff --git a/src/main/java/com/songoda/ultimatestacker/lootables/LootablesManager.java b/src/main/java/com/songoda/ultimatestacker/lootables/LootablesManager.java index d830086..0a6fab6 100644 --- a/src/main/java/com/songoda/ultimatestacker/lootables/LootablesManager.java +++ b/src/main/java/com/songoda/ultimatestacker/lootables/LootablesManager.java @@ -2,13 +2,13 @@ package com.songoda.ultimatestacker.lootables; import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.ServerVersion; -import com.songoda.lootables.Lootables; -import com.songoda.lootables.Modify; -import com.songoda.lootables.loot.Drop; -import com.songoda.lootables.loot.Loot; -import com.songoda.lootables.loot.LootBuilder; -import com.songoda.lootables.loot.LootManager; -import com.songoda.lootables.loot.Lootable; +import com.songoda.core.lootables.Lootables; +import com.songoda.core.lootables.Modify; +import com.songoda.core.lootables.loot.Drop; +import com.songoda.core.lootables.loot.Loot; +import com.songoda.core.lootables.loot.LootBuilder; +import com.songoda.core.lootables.loot.LootManager; +import com.songoda.core.lootables.loot.Lootable; import com.songoda.ultimatestacker.UltimateStacker; import com.songoda.ultimatestacker.settings.Settings; import org.bukkit.enchantments.Enchantment; @@ -96,6 +96,21 @@ public class LootablesManager { } public void createDefaultLootables() { + if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_17)) { + // Add Glow Squid. + lootManager.addLootable(new Lootable("GLOW_SQUID", + new LootBuilder() + .setMaterial(CompatibleMaterial.GLOW_INK_SAC) + .setMin(1) + .setMax(3).build())); + + // Add Glow Squid. + lootManager.addLootable(new Lootable("SQUID", + new LootBuilder() + .setMaterial(CompatibleMaterial.GLOW_INK_SAC) + .setMin(1) + .setMax(3).build())); + } if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)) { // Add Trader Llama. lootManager.addLootable(new Lootable("TRADER_LLAMA", diff --git a/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java b/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java index 112fcab..99eec05 100644 --- a/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java +++ b/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java @@ -1,8 +1,8 @@ package com.songoda.ultimatestacker.stackable.entity; import com.songoda.core.compatibility.ServerVersion; -import com.songoda.lootables.loot.Drop; -import com.songoda.lootables.loot.DropUtils; +import com.songoda.core.lootables.loot.Drop; +import com.songoda.core.lootables.loot.DropUtils; import com.songoda.ultimatestacker.UltimateStacker; import com.songoda.ultimatestacker.settings.Settings; import com.songoda.ultimatestacker.utils.Methods;