Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 15:20:35 +01:00
Add new ClientSettings API
Add the new API introducted with the ClientSettings packet changes in 1.18
Dieser Commit ist enthalten in:
Ursprung
7cc40f8fea
Commit
7ed4f4c03a
@ -57,6 +57,16 @@ public interface PlayerSettings {
|
||||
*/
|
||||
MainHand getMainHand();
|
||||
|
||||
/**
|
||||
* Returns whether the client explicitly allows listing on the
|
||||
* {@link com.velocitypowered.api.proxy.player.TabList} or not in
|
||||
* anonymous TabList mode.
|
||||
* This feature was introduced in 1.18.
|
||||
*
|
||||
* @return whether or not the client explicitly allows listing. Always false on older clients.
|
||||
*/
|
||||
boolean isClientListingAllowed();
|
||||
|
||||
enum ChatMode {
|
||||
SHOWN,
|
||||
COMMANDS_ONLY,
|
||||
|
@ -74,5 +74,9 @@ public class ClientSettingsWrapper implements PlayerSettings {
|
||||
return settings.getMainHand() == 1 ? MainHand.RIGHT : MainHand.LEFT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClientListingAllowed() {
|
||||
return settings.isClientListingAllowed();
|
||||
}
|
||||
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren