mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-22 10:15:43 +01:00
Update FabledSkyBlock compatibility
This commit is contained in:
parent
f0398efa4a
commit
db2969b62e
@ -114,9 +114,9 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>skyblock</artifactId>
|
||||
<version>2.3.30</version>
|
||||
<groupId>com.craftaro</groupId>
|
||||
<artifactId>FabledSkyBlock</artifactId>
|
||||
<version>3.0.0-b6-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -45,8 +45,8 @@ import com.craftaro.epichoppers.settings.Settings;
|
||||
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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,11 @@ package com.craftaro.epichoppers.containers.impl;
|
||||
|
||||
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 class FabledSkyBlockImpl implements IContainer {
|
||||
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 class FabledSkyBlockImpl implements IContainer {
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ import com.craftaro.epichoppers.hopper.HopperImpl;
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user