13
0
geforkt von Mirrors/Velocity

Add Player#hasSentPlayerSettings (#980)

Dieser Commit ist enthalten in:
Gero 2023-03-21 09:22:40 +01:00 committet von GitHub
Ursprung 01f1e1a94e
Commit c7ba5255e3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -88,6 +88,13 @@ public interface Player extends
*/ */
PlayerSettings getPlayerSettings(); PlayerSettings getPlayerSettings();
/**
* Returns whether the player has sent its client settings.
*
* @return true if the player has sent its client settings
*/
boolean hasSentPlayerSettings();
/** /**
* Returns the player's mod info if they have a modded client. * Returns the player's mod info if they have a modded client.
* *

Datei anzeigen

@ -282,6 +282,11 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
return settings == null ? ClientSettingsWrapper.DEFAULT : this.settings; return settings == null ? ClientSettingsWrapper.DEFAULT : this.settings;
} }
@Override
public boolean hasSentPlayerSettings() {
return settings != null;
}
void setPlayerSettings(ClientSettings settings) { void setPlayerSettings(ClientSettings settings) {
ClientSettingsWrapper cs = new ClientSettingsWrapper(settings); ClientSettingsWrapper cs = new ClientSettingsWrapper(settings);
this.settings = cs; this.settings = cs;