Plugin cannot be reloaded in Minecraft 1.14 #43

Open
opened 2019-07-08 18:30:54 -04:00 by kennyrkun · 1 comment
kennyrkun commented 2019-07-08 18:30:54 -04:00 (Migrated from github.com)

Description
The plugin cannot be reloaded in Minecraft 1.14 because it does not remove custom crafting recipes when disabled. This means it will throw an error when it tries to load and the load will be aborted.

This isn't a terrible issue, as the server can just be restarted to reload the plugin, however it is not ideal and can the work around is cumbersome at best. Eventually, this should be fixed, but right now, it is nothing but an annoyance to server maintainers.

To Reproduce

  1. Load the plugin
  2. Unload the plugin
  3. Load the plugin

Expected behavior
All custom recipes should be removed, the plugin disabled, then reloaded without error.

Additional Context
>plugman reload Erostey

[17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Seuchenstiefel)
[17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Pest-Brustplatte)
[17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Seuchenhelm)
[17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Pest H÷schen)
[17:24:54] [Server thread/INFO]: [Erostey] Erostey disabled.
[17:24:54] [Server thread/INFO]: [Erostey] Enabling Erostey v2.25-19w23a-QoL4
[17:24:54] [Server thread/ERROR]: Error occurred while enabling Erostey v2.25-19w23a-QoL4 (Is it up to date?)
java.lang.IllegalStateException: Duplicate recipe ignored with ID erostey:plague_helmet
        at net.minecraft.server.v1_14_R1.CraftingManager.addRecipe(CraftingManager.java:72) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.craftbukkit.v1_14_R1.inventory.CraftShapedRecipe.addToCraftingManager(CraftShapedRecipe.java:59) ~[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.addRecipe(CraftServer.java:1097) ~[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at io.github.kennyrkun.erostey.species.viriplaga.ViriPlaga$Armour.addRecipes(ViriPlaga.java:213) ~[?:?]
        at io.github.kennyrkun.erostey.Erostey.onEnable(Erostey.java:72) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352)
 [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:416) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:366) [PlugMan.jar:?]
        at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:318) [PlugMan.jar:?]
        at com.rylinaux.plugman.util.PluginUtil.reload(PluginUtil.java:380) [PlugMan.jar:?]
        at com.rylinaux.plugman.command.ReloadCommand.execute(ReloadCommand.java:122) [PlugMan.jar:?]
        at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:95) [PlugMan.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchCommand(CraftServer.java:707)[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchServerCommand(CraftServer.java:692) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at net.minecraft.server.v1_14_R1.DedicatedServer.handleCommandQueue(DedicatedServer.java:433) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:397) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:959) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:804) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4]
        at java.lang.Thread.run(Unknown Source) [?:?]```
**Description** The plugin cannot be reloaded in Minecraft 1.14 because it does not remove custom crafting recipes when disabled. This means it will throw an error when it tries to load and the load will be aborted. This isn't a terrible issue, as the server can just be restarted to reload the plugin, however it is not ideal and can the work around is cumbersome at best. Eventually, this should be fixed, but right now, it is nothing but an annoyance to server maintainers. **To Reproduce** 1. Load the plugin 2. Unload the plugin 3. Load the plugin **Expected behavior** All custom recipes should be removed, the plugin disabled, then reloaded without error. **Additional Context** `>plugman reload Erostey` ```[17:24:54] [Server thread/INFO]: [Erostey] Disabling Erostey v2.25-19w23a-QoL4 [17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Seuchenstiefel) [17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Pest-Brustplatte) [17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Seuchenhelm) [17:24:54] [Server thread/INFO]: removed plague armour from crafting recipes. (Pest H÷schen) [17:24:54] [Server thread/INFO]: [Erostey] Erostey disabled. [17:24:54] [Server thread/INFO]: [Erostey] Enabling Erostey v2.25-19w23a-QoL4 [17:24:54] [Server thread/ERROR]: Error occurred while enabling Erostey v2.25-19w23a-QoL4 (Is it up to date?) java.lang.IllegalStateException: Duplicate recipe ignored with ID erostey:plague_helmet at net.minecraft.server.v1_14_R1.CraftingManager.addRecipe(CraftingManager.java:72) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.craftbukkit.v1_14_R1.inventory.CraftShapedRecipe.addToCraftingManager(CraftShapedRecipe.java:59) ~[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.addRecipe(CraftServer.java:1097) ~[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at io.github.kennyrkun.erostey.species.viriplaga.ViriPlaga$Armour.addRecipes(ViriPlaga.java:213) ~[?:?] at io.github.kennyrkun.erostey.Erostey.onEnable(Erostey.java:72) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:416) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:366) [PlugMan.jar:?] at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:318) [PlugMan.jar:?] at com.rylinaux.plugman.util.PluginUtil.reload(PluginUtil.java:380) [PlugMan.jar:?] at com.rylinaux.plugman.command.ReloadCommand.execute(ReloadCommand.java:122) [PlugMan.jar:?] at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:95) [PlugMan.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchCommand(CraftServer.java:707)[spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchServerCommand(CraftServer.java:692) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at net.minecraft.server.v1_14_R1.DedicatedServer.handleCommandQueue(DedicatedServer.java:433) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:397) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:959) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:804) [spigot-1.14.3.jar:git-Spigot-595711b-e8b39d4] at java.lang.Thread.run(Unknown Source) [?:?]```
kennyrkun commented 2020-03-29 21:09:04 -04:00 (Migrated from github.com)

Related to #47 and #22.

Related to #47 and #22.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kerrishaus/ErosteySpecies#43
No description provided.