mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2026-01-06 15:51:50 +00:00
use my TriConsumer
This commit is contained in:
@@ -10,6 +10,7 @@ import net.momirealms.customfishing.api.BukkitCustomFishingPlugin;
|
||||
import net.momirealms.customfishing.api.mechanic.config.function.*;
|
||||
import net.momirealms.customfishing.api.mechanic.context.Context;
|
||||
import net.momirealms.customfishing.api.mechanic.effect.EffectModifier;
|
||||
import net.momirealms.customfishing.api.mechanic.effect.LootBaseEffect;
|
||||
import net.momirealms.customfishing.api.mechanic.entity.EntityConfig;
|
||||
import net.momirealms.customfishing.api.mechanic.event.EventCarrier;
|
||||
import net.momirealms.customfishing.api.mechanic.hook.HookConfig;
|
||||
@@ -190,6 +191,10 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
||||
registerNodeFunction(nodes, new EventParserFunction(function));
|
||||
}
|
||||
|
||||
public void registerBaseEffectParser(Function<Object, Consumer<LootBaseEffect.Builder>> function, String... nodes) {
|
||||
registerNodeFunction(nodes, new BaseEffectParserFunction(function));
|
||||
}
|
||||
|
||||
public void unregisterNodeFunction(String... nodes) {
|
||||
Map<String, Node<ConfigParserFunction>> functionMap = formatFunctions;
|
||||
for (int i = 0; i < nodes.length; i++) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.momirealms.customfishing.api.mechanic.effect;
|
||||
import net.momirealms.customfishing.api.mechanic.context.Context;
|
||||
import net.momirealms.customfishing.api.mechanic.item.MechanicType;
|
||||
import net.momirealms.customfishing.api.mechanic.requirement.Requirement;
|
||||
import org.apache.logging.log4j.util.TriConsumer;
|
||||
import net.momirealms.customfishing.common.util.TriConsumer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.momirealms.customfishing.api.mechanic.effect;
|
||||
import net.momirealms.customfishing.api.mechanic.context.Context;
|
||||
import net.momirealms.customfishing.api.mechanic.item.MechanicType;
|
||||
import net.momirealms.customfishing.api.mechanic.requirement.Requirement;
|
||||
import org.apache.logging.log4j.util.TriConsumer;
|
||||
import net.momirealms.customfishing.common.util.TriConsumer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.momirealms.customfishing.api.mechanic.effect.EffectModifier;
|
||||
import net.momirealms.customfishing.api.mechanic.fishing.hook.HookMechanic;
|
||||
import net.momirealms.customfishing.api.mechanic.loot.Loot;
|
||||
import net.momirealms.customfishing.common.plugin.scheduler.SchedulerTask;
|
||||
import org.apache.logging.log4j.util.TriConsumer;
|
||||
import net.momirealms.customfishing.common.util.TriConsumer;
|
||||
import org.bukkit.entity.FishHook;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user