|
@@ -1,61 +0,0 @@
|
|
|
-/*
|
|
|
- * This file is part of MissileWars (https://github.com/Butzlabben/missilewars).
|
|
|
- * Copyright (c) 2018-2021 Daniel Nägele.
|
|
|
- *
|
|
|
- * MissileWars 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.
|
|
|
- *
|
|
|
- * MissileWars 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 MissileWars. If not, see <https://www.gnu.org/licenses/>.
|
|
|
- */
|
|
|
-
|
|
|
-package de.butzlabben.missilewars.wrapper.event;
|
|
|
-
|
|
|
-import de.butzlabben.missilewars.game.Game;
|
|
|
-import lombok.Getter;
|
|
|
-import org.bukkit.entity.Player;
|
|
|
-import org.bukkit.event.Cancellable;
|
|
|
-import org.bukkit.event.HandlerList;
|
|
|
-import org.bukkit.event.player.PlayerEvent;
|
|
|
-
|
|
|
-/**
|
|
|
- * Get's called, before a player want's to join an arena
|
|
|
- */
|
|
|
-@Getter
|
|
|
-public class PrePlayerArenaJoinEvent extends PlayerEvent implements Cancellable {
|
|
|
-
|
|
|
- public final static HandlerList handlers = new HandlerList();
|
|
|
- private final Game game;
|
|
|
- private boolean cancelled;
|
|
|
-
|
|
|
- public PrePlayerArenaJoinEvent(Player who, Game game) {
|
|
|
- super(who);
|
|
|
- this.game = game;
|
|
|
- }
|
|
|
-
|
|
|
- public static HandlerList getHandlerList() {
|
|
|
- return handlers;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public HandlerList getHandlers() {
|
|
|
- return handlers;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public boolean isCancelled() {
|
|
|
- return cancelled;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void setCancelled(boolean b) {
|
|
|
- cancelled = b;
|
|
|
- }
|
|
|
-}
|