Place a static method check to prevent errors.
This commit is contained in:
parent
e0bbf63fc1
commit
0b79531751
1 changed files with 7 additions and 0 deletions
|
@ -73,6 +73,13 @@ public class EventDispatcher
|
||||||
// Dispatch the event now
|
// Dispatch the event now
|
||||||
|
|
||||||
if(!canPost) continue;
|
if(!canPost) continue;
|
||||||
|
|
||||||
|
if(!M.canAccess(null))
|
||||||
|
{
|
||||||
|
canPost=false;
|
||||||
|
System.out.println("ERROR: Even subscriber methods must be static and public");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(event.isCancelled() && !subscriber.allowCancelled())
|
if(event.isCancelled() && !subscriber.allowCancelled())
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue