Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +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();
|
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 {
|
enum ChatMode {
|
||||||
SHOWN,
|
SHOWN,
|
||||||
COMMANDS_ONLY,
|
COMMANDS_ONLY,
|
||||||
|
@ -74,5 +74,9 @@ public class ClientSettingsWrapper implements PlayerSettings {
|
|||||||
return settings.getMainHand() == 1 ? MainHand.RIGHT : MainHand.LEFT;
|
return settings.getMainHand() == 1 ? MainHand.RIGHT : MainHand.LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isClientListingAllowed() {
|
||||||
|
return settings.isClientListingAllowed();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren