package com.ghost.technic.server.game.event;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

@Getter
@RequiredArgsConstructor
public class GameEvent {

    private final EventType type;
    private final Map<String, Object> payload;

    @SuppressWarnings("unchecked")
    public <T> T get(String key) {
        return (T) payload.get(key);
    }
}
