1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-29 06:34:17 +02:00

Add mute command, command usages and smaller improvements

This commit is contained in:
Shy
2024-06-08 11:03:56 +02:00
parent 1bb4c2fc47
commit fe4e87d9b4
8 changed files with 174 additions and 5 deletions
@@ -2,15 +2,17 @@ package de.shiewk.smoderation.event;
import de.shiewk.smoderation.punishments.Punishment;
import de.shiewk.smoderation.storage.PunishmentContainer;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
public class PunishmentIssueEvent extends Event {
public class PunishmentIssueEvent extends Event implements Cancellable {
private static final HandlerList handlerList = new HandlerList();
private final Punishment punishment;
private final PunishmentContainer container;
private boolean cancelled;
public PunishmentIssueEvent(Punishment punishment, PunishmentContainer container) {
this.punishment = punishment;
@@ -33,4 +35,14 @@ public class PunishmentIssueEvent extends Event {
public static HandlerList getHandlerList() {
return handlerList;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
}