package com.hypixel.hytale.component.system; import javax.annotation.Nonnull; public abstract class EventSystem { @Nonnull private final Class eventType; protected EventSystem(@Nonnull Class eventType) { this.eventType = eventType; } protected boolean shouldProcessEvent(@Nonnull EventType event) { return !(event instanceof ICancellableEcsEvent cancellable && cancellable.isCancelled()); } @Nonnull public Class getEventType() { return this.eventType; } }