Archiviert
1
0
Dieser Commit ist enthalten in:
yoyosource 2022-09-06 15:36:27 +02:00
Ursprung 2325190cf1
Commit 16c3f93741

Datei anzeigen

@ -38,13 +38,13 @@ import java.util.List;
public class TypeMappers { public class TypeMappers {
public static void init() { public static void init() {
SWCommandUtils.addValidator("arenaPlayer", fabricChecker()); SWCommandUtils.addValidator("arenaPlayer", arenaPlayer());
SWCommandUtils.addMapper("nonHistoricArenaMode", arenaModeTypeMapper(false)); SWCommandUtils.addMapper("nonHistoricArenaMode", arenaModeTypeMapper(false));
SWCommandUtils.addMapper("historicArenaMode", arenaModeTypeMapper(true)); SWCommandUtils.addMapper("historicArenaMode", arenaModeTypeMapper(true));
SWCommandUtils.addMapper("arenaMap", arenaMapTypeMapper()); SWCommandUtils.addMapper("arenaMap", arenaMapTypeMapper());
} }
private static TypeValidator<ProxiedPlayer> fabricChecker() { private static TypeValidator<ProxiedPlayer> arenaPlayer() {
return (sender, value, messageSender) -> { return (sender, value, messageSender) -> {
ChatSender player = ChatSender.of(value); ChatSender player = ChatSender.of(value);
if (player.user().isPunishedWithMessage(player, Punishment.PunishmentType.NoFightServer)) { if (player.user().isPunishedWithMessage(player, Punishment.PunishmentType.NoFightServer)) {