Skip to content

Commit

Permalink
fixup imports and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Oribuin committed Nov 23, 2024
1 parent dd139c4 commit e9c8b81
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import org.jetbrains.annotations.NotNull;
import xyz.oribuin.fishing.api.config.Configurable;
import xyz.oribuin.fishing.api.event.FishEventHandler;
import xyz.oribuin.fishing.api.economy.Cost;
import xyz.oribuin.fishing.api.event.FishEventHandler;
import xyz.oribuin.fishing.totem.Totem;

import java.nio.file.Path;
Expand All @@ -30,6 +30,7 @@ public void applyTo(Totem totem, int level) {
* Get the cost of the upgrade for a specific level
*
* @param level The level of the upgrade
*
* @return The cost of the upgrade
*/
public abstract Cost costFor(int level);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import dev.rosewood.rosegarden.config.CommentedConfigurationSection;
import dev.rosewood.rosegarden.utils.StringPlaceholders;
import net.kyori.adventure.text.Component;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import xyz.oribuin.fishing.api.event.FishContext;
import xyz.oribuin.fishing.api.event.InitialFishCatchEvent;
import xyz.oribuin.fishing.augment.Augment;
import xyz.oribuin.fishing.fish.Fish;
import xyz.oribuin.fishing.fish.condition.Weather;
import xyz.oribuin.fishing.util.FishUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import dev.rosewood.rosegarden.config.CommentedConfigurationSection;
import dev.rosewood.rosegarden.utils.StringPlaceholders;
import net.kyori.adventure.text.Component;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import xyz.oribuin.fishing.api.event.FishContext;
import xyz.oribuin.fishing.api.event.InitialFishCatchEvent;
import xyz.oribuin.fishing.augment.Augment;
import xyz.oribuin.fishing.fish.Fish;
import xyz.oribuin.fishing.fish.condition.Weather;
import xyz.oribuin.fishing.util.FishUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.apache.commons.lang3.tuple.Pair;
import org.bukkit.World;
import org.bukkit.block.Biome;
import xyz.oribuin.fishing.fish.condition.impl.BoatCondition;

import java.util.ArrayList;
import java.util.List;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/xyz/oribuin/fishing/fish/condition/Time.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public enum Time {
DAY(6, 18),
NIGHT(18, 6),
SUNSET(18, 20),
SUNRISE(6, 8),;
SUNRISE(6, 8),
;

private final int lowerBound;
private final int upperBound;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/xyz/oribuin/fishing/listener/FishListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import xyz.oribuin.fishing.FishingPlugin;
import xyz.oribuin.fishing.api.event.FishCatchEvent;
import xyz.oribuin.fishing.fish.Fish;
import xyz.oribuin.fishing.manager.base.DataManager;
import xyz.oribuin.fishing.manager.FishManager;
import xyz.oribuin.fishing.manager.base.DataManager;
import xyz.oribuin.fishing.manager.base.LocaleManager;
import xyz.oribuin.fishing.storage.Fisher;

Expand Down Expand Up @@ -57,7 +57,7 @@ public void onFish(PlayerFishEvent event) {

// Tell the player they caught a fish
event.getPlayer().sendMessage("You caught a " + fish.displayName() + "!"); // TODO: Replace with locale message
// locale.sendMessage(event.getPlayer(), "fish-caught", StringPlaceholders.of("fish", fish.displayName()));
// locale.sendMessage(event.getPlayer(), "fish-caught", StringPlaceholders.of("fish", fish.displayName()));

// Give the fish to the player
PlayerInventory inv = event.getPlayer().getInventory();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/xyz/oribuin/fishing/manager/MenuManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import dev.rosewood.rosegarden.manager.Manager;
import xyz.oribuin.fishing.FishingPlugin;
import xyz.oribuin.fishing.api.gui.PluginMenu;
import xyz.oribuin.fishing.fish.Fish;
import xyz.oribuin.fishing.gui.ExampleMenu;
import xyz.oribuin.fishing.gui.StatsMenu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void sendMessages(CommandSender sender, String messageKey, StringPlacehol
* Get a string list from a locale key
*
* @param messageKey The key to get the message from
*
* @return The message
*/
public List<String> getLocaleMessages(String messageKey, StringPlaceholders placeholders) {
Expand All @@ -53,6 +54,7 @@ public List<String> getLocaleMessages(String messageKey, StringPlaceholders plac
* Get a list of strings from a locale key
*
* @param key The key to get the string list from
*
* @return The string list
*/
public List<String> getLocaleStringList(String key) {
Expand Down Expand Up @@ -114,6 +116,7 @@ public void sendCustomMessage(CommandSender sender, List<String> messages, Strin
* @param sender The CommandSender to send the message to
* @param message The message to send
* @param placeholders The placeholders to apply to the message
*
* @return The formatted string
*/
@NotNull
Expand All @@ -133,6 +136,7 @@ public String format(CommandSender sender, String message, StringPlaceholders pl
* @param sender The CommandSender to send the message to
* @param messages The messages to send
* @param placeholders The placeholders to apply to the messages
*
* @return The formatted string
*/
@NotNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
package xyz.oribuin.fishing.skill.impl;

import dev.rosewood.rosegarden.config.CommentedConfigurationSection;
import dev.rosewood.rosegarden.config.CommentedFileConfiguration;
import dev.rosewood.rosegarden.utils.StringPlaceholders;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import xyz.oribuin.fishing.api.event.FishCatchEvent;
import xyz.oribuin.fishing.api.event.FishContext;
import xyz.oribuin.fishing.api.event.FishGenerateEvent;
import xyz.oribuin.fishing.fish.Fish;
import xyz.oribuin.fishing.skill.Skill;
import xyz.oribuin.fishing.util.FishUtils;

Expand Down Expand Up @@ -100,7 +96,7 @@ public void onFishCatch(FishCatchEvent event, int level) {
/**
* The maximum combo a player can have based on their level
*
* @param level The level of the player
* @param level The level of the player
*
* @return The max combo
*/
Expand Down Expand Up @@ -174,8 +170,8 @@ public static class ComboData {
/**
* Holder for all relevant info about the player's current combo
*
* @param current The current combo level
* @param lastCatch The last time a player caught a fish
* @param current The current combo level
* @param lastCatch The last time a player caught a fish
*/
public ComboData(int current, long lastCatch) {
this.current = current;
Expand All @@ -200,6 +196,7 @@ public int current() {

/**
* Apply a new combo count to the player
*
* @param newCurrent The new combo count
*/
public void current(int newCurrent) {
Expand All @@ -215,6 +212,7 @@ public long lastCatch() {

/**
* Apply a new time to the player's last catch
*
* @param newLastCatch The new time
*/
public void lastCatch(long newLastCatch) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/xyz/oribuin/fishing/totem/Totem.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Fish;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.inventory.EquipmentSlot;
Expand Down Expand Up @@ -168,7 +167,6 @@ public void spawn(Location location) {
}



/**
* Save all the totem values to the container
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package xyz.oribuin.fishing.totem.upgrade.impl;

import dev.rosewood.rosegarden.config.CommentedConfigurationSection;
import dev.rosewood.rosegarden.config.CommentedFileConfiguration;
import org.jetbrains.annotations.NotNull;
import xyz.oribuin.fishing.FishingPlugin;
import xyz.oribuin.fishing.api.config.Configurable;
import xyz.oribuin.fishing.api.economy.Cost;
import xyz.oribuin.fishing.api.economy.Currency;
import xyz.oribuin.fishing.totem.Totem;
import xyz.oribuin.fishing.api.totem.TotemUpgrade;
import xyz.oribuin.fishing.totem.Totem;
import xyz.oribuin.fishing.util.FishUtils;

import java.util.HashMap;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/xyz/oribuin/fishing/util/ItemConstruct.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package xyz.oribuin.fishing.util;

import dev.rosewood.rosegarden.config.CommentedConfigurationSection;
import dev.rosewood.rosegarden.config.CommentedFileConfiguration;
import dev.rosewood.rosegarden.utils.HexUtils;
import dev.rosewood.rosegarden.utils.StringPlaceholders;
import org.bukkit.Color;
Expand All @@ -16,7 +15,6 @@
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import xyz.oribuin.fishing.api.config.Configurable;
import xyz.oribuin.fishing.util.nms.SkullUtils;

import java.util.ArrayList;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/xyz/oribuin/fishing/util/nms/SkullUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.Base64;
import java.util.UUID;

@SuppressWarnings({"unused", "deprecation"})
@SuppressWarnings({ "unused", "deprecation" })
public final class SkullUtils {

private static Method method_SkullMeta_setProfile;
Expand All @@ -32,9 +32,9 @@ private SkullUtils() {
@SuppressWarnings("deprecation")
public static void setSkullTexture(SkullMeta skullMeta, String texture) {
// TODO: Add head database support
// if (texture != null && texture.startsWith("hdb:") && Bukkit.getPluginManager().isPluginEnabled("HeadDatabase")) {
// texture = new HeadDatabaseAPI().getBase64(texture.substring(4));
// }
// if (texture != null && texture.startsWith("hdb:") && Bukkit.getPluginManager().isPluginEnabled("HeadDatabase")) {
// texture = new HeadDatabaseAPI().getBase64(texture.substring(4));
// }

if (texture == null || texture.isEmpty())
return;
Expand Down

0 comments on commit e9c8b81

Please sign in to comment.