All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.jvstvshd.necrify.api.event.punishment.PunishmentEvent Maven / Gradle / Ivy

The newest version!
/*
 * This file is part of Necrify (formerly Velocity Punishment), a plugin designed to manage player's punishments for the platforms Velocity and partly Paper.
 * Copyright (C) 2022-2024 JvstvsHD
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */

package de.jvstvshd.necrify.api.event.punishment;

import de.jvstvshd.necrify.api.event.user.UserEvent;
import de.jvstvshd.necrify.api.punishment.Punishment;
import org.jetbrains.annotations.NotNull;

/**
 * Represents an event that is related to a punishment.
 *
 * @since 1.2.0
 */
public abstract class PunishmentEvent extends UserEvent {

    private final Punishment punishment;

    public PunishmentEvent(String name, Punishment punishment) {
        super(name, punishment.getUser());
        this.punishment = punishment;
    }

    /**
     * Gets the punishment that is related to this event.
     * @return the punishment that is related to this event.
     */
    @NotNull
    public Punishment getPunishment() {
        return punishment;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy