Fix SettingsChangedListener error message
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
61b264ffcd
Commit
caa36b9461
@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.SettingsChangedEvent;
|
import net.md_5.bungee.api.event.SettingsChangedEvent;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
@ -30,7 +32,9 @@ public class SettingsChangedListener extends BasicListener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onSettingsChanged(SettingsChangedEvent event) {
|
public void onSettingsChanged(SettingsChangedEvent event) {
|
||||||
ProxiedPlayer player = event.getPlayer();
|
BungeeCord.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
||||||
SteamwarUser.get(player).setLocale(Objects.requireNonNull(player.getLocale()), false);
|
ProxiedPlayer player = event.getPlayer();
|
||||||
|
SteamwarUser.get(player).setLocale(Objects.requireNonNull(player.getLocale()), false);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren