mirror of
https://github.com/Shiewk/SModeration.git
synced 2026-04-29 06:34:17 +02:00
Move SModeration for Paper to root project
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package de.shiewk.smoderation.paper.event;
|
||||
|
||||
import de.shiewk.smoderation.paper.punishments.Punishment;
|
||||
import de.shiewk.smoderation.paper.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 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;
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancelled) {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package de.shiewk.smoderation.paper.event;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class VanishToggleEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlerList = new HandlerList();
|
||||
|
||||
private final boolean state;
|
||||
private boolean cancelled;
|
||||
|
||||
public VanishToggleEvent(Player player, boolean state) {
|
||||
super(player);
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public boolean getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull HandlerList getHandlers() {
|
||||
return handlerList;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlerList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancelled) {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user