mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
fix: CustomFishing integration
This commit is contained in:
@@ -80,7 +80,7 @@ allprojects {
|
||||
compileOnly("LibsDisguises:LibsDisguises:10.0.21") {
|
||||
exclude("org.spigotmc", "spigot")
|
||||
}
|
||||
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:2.0.6")
|
||||
compileOnly("com.github.Xiao-MoMi:Custom-Fishing:2.0.7")
|
||||
compileOnly("com.ticxo.modelengine:ModelEngine:R4.0.2")
|
||||
|
||||
// Lombok <3
|
||||
|
||||
@@ -2,13 +2,10 @@ package me.lojosho.hibiscuscommons.hooks.misc;
|
||||
|
||||
import me.lojosho.hibiscuscommons.api.events.HibiscusPluginFishEvent;
|
||||
import me.lojosho.hibiscuscommons.hooks.Hook;
|
||||
import net.momirealms.customfishing.api.event.FishingResultEvent;
|
||||
import net.momirealms.customfishing.api.mechanic.loot.LootType;
|
||||
import net.momirealms.customfishing.api.event.FishingLootSpawnEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class HookCustomFishing extends Hook {
|
||||
|
||||
@@ -17,10 +14,8 @@ public class HookCustomFishing extends Hook {
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerFish(FishingResultEvent event) {
|
||||
// TODO: Finish this once I get a firmer response on how this api is suppose to work
|
||||
if (!event.getLoot().getType().equals(LootType.ITEM)) return;
|
||||
HibiscusPluginFishEvent newEvent = new HibiscusPluginFishEvent(this, event.getPlayer(), new ItemStack(Material.ICE));
|
||||
public void onPlayerFish(FishingLootSpawnEvent event) {
|
||||
HibiscusPluginFishEvent newEvent = new HibiscusPluginFishEvent(this, event.getPlayer(), event.getItemStack());
|
||||
Bukkit.getPluginManager().callEvent(newEvent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user