3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-09-29 06:30:16 +02:00

Add new ClientSettings API

Add the new API introducted with the ClientSettings packet changes in 1.18
Dieser Commit ist enthalten in:
FivePB 2021-11-25 17:04:10 +01:00
Ursprung 7cc40f8fea
Commit 7ed4f4c03a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 83388B2D30E5DDA2
2 geänderte Dateien mit 14 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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,

Datei anzeigen

@ -74,5 +74,9 @@ public class ClientSettingsWrapper implements PlayerSettings {
return settings.getMainHand() == 1 ? MainHand.RIGHT : MainHand.LEFT;
}
@Override
public boolean isClientListingAllowed() {
return settings.isClientListingAllowed();
}
}