Merge pull request 'Add better checking for supporter' (#325) from BetterChecking into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #325 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
b3c7914bdf
@ -121,6 +121,8 @@ public class FightSystem extends JavaPlugin {
|
|||||||
new KitCommand();
|
new KitCommand();
|
||||||
new RemoveCommand();
|
new RemoveCommand();
|
||||||
new AcceptCommand();
|
new AcceptCommand();
|
||||||
|
new WGCommand();
|
||||||
|
new TBCommand();
|
||||||
new DeclineCommand();
|
new DeclineCommand();
|
||||||
new GamemodeCommand();
|
new GamemodeCommand();
|
||||||
new InviteCommand();
|
new InviteCommand();
|
||||||
|
45
FightSystem_Core/src/de/steamwar/fightsystem/commands/TBCommand.java
Normale Datei
45
FightSystem_Core/src/de/steamwar/fightsystem/commands/TBCommand.java
Normale Datei
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* 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.fightsystem.commands;
|
||||||
|
|
||||||
|
import de.steamwar.fightsystem.ArenaMode;
|
||||||
|
import de.steamwar.fightsystem.fight.Fight;
|
||||||
|
import de.steamwar.fightsystem.states.FightState;
|
||||||
|
import de.steamwar.fightsystem.states.StateDependentCommand;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class TBCommand implements CommandExecutor {
|
||||||
|
|
||||||
|
public TBCommand() {
|
||||||
|
new StateDependentCommand(ArenaMode.Check, FightState.All, "resettb", this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if(!(sender instanceof Player)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Fight.getRedTeam().pasteSchem();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
45
FightSystem_Core/src/de/steamwar/fightsystem/commands/WGCommand.java
Normale Datei
45
FightSystem_Core/src/de/steamwar/fightsystem/commands/WGCommand.java
Normale Datei
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* 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.fightsystem.commands;
|
||||||
|
|
||||||
|
import de.steamwar.fightsystem.ArenaMode;
|
||||||
|
import de.steamwar.fightsystem.fight.Fight;
|
||||||
|
import de.steamwar.fightsystem.states.FightState;
|
||||||
|
import de.steamwar.fightsystem.states.StateDependentCommand;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class WGCommand implements CommandExecutor {
|
||||||
|
|
||||||
|
public WGCommand() {
|
||||||
|
new StateDependentCommand(ArenaMode.Check, FightState.All, "resetwg", this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if(!(sender instanceof Player)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Fight.getBlueTeam().pasteSchem();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -321,6 +321,10 @@ public class FightTeam {
|
|||||||
return ready;
|
return ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void pasteSchem() {
|
||||||
|
testPasteAction();
|
||||||
|
}
|
||||||
|
|
||||||
public void pasteSchem(SchematicNode schematic){
|
public void pasteSchem(SchematicNode schematic){
|
||||||
setSchem(schematic);
|
setSchem(schematic);
|
||||||
testPasteAction();
|
testPasteAction();
|
||||||
|
@ -22,3 +22,5 @@ commands:
|
|||||||
state:
|
state:
|
||||||
skip:
|
skip:
|
||||||
win:
|
win:
|
||||||
|
resetwg:
|
||||||
|
resettb:
|
In neuem Issue referenzieren
Einen Benutzer sperren