Expand API to get all player sent settings

This commit is contained in:
Foorack
2017-08-09 16:38:03 +10:00
committed by md_5
parent da88d5c502
commit dbf20957a9
4 changed files with 202 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package net.md_5.bungee.api;
/**
* Represents a player's skin settings. These settings can be changed by the
* player under Skin Configuration in the Options menu.
*/
public interface SkinConfiguration
{
boolean hasCape();
boolean hasJacket();
boolean hasLeftSleeve();
boolean hasRightSleeve();
boolean hasLeftPants();
boolean hasRightPants();
boolean hasHat();
}

View File

@@ -6,6 +6,7 @@ import java.util.UUID;
import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.SkinConfiguration;
import net.md_5.bungee.api.Title;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.config.ServerInfo;
@@ -17,6 +18,34 @@ import net.md_5.bungee.api.config.ServerInfo;
public interface ProxiedPlayer extends Connection, CommandSender
{
/**
* Represents the player's chat state.
*/
public enum ChatMode
{
/**
* The player will see all chat.
*/
SHOWN,
/**
* The player will only see everything except messages marked as chat.
*/
COMMANDS_ONLY,
/**
* The chat is completely disabled, the player won't see anything.
*/
HIDDEN;
}
public enum MainHand
{
LEFT,
RIGHT;
}
/**
* Gets this player's display name.
*
@@ -142,6 +171,41 @@ public interface ProxiedPlayer extends Connection, CommandSender
*/
Locale getLocale();
/**
* Gets this player's view distance.
*
* @return the view distance, or a reasonable default
*/
byte getViewDistance();
/**
* Gets this player's chat mode.
*
* @return the chat flags set, or a reasonable default
*/
ChatMode getChatMode();
/**
* Gets if this player has chat colors enabled or disabled.
*
* @return if chat colors are enabled
*/
boolean hasChatColors();
/**
* Gets this player's skin settings.
*
* @return the players skin setting
*/
SkinConfiguration getSkinParts();
/**
* Gets this player's main hand setting.
*
* @return main hand setting
*/
MainHand getMainHand();
/**
* Set the header and footer displayed in the tab player list.
*