mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-28 19:39:06 +00:00
1.3.0.1
This commit is contained in:
@@ -33,7 +33,7 @@ dependencies {
|
||||
compileOnly('redis.clients:jedis:4.3.1')
|
||||
compileOnly('me.clip:placeholderapi:2.11.3')
|
||||
compileOnly('com.sk89q.worldguard:worldguard-bukkit:7.0.7')
|
||||
compileOnly('io.lumine:Mythic-Dist:5.0.3-SNAPSHOT')
|
||||
compileOnly('io.lumine:Mythic-Dist:5.2.1')
|
||||
compileOnly('dev.dejvokep:boosted-yaml:1.3')
|
||||
compileOnly('com.github.Zrips:Jobs:4.17.2')
|
||||
compileOnly('com.github.LoneDev6:api-itemsadder:3.2.3c')
|
||||
|
||||
@@ -26,17 +26,21 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class MythicMobsItemImpl implements ItemInterface {
|
||||
|
||||
private ItemExecutor itemManager;
|
||||
private MythicBukkit mythicBukkit;
|
||||
|
||||
public MythicMobsItemImpl() {
|
||||
this.mythicBukkit = MythicBukkit.inst();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ItemStack build(String material) {
|
||||
if (!material.startsWith("MythicMobs:")) return null;
|
||||
material = material.substring(11);
|
||||
if (itemManager == null) {
|
||||
this.itemManager = MythicBukkit.inst().getItemManager();
|
||||
if (mythicBukkit == null || mythicBukkit.isClosed()) {
|
||||
this.mythicBukkit = MythicBukkit.inst();
|
||||
}
|
||||
return itemManager.getItemStack(material);
|
||||
return mythicBukkit.getItemManager().getItemStack(material);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
|
||||
package net.momirealms.customfishing.integration.item;
|
||||
|
||||
import io.th0rgal.oraxen.OraxenPlugin;
|
||||
import io.th0rgal.oraxen.api.OraxenFurniture;
|
||||
import io.th0rgal.oraxen.api.OraxenItems;
|
||||
import io.th0rgal.oraxen.items.ItemBuilder;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.durability.DurabilityMechanic;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.durability.DurabilityMechanicFactory;
|
||||
import net.momirealms.customfishing.integration.ItemInterface;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -37,6 +41,11 @@ public class OraxenItemImpl implements ItemInterface {
|
||||
|
||||
@Override
|
||||
public boolean loseCustomDurability(ItemStack itemStack, Player player) {
|
||||
return false;
|
||||
DurabilityMechanic mechanic = (DurabilityMechanic) DurabilityMechanicFactory.get().getMechanic(OraxenItems.getIdByItem(itemStack));
|
||||
if (mechanic == null) {
|
||||
return false;
|
||||
}
|
||||
mechanic.changeDurability(itemStack, -1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user