Documentation
¶
Index ¶
- type IPlayer
- type PlayerRegistry
- func (r *PlayerRegistry) GetPlayerFromEID(eid int32) *connplayer.ConnectedPlayer
- func (r *PlayerRegistry) GetPlayerFromUUID(uuid uuid.UUID) *connplayer.ConnectedPlayer
- func (r *PlayerRegistry) GetPlayers() []*connplayer.ConnectedPlayer
- func (r *PlayerRegistry) RegisterPlayer(p *connplayer.ConnectedPlayer) bool
- func (r *PlayerRegistry) UnregisterPlayer(p *connplayer.ConnectedPlayer) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPlayer ¶
type IPlayer interface { entity.LivingEntity Username() string Profile() *profile.PlayerProfile ClientSettings() clientsettings.ClientSettings Position() world.Position SendMessage(msg component.IChatComponent) SendActionbar(msg component.IChatComponent) Disconnect(msg component.IChatComponent) WritePacket(packet protocol.PacketOut) error KnownChunks() map[chunk.ChunkKey]bool Team() *team.Team SetTeam(team *team.Team) OpenInventory(inventory inventory.Inventory) PlayerInventory() *playerinventory.PlayerInventory UpdateInventory() SetTablistHeader(header component.IChatComponent) SendTitle(title component.IChatComponent, subtitle component.IChatComponent, fadein int32, stay int32, fadeout int32) PlaySound(Location world.BlockPosition, Sound types.SoundEffect, volume float32, pitch float32) FoodLevel() int SetFoodLevel(foodLevel int) Saturation() float32 SetSaturation(saturation float32) Gamemode() types.Gamemode SetGamemode(gamemode types.Gamemode) GetMetadata() metadata.MetadataMap SetSneaking(sneaking bool) IsSneaking() bool SetBlocking(blocking bool) IsBlocking() bool }
type PlayerRegistry ¶
type PlayerRegistry struct {
// contains filtered or unexported fields
}
func NewPlayerRegistry ¶
func NewPlayerRegistry() *PlayerRegistry
func (*PlayerRegistry) GetPlayerFromEID ¶
func (r *PlayerRegistry) GetPlayerFromEID(eid int32) *connplayer.ConnectedPlayer
func (*PlayerRegistry) GetPlayerFromUUID ¶
func (r *PlayerRegistry) GetPlayerFromUUID(uuid uuid.UUID) *connplayer.ConnectedPlayer
func (*PlayerRegistry) GetPlayers ¶
func (r *PlayerRegistry) GetPlayers() []*connplayer.ConnectedPlayer
func (*PlayerRegistry) RegisterPlayer ¶
func (r *PlayerRegistry) RegisterPlayer(p *connplayer.ConnectedPlayer) bool
func (*PlayerRegistry) UnregisterPlayer ¶
func (r *PlayerRegistry) UnregisterPlayer(p *connplayer.ConnectedPlayer) bool
Click to show internal directories.
Click to hide internal directories.