SteamWar/MissileWars
Archiviert
13
0

Add BlockBreakFix #27

Manuell gemergt
YoyoNow hat 1 Commits von BlockBreak nach master 2021-01-13 19:38:14 +01:00 zusammengeführt
2 geänderte Dateien mit 42 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -53,6 +53,7 @@ public class MissileWars extends JavaPlugin {
public void onEnable() {
redTeam = new MWTeam(ChatColor.RED, Config.RedSpawn, "Rot", Config.RedPortalZ);
blueTeam = new MWTeam(ChatColor.BLUE, Config.BlueSpawn, "Blau", Config.BluePortalZ);
new BreakListener();
new DeathListener();
new ItemListener();
new ArenaListener();

Datei anzeigen

@ -0,0 +1,41 @@
/*
*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2020 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* /
*/
package de.steamwar.misslewars.listener;
import de.steamwar.misslewars.FightState;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockBreakEvent;
import java.util.EnumSet;
public class BreakListener extends BasicListener {
public BreakListener() {
super(EnumSet.of(FightState.WAITING));
}
@EventHandler(ignoreCancelled = true)
public void onBlockBreak(BlockBreakEvent event) {
event.setCancelled(true);
}
}