SteamWar/FightSystem
Archiviert
13
1

added new comment to lock schematic

Dieser Commit ist enthalten in:
Yaruma3341 2019-11-21 16:20:57 +01:00 committet von BuildTools
Ursprung 2a6f28b935
Commit f0797c041d
4 geänderte Dateien mit 34 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -69,6 +69,7 @@ public class FightSystem extends JavaPlugin {
getCommand("ready").setExecutor(new ReadyCommand());
getCommand("ak").setExecutor(new AkCommand());
getCommand("leader").setExecutor(new LeaderCommand());
getCommand("lockschem").setExecutor(new LockschemCommand());
if(Config.event()) {
new EventJoinListener();

Datei anzeigen

@ -83,16 +83,6 @@ public class AkCommand implements CommandExecutor {
player.sendMessage(FightSystem.PREFIX + "§cDu musst eine Seitenzahl angeben!");
return false;
}
} else if(args[0].equalsIgnoreCase("lockschem")) {
String teamName = args[1];
FightTeam fightTeam = Fight.getTeamByName(teamName);
if(fightTeam == null) {
player.sendMessage(FightSystem.PREFIX + "§cDieses Team existiert nicht!");
return false;
}
fightTeam.getSchematic().setSchemType(SchematicType.Normal);
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + "§cgepserrt!");
} else
Commands.sendHelp(player);
break;

Datei anzeigen

@ -0,0 +1,31 @@
package de.steamwar.fightsystem.commands;
import de.steamwar.fightsystem.FightSystem;
import de.steamwar.fightsystem.fight.Fight;
import de.steamwar.fightsystem.fight.FightTeam;
import de.steamwar.sql.SchematicType;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class LockschemCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player player = (Player) sender;
if(!(sender instanceof Player)) {
if(args.length == 1) {
String teamName = args[1];
FightTeam fightTeam = Fight.getTeamByName(teamName);
if(fightTeam == null) {
player.sendMessage(FightSystem.PREFIX + "§cDieses Team existiert nicht!");
return false;
}
fightTeam.getSchematic().setSchemType(SchematicType.Normal);
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + "§cgepserrt!");
}
}
return false;
}
}

Datei anzeigen

@ -13,4 +13,5 @@ commands:
ready:
kit:
remove:
leader:
leader:
lockschem: