Implement packet send/receive events

This commit is contained in:
KingRainbow44
2022-04-23 02:08:31 -04:00
parent 600decbc09
commit 832c460a83
5 changed files with 80 additions and 15 deletions

View File

@@ -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;
}
/**