From 2724f21d4e2b63b3482c678275ddc3d745ca6852 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 6 Jan 2022 14:59:39 +0000 Subject: [PATCH] Referencing for-removal arg parsers at all will now log an error --- .../java/com/willfp/eco/core/items/args/ColorArgParser.java | 4 ++++ .../willfp/eco/core/items/args/CustomModelDataArgParser.java | 4 ++++ .../com/willfp/eco/core/items/args/EnchantmentArgParser.java | 4 ++++ .../java/com/willfp/eco/core/items/args/TextureArgParser.java | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java index cf9fb86b..b76cbf65 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java @@ -27,4 +27,8 @@ public class ColorArgParser implements LookupArgParser { @NotNull final ItemMeta meta) { return null; } + + static { + Bukkit.getLogger().severe("Referencing a class marked for removal! (" + ColorArgParser.class.getName() + "), this will throw an error in a future release!"); + } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java index cb17e059..a0895f82 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java @@ -27,4 +27,8 @@ public class CustomModelDataArgParser implements LookupArgParser { @NotNull final ItemMeta meta) { return null; } + + static { + Bukkit.getLogger().severe("Referencing a class marked for removal! (" + CustomModelDataArgParser.class.getName() + "), this will throw an error in a future release!"); + } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java index 72b8c7ad..9ddfa705 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java @@ -27,4 +27,8 @@ public class EnchantmentArgParser implements LookupArgParser { @NotNull final ItemMeta meta) { return null; } + + static { + Bukkit.getLogger().severe("Referencing a class marked for removal! (" + EnchantmentArgParser.class.getName() + "), this will throw an error in a future release!"); + } } diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java index 9538ddf9..1a448cda 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java @@ -27,4 +27,8 @@ public class TextureArgParser implements LookupArgParser { @NotNull final ItemMeta meta) { return null; } + + static { + Bukkit.getLogger().severe("Referencing a class marked for removal! (" + TextureArgParser.class.getName() + "), this will throw an error in a future release!"); + } }