SteamWar/BungeeCore
Archiviert
13
2

Update SetLocaleCommand
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
yoyosource 2022-06-16 11:19:03 +02:00
Ursprung 8a21d5c93d
Commit 4cd0150042

Datei anzeigen

@ -19,25 +19,22 @@
package de.steamwar.bungeecore.commands;
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;
import java.util.Objects;
public class SetLocaleCommand extends BasicCommand {
public class SetLocaleCommand extends SWCommand {
public SetLocaleCommand() {
super("setlocale", null, "setlanguage");
}
@Override
public void execute(CommandSender s, String[] strings) {
if (!(s instanceof ProxiedPlayer))
return;
ChatSender sender = ChatSender.of(s);
sender.user().setLocale(Objects.requireNonNull(((ProxiedPlayer) s).getLocale()), true);
@Register
public void genericCommand(ProxiedPlayer player) {
ChatSender sender = ChatSender.of(player);
sender.user().setLocale(Objects.requireNonNull(player.getLocale()), true);
sender.system("LOCK_LOCALE_CHANGED");
}
}