-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MCTCommon/Events] Improve event firing and listening (#199)
- New event listener registering - New event firing
- Loading branch information
Showing
27 changed files
with
585 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/com/minecrafttas/mctcommon/events/EventException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.minecrafttas.mctcommon.events; | ||
|
||
public class EventException extends RuntimeException { | ||
|
||
public EventException(String message, Class<? extends EventListenerRegistry.EventBase> eventClass) { | ||
super(eventClass.getName() + ": " + message); | ||
} | ||
|
||
public EventException(String message, Class<? extends EventListenerRegistry.EventBase> eventClass, Throwable cause) { | ||
super(eventClass.getName() + ": " + message, cause); | ||
} | ||
|
||
public EventException(Class<? extends EventListenerRegistry.EventBase> eventClass, Throwable cause) { | ||
super(eventClass.getName(), cause); | ||
} | ||
} |
Oops, something went wrong.