9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2026-01-04 15:41:35 +00:00

use my TriConsumer

This commit is contained in:
XiaoMoMi
2024-06-16 05:09:12 +08:00
parent 919fde3f49
commit 53a6dc20bb
9 changed files with 21 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ import net.momirealms.customfishing.common.helper.AdventureHelper;
import net.momirealms.customfishing.common.util.ListUtils;
import net.momirealms.customfishing.common.util.Pair;
import net.momirealms.customfishing.common.util.RandomUtils;
import org.apache.logging.log4j.util.TriConsumer;
import net.momirealms.customfishing.common.util.TriConsumer;
import org.bukkit.Axis;
import org.bukkit.Color;
import org.bukkit.Particle;
@@ -41,7 +41,6 @@ import org.bukkit.event.EventPriority;
import java.io.File;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
public class BukkitConfigManager extends ConfigManager {

View File

@@ -105,11 +105,11 @@ public class BukkitFishingManager implements FishingManager, Listener {
private void selectState(PlayerFishEvent event) {
switch (event.getState()) {
case FISHING -> onCastRod(event);
case REEL_IN -> onReelIn(event);
case CAUGHT_ENTITY -> onCaughtEntity(event);
case CAUGHT_FISH -> onCaughtFish(event);
case BITE -> onBite(event);
case IN_GROUND -> onInGround(event);
// case REEL_IN -> onReelIn(event);
// case CAUGHT_ENTITY -> onCaughtEntity(event);
// case CAUGHT_FISH -> onCaughtFish(event);
// case BITE -> onBite(event);
// case IN_GROUND -> onInGround(event);
}
}
@@ -125,9 +125,6 @@ public class BukkitFishingManager implements FishingManager, Listener {
return;
}
Effect effect = Effect.newInstance();
RodCastEvent rodCastEvent = new RodCastEvent(event, gears);
Bukkit.getPluginManager().callEvent(rodCastEvent);
if (rodCastEvent.isCancelled()) {