Error plugin Custom NPC

Discussion in 'Plugin Development' started by kfir123116, Feb 5, 2021.

  1. Offline

    kfir123116

    I created a plugin for my server that do /createnpc
    He creates an NPC and right-clicks on it and writes "DID IT WORK?" But it does not work and it writes me an error in Console:

    Code:
    [16:01:40 ERROR]: Error occurred while enabling NPC v2.2 (Is it up to date?)
    org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event me.kfir123116.NPC.Event.RightClickNPC. Static getHandlerList method required!
            at org.bukkit.plugin.SimplePluginManager.getRegistrationClass(SimplePluginManager.java:586) ~[spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:528) ~[spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at me.kfir123116.NPC.Main.onEnable(Main.java:20) ~[?:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot46.jar:git-Spigot-21fe707-e1ebe52]
     
  2. Offline

    timtower Administrator Administrator Moderator

    @kfir123116 You throwing an event that is incomplete.
     
  3. Offline

    kfir123116

    @timtower
    What event?
     
  4. Offline

    timtower Administrator Administrator Moderator

    @kfir123116 Did you read the stacktrace?
    Code:
    Unable to find handler list for event me.kfir123116.NPC.Event.RightClickNPC. Static getHandlerList method required!
     
  5. Offline

    kfir123116

    Yes but I do not know what that means
     
  6. Offline

    timtower Administrator Administrator Moderator

Share This Page