Reworked fish rarities to allow fishes to be caught in both water and lava and make the rarities easier to configure

This commit is contained in:
2023-09-25 02:00:30 +02:00
parent 9a8a38f4a4
commit fb511d27e2
14 changed files with 169 additions and 134 deletions
@@ -1,7 +1,6 @@
package com.alttd.fishingevent.fish;
import com.alttd.fishingevent.FishingEvent;
import com.alttd.fishingevent.config.Config;
import com.alttd.fishingevent.config.Fishes;
import com.alttd.fishingevent.objects.Rarity;
import com.alttd.fishingevent.util.Logger;
@@ -14,7 +13,6 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Optional;
@@ -84,13 +82,4 @@ public abstract class Fish {
return Optional.of(fishItem);
}
/**
* Gives back the amount of points for this type of fish with the specified length
* @param length The length to calculate points for
* @return points based on the length and rarity of this fish
*/
public int getPoints(float length) {
return Math.round(Config.RARITY_MULTIPLIERS.MULTIPLIER_MAP.get(getRarity()) * length);
}
}