[SPIGOT-308] Custom Event IllegalPluginAccessException Created: 28/Dec/14 Updated: 02/Jan/15 Resolved: 02/Jan/15 |
|
Status: | Closed |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | john01dav | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | 1.8, bug, spigot | ||
Environment: |
Ubuntu Desktop 14.04 x64 LTS, Oracle Java 8 |
Plugin: | SQLPerms closed beta |
Description |
Hello Spigot! I am working on a recode to SQLPerms, and while doing so I came across an issue with the following class: http://pastebin.com/ebYwAWxP As you can see, this is an event class. However, when I attempt to register a listener that listens for this event, I get the following error: http://pastebin.com/EhnDkXGK As far as I can tell, based off this (http://wiki.bukkit.org/Event_API_Reference#Custom_Event_Example) and this (https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/event/world/ChunkLoadEvent.java), I did this correctly. I would appreciate any direction on what I may be doing wrong, or if this is a bug in Spigot. |
Comments |
Comment by Black Hole [ 28/Dec/14 ] |
I think the cause is that you define the event in plugin A and use it in plugin B. |
Comment by john01dav [ 28/Dec/14 ] |
I do not understand it either, but it still happens. The exception occurs when I register a listener that listens for this custom event. |
Comment by Antony Riley [ 28/Dec/14 ] |
It works for me, I suspect you've messed up and the code you're testing isn't the code you think you're testing. I don't see why with your code this: would not be able to find the static method for getHandlerList. |
Comment by john01dav [ 28/Dec/14 ] |
Also occurs ongit-Bukkit-850a9e0, but with a slightly different stack trace: http://paste.md-5.net/luquhilaqi.avrasm. |
Comment by john01dav [ 28/Dec/14 ] |
Just tested on git-Spigot-13716d9-850a9e0, confirmed bug still occurs. |
Comment by john01dav [ 28/Dec/14 ] |
cybertiger |
Comment by Antony Riley [ 28/Dec/14 ] |
Event classes require a static getHandlerList() method in order to work, this is a "feature" of the event system bukkit uses. Not a bug. |
Comment by SpigotMC [ 28/Dec/14 ] |
Your build is not the latest and therefor may be the reason you are having this issue. Spigot is 6 version(s) behind. CraftBukkit is 15 version(s) behind. This message was automatically generated and is not guaranteed to be a solution to your issue. |