Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Add Player#hasSentPlayerSettings (#980)
Dieser Commit ist enthalten in:
Ursprung
01f1e1a94e
Commit
c7ba5255e3
@ -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.
|
||||||
*
|
*
|
||||||
|
@ -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;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren