geforkt von SteamWar/BungeeCore
Fix SettingsChangedListener error message
Dieser Commit ist enthalten in:
Ursprung
61b264ffcd
Commit
caa36b9461
@ -19,7 +19,9 @@
|
||||
|
||||
package de.steamwar.bungeecore.listeners;
|
||||
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
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.event.SettingsChangedEvent;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
@ -30,7 +32,9 @@ public class SettingsChangedListener extends BasicListener {
|
||||
|
||||
@EventHandler
|
||||
public void onSettingsChanged(SettingsChangedEvent event) {
|
||||
ProxiedPlayer player = event.getPlayer();
|
||||
SteamwarUser.get(player).setLocale(Objects.requireNonNull(player.getLocale()), false);
|
||||
BungeeCord.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
||||
ProxiedPlayer player = event.getPlayer();
|
||||
SteamwarUser.get(player).setLocale(Objects.requireNonNull(player.getLocale()), false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren