// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.component.system;

import javax.annotation.Nonnull;

public abstract class EventSystem<EventType extends EcsEvent>
{
    @Nonnull
    private final Class<EventType> eventType;
    
    protected EventSystem(@Nonnull final Class<EventType> eventType) {
        this.eventType = eventType;
    }
    
    protected boolean shouldProcessEvent(@Nonnull final EventType event) {
        if (event instanceof final ICancellableEcsEvent cancellable) {
            if (cancellable.isCancelled()) {
                return false;
            }
        }
        return true;
    }
    
    @Nonnull
    public Class<EventType> getEventType() {
        return this.eventType;
    }
}
