Fupery / ArtMap

Bukkit Plugin - Draw directly onto Minecraft maps in-game.
18 stars 26 forks source link

java.lang.Throwable: Warning: A plugin is creating a recipe using a Deprecated method. #65

Open mibby opened 6 years ago

mibby commented 6 years ago

Paper dev 1271 (Spigot 1.12.2) ArtMap v2.6.11 compiled as of commit https://github.com/Fupery/ArtMap/commit/28e08a1c30e60648264a62e28e22de0e23c33aee

@Fupery https://github.com/PaperMC/Paper/commit/ece3333123a97990408be5392361e288b63835ba

http://paste.ubuntu.com/26149717/

[13:42:26] [Server thread/INFO]: [ArtMap] Enabling ArtMap v2.6.11
[13:42:26] [Server thread/INFO]: [ArtMap] WorldGuard hooks enabled.
[13:42:26] [Server thread/INFO]: [ArtMap] ProtocolLib hooks enabled.
[13:42:26] [Server thread/INFO]: [ArtMap] Loading 'english' language file
[13:42:26] [Server thread/WARN]: java.lang.Throwable: Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.
[13:42:26] [Server thread/WARN]:    at org.bukkit.inventory.ShapedRecipe.<init>(ShapedRecipe.java:26)
[13:42:26] [Server thread/WARN]:    at me.Fupery.ArtMap.Recipe.SimpleRecipe$Shaped.toBukkitRecipe(SimpleRecipe.java:46)
[13:42:26] [Server thread/WARN]:    at me.Fupery.ArtMap.Recipe.CustomItem.getBukkitRecipe(CustomItem.java:105)
[13:42:26] [Server thread/WARN]:    at me.Fupery.ArtMap.Recipe.CustomItem.addRecipe(CustomItem.java:113)
[13:42:26] [Server thread/WARN]:    at me.Fupery.ArtMap.Recipe.ArtMaterial.setupRecipes(ArtMaterial.java:40)
[13:42:26] [Server thread/WARN]:    at me.Fupery.ArtMap.Recipe.RecipeLoader.loadRecipes(RecipeLoader.java:25)
[13:42:26] [Server thread/WARN]:    at me.Fupery.ArtMap.ArtMap.onEnable(ArtMap.java:150)
[13:42:26] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[13:42:26] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316)
[13:42:26] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
[13:42:26] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:384)
[13:42:26] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:333)
[13:42:26] [Server thread/WARN]:    at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442)
[13:42:26] [Server thread/WARN]:    at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403)
[13:42:26] [Server thread/WARN]:    at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341)
[13:42:26] [Server thread/WARN]:    at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:292)
[13:42:26] [Server thread/WARN]:    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616)
[13:42:26] [Server thread/WARN]:    at java.lang.Thread.run(Thread.java:748)
mibby commented 6 years ago

@Fupery Please update to a new recipe constructor when you get the chance, this spam and the issues it brings can be quite obnoxious. ;(

mibby commented 6 years ago

Regarding the deprecated recipe API use;

This is a pretty trivial fix for all plugins, and just requires passing a NamespacedKey to the recipe they're creating https://hub.spigotmc.org/javadocs/spigot/org/bukkit/NamespacedKey.html

mibby commented 6 years ago

@Fupery Please come back. :(

mibby commented 6 years ago

For reference, this is how the Magic plugin solved the issue. https://github.com/elBukkit/MagicPlugin/commit/b35201740c169b0ca84a4b349075cbd7435d24a3