mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 09:54:59 +01:00
Implement packet send/receive events
This commit is contained in:
@@ -18,10 +18,9 @@ public abstract class Event {
|
||||
/**
|
||||
* Cancels the event if possible.
|
||||
*/
|
||||
public void cancel() throws IllegalAccessException {
|
||||
if(!(this instanceof Cancellable))
|
||||
throw new IllegalAccessException("Event is not cancellable.");
|
||||
this.cancelled = true;
|
||||
public void cancel() {
|
||||
if(this instanceof Cancellable)
|
||||
this.cancelled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user