Fixed missing plugin instance for Fishes
This commit is contained in:
@@ -19,9 +19,11 @@ public class Fishes extends AbstractConfig {
|
||||
|
||||
static Fishes config;
|
||||
private final Logger logger;
|
||||
private final FishingEvent fishingEvent;
|
||||
|
||||
Fishes(FishingEvent fishingEvent, Logger logger) {
|
||||
super(fishingEvent, "fishes.yml", logger);
|
||||
this.fishingEvent = fishingEvent;
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
@@ -133,6 +135,8 @@ public class Fishes extends AbstractConfig {
|
||||
}
|
||||
|
||||
FISH.add(new WaterFish(
|
||||
config.fishingEvent,
|
||||
config.logger,
|
||||
(float) fishSection.getDouble("min-length", 0),
|
||||
(float) fishSection.getDouble("max-length", 0),
|
||||
fishSection.getString("fish-name", "default name"),
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.alttd.fishingevent.fish;
|
||||
|
||||
import com.alttd.fishingevent.FishingEvent;
|
||||
import com.alttd.fishingevent.config.Fishes;
|
||||
import com.alttd.fishingevent.objects.Rarity;
|
||||
import com.alttd.fishingevent.util.Logger;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -18,7 +20,8 @@ public class WaterFish extends Fish {
|
||||
private final Rarity rarity;
|
||||
private final ItemStack itemStack;
|
||||
|
||||
public WaterFish(float minLength, float maxLength, String fishName, Rarity rarity, ItemStack itemStack) {
|
||||
public WaterFish(FishingEvent fishingEvent, Logger logger, float minLength, float maxLength, String fishName, Rarity rarity, ItemStack itemStack) {
|
||||
super(fishingEvent, logger);
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
this.fishName = fishName;
|
||||
|
||||
Reference in New Issue
Block a user