Skip to content

Commit

Permalink
Update to CustomFishing 2.2.0 for item resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSzabo committed Jul 15, 2024
1 parent 90c4eff commit 433f6e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
}

group = "gg.auroramc"
version = "1.5.0"
version = "1.5.1"

java {
sourceCompatibility = JavaVersion.VERSION_21
Expand Down Expand Up @@ -55,7 +55,7 @@ dependencies {
compileOnly("com.github.angeschossen:WildRegenerationAPI:1.5.0")
compileOnly("net.luckperms:api:5.4")
compileOnly("io.lumine:Mythic-Dist:5.6.1")
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:2.1.2")
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:2.2.0")
compileOnly("io.lumine:MythicLib-dist:1.6.2-SNAPSHOT")
compileOnly("net.Indyuce:MMOItems-API:6.10-SNAPSHOT")
compileOnly("io.th0rgal:oraxen:2.0-SNAPSHOT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@

import gg.auroramc.aurora.api.item.ItemResolver;
import gg.auroramc.aurora.api.item.TypeId;
import net.momirealms.customfishing.api.CustomFishingPlugin;
import net.momirealms.customfishing.api.BukkitCustomFishingPlugin;
import net.momirealms.customfishing.api.mechanic.context.Context;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

public class CustomFishingItemResolver implements ItemResolver {
@Override
public boolean matches(ItemStack item) {
return CustomFishingPlugin.get().getItemManager().isCustomFishingItem(item);
return BukkitCustomFishingPlugin.getInstance().getItemManager().getCustomFishingItemID(item) != null;
}

@Override
public TypeId resolveId(ItemStack item) {
return new TypeId("customfishing", CustomFishingPlugin.get().getItemManager().getCustomFishingItemID(item));
return new TypeId("customfishing", BukkitCustomFishingPlugin.getInstance().getItemManager().getCustomFishingItemID(item));
}

@Override
public ItemStack resolveItem(String id, Player player) {
return CustomFishingPlugin.get().getItemManager().build(player, "item", id);
return BukkitCustomFishingPlugin.getInstance().getItemManager().buildAny(Context.player(player), "CustomFishing:" + id);
}
}

0 comments on commit 433f6e3

Please sign in to comment.