Dieser Commit ist enthalten in:
Ursprung
8a21d5c93d
Commit
279577a536
@ -27,6 +27,7 @@ import de.steamwar.bungeecore.sql.Fight;
|
||||
import de.steamwar.bungeecore.sql.Punishment;
|
||||
import de.steamwar.bungeecore.sql.SchematicType;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.messages.ChatSender;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
@ -35,18 +36,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ReplayCommand extends BasicCommand {
|
||||
public class ReplayCommand extends SWCommand {
|
||||
|
||||
public ReplayCommand() {
|
||||
super("replay", null);
|
||||
super("replay");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender s, String[] args) {
|
||||
if(!(s instanceof ProxiedPlayer))
|
||||
return;
|
||||
ProxiedPlayer player = (ProxiedPlayer) s;
|
||||
|
||||
@Register
|
||||
public void genericCommand(ProxiedPlayer player, @OptionalValue("") String optionalMap) {
|
||||
ChatSender sender = ChatSender.of(player);
|
||||
if (sender.user().isPunishedWithMessage(sender, Punishment.PunishmentType.NoFightServer))
|
||||
return;
|
||||
@ -57,8 +54,8 @@ public class ReplayCommand extends BasicCommand {
|
||||
ServerStarter starter = new ServerStarter().replay(fight.getFightID()).blueLeader(player);
|
||||
|
||||
String map = mode.getRandomMap();
|
||||
if (args.length > 0) {
|
||||
String tMap = mode.hasMap(args[0]);
|
||||
if (!optionalMap.equals("")) {
|
||||
String tMap = mode.hasMap(optionalMap);
|
||||
if (tMap != null) map = tMap;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren