Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSettings = NewSettings(&packet.ClientSettings{ Locale: "en_US", ViewDistance: 10, ChatColors: true, SkinParts: 127, MainHand: 1, })
Functions ¶
This section is empty.
Types ¶
type Settings ¶
type Settings interface { Locale() language.Tag // Locale of the Minecraft client. // Returns the client's view distance. This does not guarantee the client will see this many // chunks, since your servers are responsible for sending the chunks. ViewDistance() uint8 ChatMode() ChatMode // The chat setting of the client. ChatColors() bool // Whether or not the client has chat colors disabled. SkinParts() SkinParts // The parts of player skins the client will show. MainHand() MainHand // The primary hand of the client. }
Settings are the client settings the player gave us.
func NewSettings ¶
func NewSettings(packet *packet.ClientSettings) Settings
type SkinParts ¶
type SkinParts byte
func (SkinParts) LeftSleeve ¶
func (SkinParts) RightPants ¶
func (SkinParts) RightSleeve ¶
type TabList ¶ added in v0.8.0
type TabList interface { // TODO AddEntry(TabListEntry) // TODO RemoveEntry(ID) // Determines if the specified entry exists in the tab list. HasEntry(id uuid.UUID) bool }
TabList is the tab list of a proxy.Player.
type TabListEntry ¶ added in v0.8.0
type TabListEntry interface { // Returns the profile of the entry, which uniquely identifies the entry with its // containing uuid, as well as deciding what is shown as the player head in the tab list. Profile() profile.GameProfile // Returns the optional text displayed for this entry in the TabList, // otherwise profile.GameProfile.Name is shown and returns nil. DisplayName() component.Component // Gets the game mode the entry has been set to. GameMode() int // Returns the latency for the entry. // // The icon shown in the tab list is calculated // by the millisecond latency as follows: // // A negative latency will display the no connection icon // 0-150 will display 5 bars // 150-300 will display 4 bars // 300-600 will display 3 bars // 600-1000 will display 2 bars // A latency move than 1 second will display 1 bar // Latency() time.Duration }
TabListEntry is a single entry in a TabList.
Click to show internal directories.
Click to hide internal directories.