1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Make punishments actually work, custom event for issuing

This commit is contained in:
Shy
2024-06-07 17:26:59 +02:00
parent 88cb2b3cb6
commit 1bb4c2fc47
6 changed files with 240 additions and 3 deletions
@@ -0,0 +1,36 @@
package de.shiewk.smoderation.event;
import de.shiewk.smoderation.punishments.Punishment;
import de.shiewk.smoderation.storage.PunishmentContainer;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
public class PunishmentIssueEvent extends Event {
private static final HandlerList handlerList = new HandlerList();
private final Punishment punishment;
private final PunishmentContainer container;
public PunishmentIssueEvent(Punishment punishment, PunishmentContainer container) {
this.punishment = punishment;
this.container = container;
}
public Punishment getPunishment() {
return punishment;
}
public PunishmentContainer getContainer() {
return container;
}
@Override
public @NotNull HandlerList getHandlers() {
return handlerList;
}
public static HandlerList getHandlerList() {
return handlerList;
}
}