diff --git a/eco-api/src/main/java/com/willfp/eco/core/PluginDependent.java b/eco-api/src/main/java/com/willfp/eco/core/PluginDependent.java
deleted file mode 100644
index afbc4620..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/PluginDependent.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.willfp.eco.core;
-
-import org.jetbrains.annotations.NotNull;
-
-/**
- * Quick DI class to manage passing eco plugins.
- *
- * Basically just a quick bit of laziness if you can't be bothered to add a private field
- * and a protected getter, don't use this in kotlin as you can just specify
- * {@code
- * private val plugin: EcoPlugin
- * }
- * in the constructor.
- *
- * @param The eco plugin type.
- * @deprecated Leaky inheritance, shouldn't exist.
- */
-@Deprecated(since = "6.43.0", forRemoval = true)
-public abstract class PluginDependent {
- /**
- * The {@link EcoPlugin} that is stored.
- */
- @NotNull
- private final T plugin;
-
- /**
- * Pass an {@link EcoPlugin} in order to interface with it.
- *
- * @param plugin The plugin to manage.
- */
- protected PluginDependent(@NotNull final T plugin) {
- this.plugin = plugin;
- }
-
- /**
- * Get the plugin.
- *
- * @return The plugin.
- */
- @NotNull
- protected T getPlugin() {
- return this.plugin;
- }
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java b/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java
index eeee7984..d31bbee5 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/Prerequisite.java
@@ -1,6 +1,5 @@
package com.willfp.eco.core;
-import com.willfp.eco.core.integrations.economy.EconomyManager;
import com.willfp.eco.core.proxy.ProxyConstants;
import com.willfp.eco.util.ClassUtils;
import org.jetbrains.annotations.NotNull;
@@ -38,17 +37,6 @@ public class Prerequisite {
"Requires server to have ProtocolLib"
);
- /**
- * Requires the server to have vault installed.
- *
- * @deprecated Use {@link EconomyManager#hasRegistrations()} instead.
- */
- @Deprecated(forRemoval = true)
- public static final Prerequisite HAS_VAULT = new Prerequisite(
- () -> ClassUtils.exists("net.milkbowl.vault.economy.Economy"),
- "Requires server to have vault"
- );
-
/**
* Requires the server to be running 1.19.
*/
@@ -65,17 +53,6 @@ public class Prerequisite {
"Requires server to be running 1.18+"
);
- /**
- * Requires the server to be running 1.17.
- *
- * @deprecated eco no longer supports versions before 1.17.
- */
- @Deprecated(since = "6.25.2", forRemoval = true)
- public static final Prerequisite HAS_1_17 = new Prerequisite(
- () -> ProxyConstants.NMS_VERSION.contains("17") || HAS_1_18.isMet(),
- "Requires server to be running 1.17+"
- );
-
/**
* Requires the server to be running an implementation of BungeeCord.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/command/impl/DelegatedBukkitCommand.java b/eco-api/src/main/java/com/willfp/eco/core/command/impl/DelegatedBukkitCommand.java
index 6b11fb6c..cc535728 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/command/impl/DelegatedBukkitCommand.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/command/impl/DelegatedBukkitCommand.java
@@ -14,7 +14,7 @@ import java.util.List;
*
* @deprecated Internal command implementations have been removed from the API.
*/
-@Deprecated(forRemoval = true, since = "6.49.0")
+@Deprecated(since = "6.49.0", forRemoval = true)
public final class DelegatedBukkitCommand extends Command implements TabCompleter, PluginIdentifiableCommand {
/**
* The delegate command.
diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/TransientConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/TransientConfig.java
index 7a0483c1..ae9a2841 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/config/TransientConfig.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/config/TransientConfig.java
@@ -54,17 +54,6 @@ public class TransientConfig extends ConfigWrapper {
)) : new TransientConfig());
}
- /**
- * Load a file to a config.
- *
- * @param file The File.
- * @deprecated Specify the config type to prevent bugs.
- */
- @Deprecated(since = "6.30.0", forRemoval = true)
- public TransientConfig(@Nullable final File file) {
- this(file, ConfigType.YAML);
- }
-
/**
* Load a file to a config.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java
index 1e3c0d10..e9ee7f64 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/Config.java
@@ -30,16 +30,6 @@ import java.util.Set;
*/
@SuppressWarnings("unused")
public interface Config extends Cloneable, PlaceholderInjectable {
- /**
- * Clears cache.
- *
- * Configs no longer have caches as they have in previous versions.
- */
- @Deprecated(since = "6.31.1", forRemoval = true)
- default void clearCache() {
- // Do nothing.
- }
-
/**
* Convert the config into readable text.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java
index 7259a9b9..3f19337a 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/config/interfaces/LoadableConfig.java
@@ -2,7 +2,6 @@ package com.willfp.eco.core.config.interfaces;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.IOException;
@@ -44,21 +43,6 @@ public interface LoadableConfig extends Config {
*/
String getName();
- /**
- * Get bukkit {@link YamlConfiguration}.
- *
- * This used to represent the underlying config, but since 6.30.0 configs use
- * their own implementations internally, without relying on bukkit.
- *
- * @return The config, or null if config is not yaml-based.
- * @deprecated Use toBukkit() instead.
- */
- @Nullable
- @Deprecated(since = "6.30.0", forRemoval = true)
- default YamlConfiguration getBukkitHandle() {
- return this.toBukkit();
- }
-
/**
* Convert the config to a bukkit {@link YamlConfiguration}.
*/
diff --git a/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java
index 42b309e0..b904964f 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/config/wrapper/ConfigWrapper.java
@@ -19,7 +19,7 @@ import java.util.Set;
*
* @param The type of the handle.
*/
-@SuppressWarnings({"MethodDoesntCallSuperMethod", "removal"})
+@SuppressWarnings("MethodDoesntCallSuperMethod")
public abstract class ConfigWrapper implements Config {
/**
* Configs from eco have an internal implementation,
@@ -42,12 +42,6 @@ public abstract class ConfigWrapper implements Config {
this.handle = handle;
}
- @Override
- @Deprecated(since = "6.31.1", forRemoval = true)
- public void clearCache() {
- handle.clearCache();
- }
-
@Override
public String toPlaintext() {
return handle.toPlaintext();
diff --git a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java
index 40ad47b7..44ce98c9 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java
@@ -82,44 +82,6 @@ public final class PersistentDataKey {
return this.type;
}
- /**
- * In older eco versions, keys would have to be categorized in order
- * to register the columns in the MySQL database. This is no longer needed.
- *
- * Old description is below:
- *
- * Categorize key as a server key, will register new column to MySQL
- * database immediately rather than waiting for auto-categorization.
- *
- * This will improve performance.
- *
- * @return The key.
- * @deprecated Not required since the new MySQL data handler was introduced.
- */
- @Deprecated(since = "6.40.0", forRemoval = true)
- public PersistentDataKey server() {
- return this;
- }
-
- /**
- * In older eco versions, keys would have to be categorized in order
- * to register the columns in the MySQL database. This is no longer needed.
- *
- * Old description is below:
- *
- * Categorize key as a player key, will register new column to MySQL
- * database immediately rather than waiting for auto-categorization.
- *
- * This will improve performance.
- *
- * @return The key.
- * @deprecated Not required since the new MySQL data handler was introduced.
- */
- @Deprecated(since = "6.40.0", forRemoval = true)
- public PersistentDataKey player() {
- return this;
- }
-
/**
* Get all persistent data keys.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKeyType.java b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKeyType.java
index fe996f65..6ce8c500 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKeyType.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKeyType.java
@@ -22,55 +22,38 @@ public final class PersistentDataKeyType {
/**
* String.
*/
- public static final PersistentDataKeyType STRING = new PersistentDataKeyType<>(String.class, "STRING");
+ public static final PersistentDataKeyType STRING = new PersistentDataKeyType<>("STRING");
/**
* Boolean.
*/
- public static final PersistentDataKeyType BOOLEAN = new PersistentDataKeyType<>(Boolean.class, "BOOLEAN");
+ public static final PersistentDataKeyType BOOLEAN = new PersistentDataKeyType<>("BOOLEAN");
/**
* Int.
*/
- public static final PersistentDataKeyType INT = new PersistentDataKeyType<>(Integer.class, "INT");
+ public static final PersistentDataKeyType INT = new PersistentDataKeyType<>("INT");
/**
* Double.
*/
- public static final PersistentDataKeyType DOUBLE = new PersistentDataKeyType<>(Double.class, "DOUBLE");
+ public static final PersistentDataKeyType DOUBLE = new PersistentDataKeyType<>("DOUBLE");
/**
* String List.
*/
- public static final PersistentDataKeyType> STRING_LIST = new PersistentDataKeyType<>(null, "STRING_LIST");
+ public static final PersistentDataKeyType> STRING_LIST = new PersistentDataKeyType<>("STRING_LIST");
/**
* Config.
*/
- public static final PersistentDataKeyType CONFIG = new PersistentDataKeyType<>(Config.class, "CONFIG");
-
- /**
- * The class of the type.
- */
- private final Class typeClass;
+ public static final PersistentDataKeyType CONFIG = new PersistentDataKeyType<>("CONFIG");
/**
* The name of the key type.
*/
private final String name;
- /**
- * Get the class of the type.
- *
- * @return The class.
- * @deprecated String list type will return null.
- */
- @Deprecated(since = "6.36.0", forRemoval = true)
- @Nullable
- public Class getTypeClass() {
- return typeClass;
- }
-
/**
* Get the name of the key type.
*
@@ -83,14 +66,11 @@ public final class PersistentDataKeyType {
/**
* Create new PersistentDataKeyType.
*
- * @param typeClass The type class.
* @param name The name.
*/
- private PersistentDataKeyType(@Nullable final Class typeClass,
- @NotNull final String name) {
+ private PersistentDataKeyType(@NotNull final String name) {
VALUES.add(this);
- this.typeClass = typeClass;
this.name = name;
}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/display/DisplayModule.java b/eco-api/src/main/java/com/willfp/eco/core/display/DisplayModule.java
index 9eb14a74..8e97b49c 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/display/DisplayModule.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/display/DisplayModule.java
@@ -112,23 +112,6 @@ public abstract class DisplayModule {
return this.getPlugin().getName();
}
- /**
- * Get the display priority.
- *
- * @return The priority.
- * @deprecated Use getWeight instead.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- public DisplayPriority getPriority() {
- return switch (this.weight) {
- case 100 -> DisplayPriority.LOWEST;
- case 200 -> DisplayPriority.LOW;
- case 300 -> DisplayPriority.HIGH;
- case 400 -> DisplayPriority.HIGHEST;
- default -> DisplayPriority.CUSTOM;
- };
- }
-
/**
* Get the display weight.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/display/DisplayPriority.java b/eco-api/src/main/java/com/willfp/eco/core/display/DisplayPriority.java
index aa41276c..d8193845 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/display/DisplayPriority.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/display/DisplayPriority.java
@@ -6,7 +6,10 @@ package com.willfp.eco.core.display;
public enum DisplayPriority {
/**
* Custom weight.
+ *
+ * @deprecated Will never be used.
*/
+ @Deprecated(since = "6.53.0", forRemoval = true)
CUSTOM(250),
/**
diff --git a/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java b/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java
index 2b6c2c96..2131d94b 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java
@@ -20,18 +20,6 @@ import java.util.Set;
* FastItemStack contains methods to modify and read items faster than in default bukkit.
*/
public interface FastItemStack extends PersistentDataHolder {
- /**
- * Get all enchantments on an item.
- *
- * @param checkStored If stored NBT should also be checked.
- * @return A map of all enchantments.
- * @deprecated Poorly named method. Use getEnchants instead.
- */
- @Deprecated(since = "6.24.0", forRemoval = true)
- default Map getEnchantmentsOnItem(boolean checkStored) {
- return getEnchants(checkStored);
- }
-
/**
* Get all enchantments on an item.
* Does not account for stored enchants.
@@ -51,33 +39,6 @@ public interface FastItemStack extends PersistentDataHolder {
@NotNull
Map getEnchants(boolean checkStored);
- /**
- * Get the level of an enchantment on an item.
- *
- * @param enchantment The enchantment.
- * @return The enchantment level, or 0 if not found.
- * @deprecated Poorly named method. Use getEnchantmentLevel instead.
- */
- @Deprecated(since = "6.34.0", forRemoval = true)
- default int getLevelOnItem(@NotNull Enchantment enchantment) {
- return getEnchantmentLevel(enchantment, false);
- }
-
- /**
- * Get the level of an enchantment on an item.
- *
- * @param enchantment The enchantment.
- * @param checkStored If the stored NBT should also be checked.
- * @return The enchantment level, or 0 if not found.
- * @deprecated Poorly named method. Use getEnchantmentLevel instead.
- */
- @Deprecated(since = "6.34.0", forRemoval = true)
- @SuppressWarnings("DeprecatedIsStillUsed")
- default int getLevelOnItem(@NotNull Enchantment enchantment,
- boolean checkStored) {
- return getEnchantmentLevel(enchantment, checkStored);
- }
-
/**
* Get the level of an enchantment.
*
@@ -85,7 +46,7 @@ public interface FastItemStack extends PersistentDataHolder {
* @return The enchantment level, or 0 if not found.
*/
default int getEnchantmentLevel(@NotNull Enchantment enchantment) {
- return getLevelOnItem(enchantment, false);
+ return getEnchantmentLevel(enchantment, false);
}
/**
diff --git a/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java b/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java
index 4956879d..c150784d 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java
@@ -3,20 +3,15 @@ package com.willfp.eco.core.gui.menu;
import com.willfp.eco.core.Eco;
import com.willfp.eco.core.gui.page.Page;
import com.willfp.eco.core.gui.slot.Slot;
-import com.willfp.eco.util.NamespacedKeyUtils;
-import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
-import org.bukkit.persistence.PersistentDataType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-import java.util.Set;
-import java.util.stream.Collectors;
/**
* GUI version of {@link Inventory}.
@@ -240,58 +235,6 @@ public interface Menu {
return Objects.requireNonNullElse(pageState, Integer.MAX_VALUE);
}
- /**
- * Write data.
- *
- * @param player The player.
- * @param key The key.
- * @param type The type.
- * @param value The value.
- * @param The type.
- * @param The type.
- * @deprecated Use addState instead.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- default void writeData(@NotNull final Player player,
- @NotNull final NamespacedKey key,
- @NotNull final PersistentDataType type,
- @NotNull final Z value) {
- this.setState(player, key.toString(), value);
- }
-
- /**
- * Read data.
- *
- * @param player The player.
- * @param key The key.
- * @param type The type.
- * @param The type.
- * @param The type.
- * @return The data.
- * @deprecated Use getState instead.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- default @Nullable T readData(@NotNull final Player player,
- @NotNull final NamespacedKey key,
- @NotNull final PersistentDataType type) {
- return this.getState(player, key.toString());
- }
-
- /**
- * Get all data keys for a player.
- *
- * @param player The player.
- * @return The keys.
- * @deprecated Use getState instead.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- default Set getKeys(@NotNull final Player player) {
- return this.getState(player).keySet().stream()
- .map(NamespacedKeyUtils::fromStringOrNull)
- .filter(Objects::nonNull)
- .collect(Collectors.toSet());
- }
-
/**
* Create a builder with a given amount of rows.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/gui/slot/CustomSlot.java b/eco-api/src/main/java/com/willfp/eco/core/gui/slot/CustomSlot.java
index 1cb53038..61f8d962 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/gui/slot/CustomSlot.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/gui/slot/CustomSlot.java
@@ -90,17 +90,4 @@ public abstract class CustomSlot implements Slot {
public final Slot getSlotAt(int row, int column) {
return Slot.super.getSlotAt(row, column);
}
-
- /**
- * Get the delegate slot.
- *
- * This is not required to add the slot to a menu, but is instead used internally.
- *
- * @return The slot.
- * @deprecated Replaced with {@link Slot#getActionableSlot(Player, Menu)}
- */
- @Deprecated(since = "6.43.0", forRemoval = true)
- public Slot getDelegate() {
- return this.delegate;
- }
}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/gui/slot/Slot.java b/eco-api/src/main/java/com/willfp/eco/core/gui/slot/Slot.java
index 9a25750c..9471aaf2 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/gui/slot/Slot.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/gui/slot/Slot.java
@@ -158,27 +158,4 @@ public interface Slot extends GUIComponent {
static SlotBuilder builder(@NotNull final SlotProvider provider) {
return Eco.get().createSlotBuilder(provider);
}
-
- /**
- * If the slot is not captive for a player.
- *
- * @param player The player.
- * @return If not captive for the player.
- * @deprecated Captivity is now reactive, this method can produce incorrect results.
- */
- @Deprecated(since = "6.43.0", forRemoval = true)
- default boolean isNotCaptiveFor(@NotNull Player player) {
- return false;
- }
-
- /**
- * If the slot is captive. (Can items be placed in it).
- *
- * @return If captive.
- * @deprecated Captivity is now reactive, this method can produce incorrect results.
- */
- @Deprecated(since = "6.43.0", forRemoval = true)
- default boolean isCaptive() {
- return false;
- }
}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/afk/AFKWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/afk/AFKWrapper.java
deleted file mode 100644
index f79498b5..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/afk/AFKWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.afk;
-
-/**
- * Wrapper class for afk integrations.
- *
- * @deprecated Use AFKIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface AFKWrapper extends AFKIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatManager.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatManager.java
index 5d3433a7..e94738d6 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatManager.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatManager.java
@@ -1,7 +1,6 @@
package com.willfp.eco.core.integrations.anticheat;
import com.willfp.eco.core.Eco;
-import com.willfp.eco.core.EcoPlugin;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.jetbrains.annotations.NotNull;
@@ -18,19 +17,6 @@ public final class AnticheatManager {
*/
private static final Set ANTICHEATS = new HashSet<>();
- /**
- * Register a new anticheat.
- *
- * @param plugin The plugin.
- * @param anticheat The anticheat to register.
- * @deprecated Don't pass instance of eco.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- public static void register(@NotNull final EcoPlugin plugin,
- @NotNull final AnticheatIntegration anticheat) {
- register(anticheat);
- }
-
/**
* Register a new anticheat.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatWrapper.java
deleted file mode 100644
index 8b4a21b8..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/anticheat/AnticheatWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.anticheat;
-
-/**
- * Wrapper class for anticheat integrations.
- *
- * @deprecated Use AnticheatIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface AnticheatWrapper extends AnticheatIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/antigrief/AntigriefWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/antigrief/AntigriefWrapper.java
deleted file mode 100644
index 2c8787a0..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/antigrief/AntigriefWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.antigrief;
-
-/**
- * Wrapper class for antigrief integrations.
- *
- * @deprecated Use AntigriefIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface AntigriefWrapper extends AntigriefIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/customentities/CustomEntitiesWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/customentities/CustomEntitiesWrapper.java
deleted file mode 100644
index c9debaf0..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/customentities/CustomEntitiesWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.customentities;
-
-/**
- * Wrapper class for custom item integrations.
- *
- * @deprecated Use CustomEntitiesIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface CustomEntitiesWrapper extends CustomEntitiesIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/customitems/CustomItemsWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/customitems/CustomItemsWrapper.java
deleted file mode 100644
index bd5fe18a..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/customitems/CustomItemsWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.customitems;
-
-/**
- * Wrapper class for custom item integrations.
- *
- * @deprecated Use CustomItemsIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface CustomItemsWrapper extends CustomItemsIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/economy/EconomyWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/economy/EconomyWrapper.java
deleted file mode 100644
index af386038..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/economy/EconomyWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.economy;
-
-/**
- * Wrapper class for economy integrations.
- *
- * @deprecated Use EconomyIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface EconomyWrapper extends EconomyIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/hologram/HologramWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/hologram/HologramWrapper.java
deleted file mode 100644
index a1ce4999..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/hologram/HologramWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.hologram;
-
-/**
- * Wrapper class for hologram integrations.
- *
- * @deprecated Use HologramIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface HologramWrapper extends HologramIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/mcmmo/McmmoWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/mcmmo/McmmoWrapper.java
deleted file mode 100644
index 665c0910..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/mcmmo/McmmoWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.mcmmo;
-
-/**
- * Wrapper class for mcmmo integrations.
- *
- * @deprecated Use McmmoIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface McmmoWrapper extends McmmoIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderEntry.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderEntry.java
deleted file mode 100644
index 7f4cbb60..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderEntry.java
+++ /dev/null
@@ -1,190 +0,0 @@
-package com.willfp.eco.core.integrations.placeholder;
-
-import com.willfp.eco.core.Eco;
-import com.willfp.eco.core.EcoPlugin;
-import com.willfp.eco.core.placeholder.Placeholder;
-import com.willfp.eco.core.placeholder.PlayerPlaceholder;
-import com.willfp.eco.core.placeholder.PlayerlessPlaceholder;
-import org.apache.commons.lang.Validate;
-import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.Objects;
-import java.util.function.Function;
-
-/**
- * A placeholder entry is a placeholder in and of itself.
- *
- * It should be fairly straightforward.
- *
- * @deprecated Confusing functionality with inconsistent nullability and poor naming.
- */
-@Deprecated(since = "6.28.0", forRemoval = true)
-public class PlaceholderEntry {
- /**
- * The name of the placeholder, used in lookups.
- */
- private final String identifier;
-
- /**
- * The lambda to retrieve the output of the placeholder given a player.
- */
- private final Function function;
-
- /**
- * If the placeholder requires a player to lookup.
- */
- private final boolean requiresPlayer;
-
- /**
- * The plugin for the placeholder.
- */
- @Nullable
- private final EcoPlugin plugin;
-
- /**
- * Create a placeholder entry that doesn't require a player.
- *
- * @param identifier The identifier of the placeholder.
- * @param function A lambda to get the result of the placeholder given a player.
- * @deprecated Specify a plugin.
- */
- @Deprecated
- public PlaceholderEntry(@NotNull final String identifier,
- @NotNull final Function function) {
- this(identifier, function, false);
- }
-
- /**
- * Create a placeholder entry that may require a player.
- *
- * @param identifier The identifier of the placeholder.
- * @param function A lambda to get the result of the placeholder.
- * @param requiresPlayer If the placeholder requires a player.
- * @deprecated Specify a plugin.
- */
- @Deprecated
- public PlaceholderEntry(@NotNull final String identifier,
- @NotNull final Function function,
- final boolean requiresPlayer) {
- this(null, identifier, function, requiresPlayer);
- }
-
- /**
- * Create a placeholder entry that doesn't require a player.
- *
- * @param plugin The plugin for the placeholder.
- * @param identifier The identifier of the placeholder.
- * @param function A lambda to get the result of the placeholder given a player.
- */
- public PlaceholderEntry(@Nullable final EcoPlugin plugin,
- @NotNull final String identifier,
- @NotNull final Function function) {
- this(plugin, identifier, function, false);
- }
-
- /**
- * Create a placeholder entry that may require a player.
- *
- * @param plugin The plugin for the placeholder.
- * @param identifier The identifier of the placeholder.
- * @param function A lambda to get the result of the placeholder.
- * @param requiresPlayer If the placeholder requires a player.
- */
- public PlaceholderEntry(@Nullable final EcoPlugin plugin,
- @NotNull final String identifier,
- @NotNull final Function function,
- final boolean requiresPlayer) {
- this.plugin = plugin;
- this.identifier = identifier;
- this.function = function;
- this.requiresPlayer = requiresPlayer;
- }
-
- /**
- * Get the result of the placeholder with respect to a player.
- *
- * @param player The player to translate with respect to.
- * @return The result of the placeholder.
- */
- public String getResult(@Nullable final Player player) {
- if (player == null) {
- Validate.isTrue(!requiresPlayer, "null player passed to requiresPlayer placeholder.");
- }
- return this.function.apply(player);
- }
-
- /**
- * Get if the placeholder requires a player to get a result.
- *
- * @return If the placeholder requires a player.
- */
- public boolean requiresPlayer() {
- return requiresPlayer;
- }
-
- /**
- * Get the identifier.
- *
- * @return The identifier.
- */
- public String getIdentifier() {
- return identifier;
- }
-
- /**
- * Get the plugin.
- *
- * @return The plugin.
- */
- @Nullable
- public EcoPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Register the placeholder.
- */
- public void register() {
- PlaceholderManager.registerPlaceholder(this.toModernPlaceholder());
- }
-
- /**
- * Convert the placeholder to a modern placeholder.
- *
- * @return The placeholder.
- */
- Placeholder toModernPlaceholder() {
- if (this.requiresPlayer) {
- return new PlayerPlaceholder(
- Objects.requireNonNullElse(plugin, Eco.get().getEcoPlugin()),
- identifier,
- function
- );
- } else {
- return new PlayerlessPlaceholder(
- Objects.requireNonNullElse(plugin, Eco.get().getEcoPlugin()),
- identifier,
- () -> function.apply(null)
- );
- }
- }
-
- @Override
- public boolean equals(@Nullable final Object o) {
- if (this == o) {
- return true;
- }
- if (!(o instanceof PlaceholderEntry entry)) {
- return false;
- }
- return Objects.equals(this.getIdentifier(), entry.getIdentifier())
- && Objects.equals(this.getPlugin(), entry.getPlugin());
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(this.getIdentifier(), this.getPlugin());
- }
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java
index 3eee366a..1dfbb165 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java
@@ -36,7 +36,6 @@ import java.util.regex.Pattern;
/**
* Class to handle placeholder integrations.
*/
-@SuppressWarnings("removal")
public final class PlaceholderManager {
/**
* All registered placeholders.
@@ -78,6 +77,11 @@ public final class PlaceholderManager {
* Empty injectable object.
*/
public static final PlaceholderInjectable EMPTY_INJECTABLE = new PlaceholderInjectable() {
+ @Override
+ public void addInjectablePlaceholder(@NotNull Iterable placeholders) {
+ // Do nothing.
+ }
+
@Override
public void clearInjectedPlaceholders() {
// Do nothing.
@@ -118,17 +122,6 @@ public final class PlaceholderManager {
REGISTERED_PLACEHOLDERS.put(placeholder.getPlugin(), pluginPlaceholders);
}
- /**
- * Register a placeholder.
- *
- * @param placeholder The placeholder to register.
- * @deprecated Uses old placeholder system.
- */
- @Deprecated(since = "6.28.0", forRemoval = true)
- public static void registerPlaceholder(@NotNull final PlaceholderEntry placeholder) {
- registerPlaceholder(placeholder.toModernPlaceholder());
- }
-
/**
* Get the result of a placeholder with respect to a player.
*
@@ -137,7 +130,7 @@ public final class PlaceholderManager {
* @return The value of the placeholder.
* @deprecated Specify a plugin to get the result from.
*/
- @Deprecated(forRemoval = true)
+ @Deprecated(since = "6.52.2", forRemoval = true)
@SuppressWarnings("unused")
public static String getResult(@Nullable final Player player,
@NotNull final String identifier) {
@@ -217,22 +210,6 @@ public final class PlaceholderManager {
return translatePlaceholders(text, player, EMPTY_INJECTABLE);
}
- /**
- * Translate all placeholders with respect to a player.
- *
- * @param text The text that may contain placeholders to translate.
- * @param player The player to translate the placeholders with respect to.
- * @param statics Extra static placeholders.
- * @return The text, translated.
- * @deprecated Use new static system.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- public static String translatePlaceholders(@NotNull final String text,
- @Nullable final Player player,
- @NotNull final List statics) {
- return translatePlaceholders(text, player, EMPTY_INJECTABLE);
- }
-
/**
* Translate all placeholders with respect to a player.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java
deleted file mode 100644
index f358e712..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/integrations/shop/ShopWrapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.willfp.eco.core.integrations.shop;
-
-/**
- * Wrapper class for shop integrations.
- *
- * @deprecated Use ShopIntegration instead.
- */
-@Deprecated(since = "6.35.0", forRemoval = true)
-public interface ShopWrapper extends ShopIntegration {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/placeholder/PlaceholderInjectable.java b/eco-api/src/main/java/com/willfp/eco/core/placeholder/PlaceholderInjectable.java
index 28897257..b9daf614 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/placeholder/PlaceholderInjectable.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/placeholder/PlaceholderInjectable.java
@@ -2,7 +2,6 @@ package com.willfp.eco.core.placeholder;
import org.jetbrains.annotations.NotNull;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -15,7 +14,7 @@ public interface PlaceholderInjectable {
* @param placeholders The placeholders.
*/
default void injectPlaceholders(@NotNull StaticPlaceholder... placeholders) {
- this.injectPlaceholders(List.of(placeholders));
+ this.addInjectablePlaceholder(List.of(placeholders));
}
/**
@@ -27,20 +26,6 @@ public interface PlaceholderInjectable {
this.addInjectablePlaceholder(List.of(placeholders));
}
- /**
- * Inject placeholder.
- *
- * @param placeholders The placeholders.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- default void injectPlaceholders(@NotNull Iterable placeholders) {
- List toInject = new ArrayList<>();
- for (StaticPlaceholder placeholder : placeholders) {
- toInject.add(placeholder);
- }
- this.addInjectablePlaceholder(toInject);
- }
-
/**
* Inject placeholders.
*
@@ -48,41 +33,13 @@ public interface PlaceholderInjectable {
*
* @param placeholders The placeholders.
*/
- default void addInjectablePlaceholder(@NotNull Iterable placeholders) {
- List toInject = new ArrayList<>();
- for (InjectablePlaceholder placeholder : placeholders) {
- if (placeholder instanceof StaticPlaceholder staticPlaceholder) {
- toInject.add(staticPlaceholder);
- }
- }
- this.injectPlaceholders(toInject);
- }
+ void addInjectablePlaceholder(@NotNull Iterable placeholders);
/**
* Clear injected placeholders.
*/
void clearInjectedPlaceholders();
- /**
- * Get injected placeholders.
- *
- * @return Injected placeholders.
- * @deprecated Use getPlaceholderInjections.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- @NotNull
- default List getInjectedPlaceholders() {
- List found = new ArrayList<>();
-
- for (InjectablePlaceholder placeholder : getPlaceholderInjections()) {
- if (placeholder instanceof StaticPlaceholder staticPlaceholder) {
- found.add(staticPlaceholder);
- }
- }
-
- return found;
- }
-
/**
* Get injected placeholders.
*
@@ -91,7 +48,5 @@ public interface PlaceholderInjectable {
* @return Injected placeholders.
*/
@NotNull
- default List getPlaceholderInjections() {
- return new ArrayList<>(getInjectedPlaceholders());
- }
+ List getPlaceholderInjections();
}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/proxy/AbstractProxy.java b/eco-api/src/main/java/com/willfp/eco/core/proxy/AbstractProxy.java
deleted file mode 100644
index d5bc43ac..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/proxy/AbstractProxy.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.willfp.eco.core.proxy;
-
-/**
- * Prior to 6.17.0, all proxies were required to implement this interface,
- * however it produced no functionality and was not even used internally.
- *
- * @deprecated Unused class, not required. Will be removed in a subsequent release.
- */
-@Deprecated(since = "6.17.0", forRemoval = true)
-public interface AbstractProxy {
-
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/proxy/Cleaner.java b/eco-api/src/main/java/com/willfp/eco/core/proxy/Cleaner.java
deleted file mode 100644
index a872f09e..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/proxy/Cleaner.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.willfp.eco.core.proxy;
-
-import com.willfp.eco.core.EcoPlugin;
-import org.jetbrains.annotations.NotNull;
-
-/**
- * A cleaner is an internal component to fix classloader errors.
- *
- * Important to allow for PlugMan/ServerUtils support.
- *
- * @deprecated No reason for this to be in the API.
- */
-@Deprecated(since = "6.43.0", forRemoval = true)
-public interface Cleaner {
- /**
- * Clean up classes left over from plugin.
- *
- * @param plugin The plugin.
- */
- void clean(@NotNull EcoPlugin plugin);
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java
index 122f24eb..3d0eafcb 100644
--- a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java
+++ b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/ProxyError.java
@@ -16,15 +16,4 @@ public class ProxyError extends Error {
@NotNull final Throwable cause) {
super(message, cause);
}
-
- /**
- * Thrown if there is an error getting a proxy.
- *
- * @param message The message to send.
- * @deprecated Proxy Errors should include a cause.
- */
- @Deprecated(forRemoval = true)
- public ProxyError(@NotNull final String message) {
- super(message);
- }
}
diff --git a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java b/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java
deleted file mode 100644
index 1ea1d89c..00000000
--- a/eco-api/src/main/java/com/willfp/eco/core/proxy/exceptions/UnsupportedVersionException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.willfp.eco.core.proxy.exceptions;
-
-import com.willfp.eco.core.proxy.ProxyConstants;
-import org.jetbrains.annotations.NotNull;
-
-/**
- * Error if the server is running an unsupported version.
- *
- * @deprecated Poorly named, exception when it's actually an error, contains doubly nested errors.
- */
-@SuppressWarnings("removal")
-@Deprecated(since = "6.24.0", forRemoval = true)
-public class UnsupportedVersionException extends ProxyError {
- /**
- * Thrown if the server is running an unsupported NMS version.
- *
- * @param message The message to send.
- * @deprecated Use the default constructor.
- */
- @Deprecated(since = "6.24.0", forRemoval = true)
- public UnsupportedVersionException(@NotNull final String message) {
- super(message);
- }
-
- /**
- * Thrown if the server is running an unsupported NMS version.
- */
- public UnsupportedVersionException() {
- super("You're running an unsupported server version: " + ProxyConstants.NMS_VERSION, new IllegalStateException());
- }
-}
diff --git a/eco-api/src/main/java/com/willfp/eco/util/BlockUtils.java b/eco-api/src/main/java/com/willfp/eco/util/BlockUtils.java
index 37f9ec42..6aa38cbf 100644
--- a/eco-api/src/main/java/com/willfp/eco/util/BlockUtils.java
+++ b/eco-api/src/main/java/com/willfp/eco/util/BlockUtils.java
@@ -1,12 +1,9 @@
package com.willfp.eco.util;
import org.bukkit.Chunk;
-import org.bukkit.Location;
import org.bukkit.Material;
-import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.bukkit.entity.Player;
import org.bukkit.persistence.PersistentDataType;
import org.jetbrains.annotations.NotNull;
@@ -62,27 +59,6 @@ public final class BlockUtils {
return getNearbyBlocks(start, allowedMaterials, new HashSet<>(), limit);
}
- /**
- * Break the block as if the player had done it manually.
- *
- * @param player The player to break the block as.
- * @param block The block to break.
- * @deprecated Added into spigot API in 1.17.1
- */
- @Deprecated(since = "6.26.2", forRemoval = true)
- public static void breakBlock(@NotNull final Player player,
- @NotNull final Block block) {
- Location location = block.getLocation();
- World world = location.getWorld();
- assert world != null;
-
- if (location.getY() < world.getMinHeight() || location.getY() > world.getMaxHeight()) {
- return;
- }
-
- player.breakBlock(block);
- }
-
/**
* Get if a block was placed by a player.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java b/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java
index 75a6ee16..26a155c1 100644
--- a/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java
+++ b/eco-api/src/main/java/com/willfp/eco/util/DurabilityUtils.java
@@ -8,7 +8,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerItemBreakEvent;
import org.bukkit.event.player.PlayerItemDamageEvent;
import org.bukkit.inventory.ItemStack;
-import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.Damageable;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
@@ -19,25 +18,6 @@ import org.jetbrains.annotations.NotNull;
// Have to suppress casts to ItemMeta because the methods don't exist for some older versions that eco supports.
@SuppressWarnings("RedundantCast")
public final class DurabilityUtils {
- /**
- * Damage an item in a player's inventory.
- * The slot of a held item can be obtained with {@link PlayerInventory#getHeldItemSlot()}.
- * Armor slots are 39 (helmet), 38 (chestplate), 37 (leggings), 36 (boots).
- *
- * @param player The player.
- * @param item The item to damage.
- * @param damage The amount of damage to deal.
- * @param slot The slot in the inventory of the item.
- * @deprecated The slot is not required.
- */
- @Deprecated(since = "6.24.0", forRemoval = true)
- public static void damageItem(@NotNull final Player player,
- @NotNull final ItemStack item,
- final int damage,
- final int slot) {
- damageItem(player, item, damage);
- }
-
/**
* Damage an item in a player's inventory.
*
diff --git a/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java b/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java
index b9a31cf2..a2eb8354 100644
--- a/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java
+++ b/eco-api/src/main/java/com/willfp/eco/util/NumberUtils.java
@@ -2,11 +2,9 @@ package com.willfp.eco.util;
import com.willfp.eco.core.Eco;
import com.willfp.eco.core.integrations.placeholder.PlaceholderManager;
-import com.willfp.eco.core.placeholder.AdditionalPlayer;
-import com.willfp.eco.core.placeholder.InjectablePlaceholder;
import com.willfp.eco.core.math.MathContext;
+import com.willfp.eco.core.placeholder.AdditionalPlayer;
import com.willfp.eco.core.placeholder.PlaceholderInjectable;
-import com.willfp.eco.core.placeholder.StaticPlaceholder;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -14,7 +12,6 @@ import org.jetbrains.annotations.Nullable;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ThreadLocalRandom;
@@ -89,34 +86,6 @@ public final class NumberUtils {
return (input * k) / (input * k - input + 1);
}
- /**
- * If value is above maximum, set it to maximum.
- *
- * @param toChange The value to test.
- * @param limit The maximum.
- * @return The new value.
- * @deprecated Pointless method.
- */
- @Deprecated(since = "6.19.0")
- public static int equalIfOver(final int toChange,
- final int limit) {
- return Math.min(toChange, limit);
- }
-
- /**
- * If value is above maximum, set it to maximum.
- *
- * @param toChange The value to test.
- * @param limit The maximum.
- * @return The new value.
- * @deprecated Pointless method.
- */
- @Deprecated(since = "6.19.0", forRemoval = true)
- public static double equalIfOver(final double toChange,
- final double limit) {
- return Math.min(toChange, limit);
- }
-
/**
* Get Roman Numeral from number.
*
@@ -256,36 +225,6 @@ public final class NumberUtils {
return evaluateExpression(expression, player, PlaceholderManager.EMPTY_INJECTABLE);
}
- /**
- * Evaluate an expression with respect to a player (for placeholders).
- *
- * @param expression The expression.
- * @param player The player.
- * @param statics The static placeholders.
- * @return The value of the expression, or zero if invalid.
- * @deprecated Use new statics system.
- */
- @Deprecated(since = "6.35.0", forRemoval = true)
- public static double evaluateExpression(@NotNull final String expression,
- @Nullable final Player player,
- @NotNull final Iterable statics) {
- return evaluateExpression(expression, player, new PlaceholderInjectable() {
- @Override
- public void clearInjectedPlaceholders() {
- // Do nothing.
- }
-
- @Override
- public @NotNull List getPlaceholderInjections() {
- List injections = new ArrayList<>();
- for (StaticPlaceholder placeholder : statics) {
- injections.add(placeholder);
- }
- return injections;
- }
- });
- }
-
/**
* Evaluate an expression with respect to a player (for placeholders).
*
diff --git a/eco-api/src/main/java/com/willfp/eco/util/StringUtils.java b/eco-api/src/main/java/com/willfp/eco/util/StringUtils.java
index 49ed8e40..dab34b02 100644
--- a/eco-api/src/main/java/com/willfp/eco/util/StringUtils.java
+++ b/eco-api/src/main/java/com/willfp/eco/util/StringUtils.java
@@ -426,20 +426,6 @@ public final class StringUtils {
return processedString;
}
- /**
- * Internal implementation of {@link String#valueOf}.
- * Formats collections and doubles better.
- *
- * @param object The object to convert to string.
- * @return The object stringified.
- * @deprecated Poorly named method. Use {@link StringUtils#toNiceString(Object)} instead.
- */
- @NotNull
- @Deprecated(since = "6.26.0", forRemoval = true)
- public static String internalToString(@Nullable final Object object) {
- return toNiceString(object);
- }
-
/**
* Internal implementation of {@link String#valueOf}.
* Formats collections and doubles better.
diff --git a/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java b/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java
index 9a7e2d70..f1704d19 100644
--- a/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java
+++ b/eco-api/src/main/java/com/willfp/eco/util/TeamUtils.java
@@ -4,24 +4,16 @@ import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
-import org.bukkit.Material;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.Team;
import org.jetbrains.annotations.NotNull;
-import java.util.HashMap;
-import java.util.Map;
import java.util.Objects;
/**
* Utilities / API methods for teams.
*/
public final class TeamUtils {
- /**
- * Ore ChatColors.
- */
- private static final Map MATERIAL_COLORS = new HashMap<>();
-
/**
* All chat color teams.
*/
@@ -60,44 +52,10 @@ public final class TeamUtils {
return team;
}
- /**
- * Get team from material.
- *
- * For {@link org.bukkit.potion.PotionEffectType#GLOWING}.
- *
- * @param material The material to find the team from.
- * @return The team.
- * @deprecated Stupid method.
- */
- @NotNull
- @Deprecated(since = "6.24.0", forRemoval = true)
- public static Team getMaterialColorTeam(@NotNull final Material material) {
- return fromChatColor(MATERIAL_COLORS.getOrDefault(material, ChatColor.WHITE));
- }
-
static {
for (ChatColor value : ChatColor.values()) {
fromChatColor(value);
}
-
- MATERIAL_COLORS.put(Material.COAL_ORE, ChatColor.BLACK);
- MATERIAL_COLORS.put(Material.IRON_ORE, ChatColor.GRAY);
- MATERIAL_COLORS.put(Material.GOLD_ORE, ChatColor.YELLOW);
- MATERIAL_COLORS.put(Material.LAPIS_ORE, ChatColor.BLUE);
- MATERIAL_COLORS.put(Material.REDSTONE_ORE, ChatColor.RED);
- MATERIAL_COLORS.put(Material.DIAMOND_ORE, ChatColor.AQUA);
- MATERIAL_COLORS.put(Material.EMERALD_ORE, ChatColor.GREEN);
- MATERIAL_COLORS.put(Material.ANCIENT_DEBRIS, ChatColor.DARK_RED);
-
- MATERIAL_COLORS.put(Material.COPPER_ORE, ChatColor.GOLD);
- MATERIAL_COLORS.put(Material.DEEPSLATE_COPPER_ORE, ChatColor.GOLD);
- MATERIAL_COLORS.put(Material.DEEPSLATE_COAL_ORE, ChatColor.BLACK);
- MATERIAL_COLORS.put(Material.DEEPSLATE_IRON_ORE, ChatColor.GRAY);
- MATERIAL_COLORS.put(Material.DEEPSLATE_GOLD_ORE, ChatColor.YELLOW);
- MATERIAL_COLORS.put(Material.DEEPSLATE_LAPIS_ORE, ChatColor.BLUE);
- MATERIAL_COLORS.put(Material.DEEPSLATE_REDSTONE_ORE, ChatColor.RED);
- MATERIAL_COLORS.put(Material.DEEPSLATE_DIAMOND_ORE, ChatColor.AQUA);
- MATERIAL_COLORS.put(Material.DEEPSLATE_EMERALD_ORE, ChatColor.GREEN);
}
private TeamUtils() {