Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ repositories {
maven("https://repo.auxilor.io/repository/maven-public/")
// EssentialsX
maven("https://repo.essentialsx.net/releases/")
// EvenMoreFish TODO fix when they stop publishing 20 MB fat jar (it breaks annotations and not limited to)
//maven("https://repo.codemc.io/repository/EvenMoreFish/")
// EvenMoreFish
maven("https://repo.codemc.io/repository/EvenMoreFish/")
// FancyNpcs
maven("https://repo.fancyinnovations.com/releases")
// MMOItems, MythicLib
Expand Down Expand Up @@ -99,8 +99,8 @@ dependencies {
compileOnlyPlugin("com.willfp:libreforge:4.21.1")
// EssentialsX
compileOnlyPlugin("net.essentialsx:EssentialsX:2.19.7")
// EvenMoreFish TODO fix when they stop publishing 20 MB fat jar (it breaks annotations and not limited to)
//compileOnlyPlugin("com.oheers.evenmorefish:even-more-fish-plugin:2.0.7")
// EvenMoreFish
compileOnlyPlugin("com.oheers.evenmorefish:even-more-fish-api:2.1.2")
// FancyNpcs
compileOnlyPlugin("de.oliver:FancyNpcs:2.5.1")
// IridiumSkyblock TODO fix whenever repo is up
Expand Down
Binary file removed bukkit/libs/even-more-fish-plugin-2.0.7.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
try {
ignoreUpdates = new File(this.getDataFolder() + File.separator + "stfuQuestsUpdate").exists();
} catch (Throwable ignored) { }
this.updater = new Updater(this, super.getDescription().getVersion(), !ignoreUpdates);

Check warning on line 394 in bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, temurin, 25)

[deprecation] getDescription() in JavaPlugin has been deprecated
if (!ignoreUpdates) {
serverScheduler.doAsync(() -> updater.check());
}
Expand Down Expand Up @@ -431,7 +431,7 @@
String className = questsConfig.getString("options.playerblocktracker-class-name", "com.gestankbratwurst.playerblocktracker.PlayerBlockTracker");

//noinspection unchecked
Class<? extends Plugin> pluginClazz = (Class<? extends Plugin>) Class.forName(className);

Check warning on line 434 in bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, temurin, 25)

[unchecked] unchecked cast
Method isTrackedMethod = pluginClazz.getMethod("isTracked", Block.class);
this.playerBlockTrackerHook = new PlayerBlockTrackerHook(pluginClazz, isTrackedMethod);
} catch (ClassCastException | ClassNotFoundException | NoSuchMethodException ignored) {
Expand Down Expand Up @@ -507,8 +507,8 @@
taskTypeManager.registerTaskType(() -> new EcoMobsKillingTaskType(this), () -> CompatUtils.isPluginEnabled("EcoMobs"));
taskTypeManager.registerTaskType(() -> new EssentialsBalanceTaskType(this), () -> CompatUtils.isPluginEnabled("Essentials"));
taskTypeManager.registerTaskType(() -> new EssentialsMoneyEarnTaskType(this), () -> CompatUtils.isPluginEnabled("Essentials"));
taskTypeManager.registerTaskType(() -> new EvenMoreFishFishingTaskType(this), () -> CompatUtils.isPluginEnabled("EvenMoreFish")); // not tested
taskTypeManager.registerTaskType(() -> new EvenMoreFishHuntingTaskType(this), () -> CompatUtils.isPluginEnabled("EvenMoreFish")); // not tested
taskTypeManager.registerTaskType(() -> new EvenMoreFishFishingTaskType(this), () -> CompatUtils.isPluginEnabled("EvenMoreFish") && CompatUtils.classExists("com.oheers.fish.api.events.EMFFishCaughtEvent")); // not tested
taskTypeManager.registerTaskType(() -> new EvenMoreFishHuntingTaskType(this), () -> CompatUtils.isPluginEnabled("EvenMoreFish") && CompatUtils.classExists("com.oheers.fish.api.events.EMFFishHuntEvent")); // not tested
taskTypeManager.registerTaskType(() -> new FabledSkyBlockLevelTaskType(this), () -> CompatUtils.isPluginEnabled("FabledSkyBlock")); // not tested
taskTypeManager.registerTaskType(() -> new FancyNpcsDeliverTaskType(this), () -> CompatUtils.isPluginEnabled("FancyNpcs"));
taskTypeManager.registerTaskType(() -> new FancyNpcsInteractTaskType(this), () -> CompatUtils.isPluginEnabled("FancyNpcs"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.leonardobishop.quests.bukkit.item;

import com.oheers.fish.EvenMoreFish;
import com.oheers.fish.fishing.items.Fish;
import com.oheers.fish.api.fishing.items.AbstractFishManager;
import com.oheers.fish.api.fishing.items.IFish;
import org.bukkit.inventory.ItemStack;

public class EvenMoreFishQuestItem extends QuestItem {
Expand All @@ -17,17 +17,13 @@ public EvenMoreFishQuestItem(final String id, final String rarityName, final Str

@Override
public ItemStack getItemStack() {
final Fish fish = EvenMoreFish.getInstance()
.getApi()
.getFish(this.rarityName, this.fishName);
final IFish fish = AbstractFishManager.getInstance().getFish(this.rarityName, this.fishName);
return fish != null ? fish.give() : null;
}

@Override
public boolean compareItemStack(final ItemStack other, final boolean exactMatch) {
final Fish fish = EvenMoreFish.getInstance()
.getApi()
.getFish(other);
final IFish fish = AbstractFishManager.getInstance().getFish(other);
return fish != null
&& fish.getRarity().getId().equals(this.rarityName)
&& fish.getName().equals(this.fishName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.leonardobishop.quests.common.player.questprogressfile.TaskProgress;
import com.leonardobishop.quests.common.quest.Quest;
import com.leonardobishop.quests.common.quest.Task;
import com.oheers.fish.fishing.items.Fish;
import com.oheers.fish.api.fishing.items.IFish;
import org.bukkit.entity.Player;

public abstract class EvenMoreFishFishTaskType extends BukkitTaskType {
Expand All @@ -25,7 +25,7 @@ public EvenMoreFishFishTaskType(String type, String author, String description,
this.addConfigValidator(TaskUtils.useEnumConfigValidator(this, TaskUtils.StringMatchMode.class, "rarity-match-mode", null, false));
}

protected void handle(Player player, Fish fish) {
protected void handle(Player player, IFish fish) {
if (player.hasMetadata("NPC")) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.leonardobishop.quests.bukkit.BukkitQuestsPlugin;
import com.leonardobishop.quests.bukkit.util.TaskUtils;
import com.oheers.fish.api.EMFFishEvent;
import com.oheers.fish.api.events.EMFFishCaughtEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

Expand All @@ -13,7 +13,7 @@ public EvenMoreFishFishingTaskType(BukkitQuestsPlugin plugin) {
}

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEMFFish(EMFFishEvent event) {
public void onEMFFish(EMFFishCaughtEvent event) {
this.handle(event.getPlayer(), event.getFish());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.leonardobishop.quests.bukkit.BukkitQuestsPlugin;
import com.leonardobishop.quests.bukkit.util.TaskUtils;
import com.oheers.fish.api.EMFFishHuntEvent;
import com.oheers.fish.api.events.EMFFishHuntEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

Expand Down
Loading