Help with this error!

Discussion in 'Plugin Development' started by ludo0777, Jun 24, 2012.

  1. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    23:43:36 [SEVERE] Error occurred while enabling GuestGuard v0.6 (Is it up to date?) org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event org.bukkit.event.player.PlayerEvent at org.bukkit.plugin.SimplePluginManager.getRegistrationClass(SimplePluginManager.java:552) at org.bukkit.plugin.SimplePluginManager.getRegistrationClass(SimplePluginManager.java:550) at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:496) at us.lupusbukkit.GuestGuard.GuestGuard.onEnable(GuestGuard.java:30) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:386) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:262) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:244) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:390) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:377) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:205) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:441) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)

    This post has been edited 1 time. It was last edited by ludo0777 Jun 24, 2012.
  2. Offline

    ferrybig

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you cant register on a PlayerEvent
  3. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can someone help me fix the error above? The source code is here.
  4. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The source code is here, I don't think I did use PlayerEvent...
  5. Offline

    ferrybig

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    the source looks oke for my, mayby another user can help you further?
  6. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can anyone else help?
  7. Offline

    hockeygoalie5

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I believe you must name the listener methods correctly. For example, StopPlace should be onBlockPlace; StopChat should be onPlayerChat. Normally, the name of the method is the Event type without the "event" and it starts with "on".
  8. Offline

    ferrybig

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    the name of the listener methode dont matter
  9. Offline

    hockeygoalie5

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Nothing else seems wrong, so I'd give it a try. I've never seen anyone name their methods differently.
  10. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You used to have to name them onPlayerChat etc but that changed and now you don't have to.
    ferrybig likes this.
  11. Offline

    hammale

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    wats line 30 of GuestGuard?
  12. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  13. Offline

    ferrybig

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    can you give us more information, like if its working on the latest recommend build on bukkit, what version you used to compile, what version you using to run it, for my, its looks more like an craftbukkit error
  14. Offline

    ludo0777

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Compiled and run with latest 1.2.5-R4 and still gives:
  15. Offline

    ferrybig

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    dont say latest, give version numbers
  16. Offline

    hammale

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    idk if this is the problem but i like to make it a habit of making a separate class for my events. idk if your main class can implement listener and extend JavaPlugin but even if it can its a bad habit...
  17. Offline

    Codex Arcanum

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    "Introduction to the new event system" says you can. It's not something I like to do though :).

    @ludo0777, this really isn't part of the problem you are having, but I wanted to mention something.
    Code:
    if(stopplace){
    if(!player.hasPermission("guestguard.build")){
    
    This is not particularly good practice. Instead of having two if statements, you should combine them into one if statement like this unless you have a compelling reason not to.
    Code:
    if(stopplace && !player.hasPermission("guestguard.build")){
    
    ...but I'll see if I can actually help solve the problem too :).


  18. Offline

    Codex Arcanum

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Nope. I believe this used to be the case, but has changed, as mentioned in "Introduction to the New Event System". I'll admit that I've been naming all my methods onPlayerChat too, just for readability.

    Edit: Also I found this handy inheritance chart off of the Bukkit javadocs. Now I kind of know what a PlayerEvent is, if not how that is causing a problem for this plugin.

    [IMG]

    This post has been edited 2 times. It was last edited by Codex Arcanum Jun 27, 2012.
  19. Offline

    Rudonator

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You should look at the bucketEvents. I had the same problem.

Share This Page