added new comment to lock schematic
Dieser Commit ist enthalten in:
Ursprung
2a6f28b935
Commit
f0797c041d
@ -69,6 +69,7 @@ public class FightSystem extends JavaPlugin {
|
|||||||
getCommand("ready").setExecutor(new ReadyCommand());
|
getCommand("ready").setExecutor(new ReadyCommand());
|
||||||
getCommand("ak").setExecutor(new AkCommand());
|
getCommand("ak").setExecutor(new AkCommand());
|
||||||
getCommand("leader").setExecutor(new LeaderCommand());
|
getCommand("leader").setExecutor(new LeaderCommand());
|
||||||
|
getCommand("lockschem").setExecutor(new LockschemCommand());
|
||||||
|
|
||||||
if(Config.event()) {
|
if(Config.event()) {
|
||||||
new EventJoinListener();
|
new EventJoinListener();
|
||||||
|
@ -83,16 +83,6 @@ public class AkCommand implements CommandExecutor {
|
|||||||
player.sendMessage(FightSystem.PREFIX + "§cDu musst eine Seitenzahl angeben!");
|
player.sendMessage(FightSystem.PREFIX + "§cDu musst eine Seitenzahl angeben!");
|
||||||
return false;
|
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
|
} else
|
||||||
Commands.sendHelp(player);
|
Commands.sendHelp(player);
|
||||||
break;
|
break;
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -13,4 +13,5 @@ commands:
|
|||||||
ready:
|
ready:
|
||||||
kit:
|
kit:
|
||||||
remove:
|
remove:
|
||||||
leader:
|
leader:
|
||||||
|
lockschem:
|
In neuem Issue referenzieren
Einen Benutzer sperren