From db2969b62eb23e58c35dbafcfe89fdd840f891df Mon Sep 17 00:00:00 2001 From: ceze88 Date: Wed, 25 Oct 2023 16:28:52 +0200 Subject: [PATCH] Update FabledSkyBlock compatibility --- EpicHoppers-Plugin/pom.xml | 6 +++--- .../com/craftaro/epichoppers/EpicHoppers.java | 4 ++-- .../compatibility/EpicHoppersPermission.java | 8 ++++---- .../containers/impl/FabledSkyBlockImpl.java | 19 ++++++++++--------- .../listeners/InteractListeners.java | 2 +- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/EpicHoppers-Plugin/pom.xml b/EpicHoppers-Plugin/pom.xml index f98dfbb..38bfed8 100644 --- a/EpicHoppers-Plugin/pom.xml +++ b/EpicHoppers-Plugin/pom.xml @@ -114,9 +114,9 @@ - com.songoda - skyblock - 2.3.30 + com.craftaro + FabledSkyBlock + 3.0.0-b6-SNAPSHOT provided diff --git a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/EpicHoppers.java b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/EpicHoppers.java index ba742a9..8489841 100644 --- a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/EpicHoppers.java +++ b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/EpicHoppers.java @@ -45,8 +45,8 @@ import com.craftaro.epichoppers.tasks.HopTask; import com.craftaro.epichoppers.utils.Methods; import com.craftaro.epichoppers.hopper.teleport.TeleportHandlerImpl; -import com.songoda.skyblock.SkyBlock; -import com.songoda.skyblock.permission.BasicPermission; +import com.craftaro.skyblock.SkyBlock; +import com.craftaro.skyblock.permission.BasicPermission; import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.inventory.ItemStack; diff --git a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/compatibility/EpicHoppersPermission.java b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/compatibility/EpicHoppersPermission.java index 7ed8327..cabfa9c 100644 --- a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/compatibility/EpicHoppersPermission.java +++ b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/compatibility/EpicHoppersPermission.java @@ -1,11 +1,11 @@ package com.craftaro.epichoppers.compatibility; -import com.songoda.skyblock.core.compatibility.CompatibleMaterial; -import com.songoda.skyblock.permission.BasicPermission; -import com.songoda.skyblock.permission.PermissionType; +import com.craftaro.skyblock.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.skyblock.permission.BasicPermission; +import com.craftaro.skyblock.permission.PermissionType; public class EpicHoppersPermission extends BasicPermission { public EpicHoppersPermission() { - super("EpicHoppers", CompatibleMaterial.HOPPER, PermissionType.GENERIC); + super("EpicHoppers", XMaterial.HOPPER, PermissionType.GENERIC); } } diff --git a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/containers/impl/FabledSkyBlockImpl.java b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/containers/impl/FabledSkyBlockImpl.java index d55d7df..e1a813c 100644 --- a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/containers/impl/FabledSkyBlockImpl.java +++ b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/containers/impl/FabledSkyBlockImpl.java @@ -2,10 +2,11 @@ import com.craftaro.epichoppers.containers.CustomContainer; import com.craftaro.epichoppers.containers.IContainer; -import com.songoda.skyblock.SkyBlock; -import com.songoda.skyblock.core.compatibility.CompatibleMaterial; -import com.songoda.skyblock.stackable.Stackable; -import com.songoda.skyblock.stackable.StackableManager; +import com.craftaro.skyblock.SkyBlock; +import com.craftaro.skyblock.core.compatibility.CompatibleMaterial; +import com.craftaro.skyblock.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.skyblock.stackable.Stackable; +import com.craftaro.skyblock.stackable.StackableManager; import org.bukkit.block.Block; import org.bukkit.inventory.ItemStack; @@ -22,14 +23,14 @@ public Container(Block block) { super(); StackableManager stackableManager = SkyBlock.getInstance().getStackableManager(); - CompatibleMaterial compatibleMaterial = CompatibleMaterial.getMaterial(block); + XMaterial xMaterial = XMaterial.matchXMaterial(block.getType()); - this.stackable = stackableManager.getStack(block.getLocation(), compatibleMaterial); + this.stackable = stackableManager.getStack(block.getLocation(), xMaterial); } @Override public boolean addToContainer(ItemStack itemToMove) { - if (CompatibleMaterial.getMaterial(itemToMove) != this.stackable.getMaterial()) { + if (XMaterial.matchXMaterial(itemToMove) != this.stackable.getMaterial()) { return false; } @@ -44,12 +45,12 @@ public boolean addToContainer(ItemStack itemToMove) { @Override public ItemStack[] getItems() { - return new ItemStack[]{new ItemStack(this.stackable.getMaterial().getMaterial(), this.stackable.getSize())}; + return new ItemStack[]{new ItemStack(this.stackable.getMaterial().parseMaterial(), this.stackable.getSize())}; } @Override public void removeFromContainer(ItemStack itemToMove, int amountToMove) { - if (CompatibleMaterial.getMaterial(itemToMove) != this.stackable.getMaterial()) { + if (XMaterial.matchXMaterial(itemToMove) != this.stackable.getMaterial()) { return; } diff --git a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/listeners/InteractListeners.java b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/listeners/InteractListeners.java index c3f21e0..dfc8747 100644 --- a/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/listeners/InteractListeners.java +++ b/EpicHoppers-Plugin/src/main/java/com/craftaro/epichoppers/listeners/InteractListeners.java @@ -10,7 +10,7 @@ import com.craftaro.epichoppers.hopper.teleport.TeleportTrigger; import com.craftaro.epichoppers.player.PlayerData; import com.craftaro.epichoppers.player.SyncType; -import com.songoda.skyblock.SkyBlock; +import com.craftaro.skyblock.SkyBlock; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material;