Updated to use the new Lootables engine.

This commit is contained in:
Brianna 2021-06-13 18:30:48 -05:00
parent 3094d0dd46
commit 9ef08cdebc
4 changed files with 27 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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