how to clear an error ?

Discussion in 'Spigot Plugin Help' started by SkyNedIZ, Mar 21, 2020.

  1. Hello, so here I created a Hub plugin, is at each startup I have this error which seems to come from the Bed object, but its has no impact in games? You think I can clear this error with a try catch? thank you

    ps : french sorry for my english

    Code (Java):
    [18:14:37] [Server thread/ERROR]: Fatal error trying to convert PluginHub v1.0:fr/skyned/events/InventoryClick.class
    org.bukkit.plugin.AuthorNagException: No legacy enum constant for RED_BED. Did you forget to define api-version: 1.13 in your plugin.yml?
        at org.bukkit.craftbukkit.v1_15_R1.util.Commodore$1$1.visitFieldInsn(Commodore.java:176) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.readCode(ClassReader.java:2419) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1492) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.accept(ClassReader.java:717) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.accept(ClassReader.java:401) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.util.Commodore.convert(Commodore.java:130) ~[spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.util.CraftMagicNumbers.processClass(CraftMagicNumbers.java:283) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:119) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:202) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:103) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:92) [spigot.jar:git-Spigot-800b93f-8160e29]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [?:1.8.0_211]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [?:1.8.0_211]
        at fr.skyned.pluginhub.main.onEnable(main.java:30) [pluginhub.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.reload(CraftServer.java:811) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.Bukkit.reload(Bukkit.java:576) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:711) [spigot.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchServerCommand(CraftServer.java:696) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.DedicatedServer.handleCommandQueue(DedicatedServer.java:436) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:400) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:984) [spigot.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:824) [spigot.jar:git-Spigot-800b93f-8160e29]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
     
  2. SteelPhoenix

    Moderator

    org.bukkit.plugin.AuthorNagException: No legacy enum constant for RED_BED. Did you forget to define api-version: 1.13 in your plugin.yml?

    Because you haven't setup your plugin.yml properly the server is trying to mimic an older server version for legacy compatibility with your plugin.

    Also, DONT try-catch exceptions just to 'hide' the exception.
     
  3. well my plugin.yml here it is however like so many others
    my plugin is in 1.15.2 what should i do?thank you
    Code (Text):
    name: PluginHub
    version: 1.0
    main: fr.skyned.pluginhub.main