Help us shape the future of Go! Take the 2026 Go Developer Survey

plugin

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PlayerEnterLeaveMessage = regexp.MustCompile(`(left|joined) the game`)
View Source
var ScoreboardTrackedPlayer = regexp.MustCompile(`There are \d tracked .*?:\s?(.*)`)
View Source
var ScoreboardTrackedPlayerScore = regexp.MustCompile(`^.*? has (\d+)`)

Functions

This section is empty.

Types

type BasePlugin

type BasePlugin struct {
	// contains filtered or unexported fields
}

func (*BasePlugin) DisplayName

func (bp *BasePlugin) DisplayName() string

func (*BasePlugin) DisplayScoreboard

func (bp *BasePlugin) DisplayScoreboard(name string, slot string)

func (*BasePlugin) EnsureScoreboard

func (bp *BasePlugin) EnsureScoreboard(name string, criterion string, displayName []tellraw.Message)

func (*BasePlugin) GetAllScore

func (bp *BasePlugin) GetAllScore() (scores map[string]map[string]int64)

func (*BasePlugin) GetOneScore

func (bp *BasePlugin) GetOneScore(player string, name string) (scores int64)

func (*BasePlugin) GetPlayerInfo

func (bp *BasePlugin) GetPlayerInfo(player string) (*MinecraftPlayerInfo, error)

func (*BasePlugin) GetPlayerInfo_Position

func (bp *BasePlugin) GetPlayerInfo_Position(player string) (*MinecraftPlayerInfo, error)

func (*BasePlugin) GetPlayerList

func (bp *BasePlugin) GetPlayerList() []string

func (*BasePlugin) GetWorldName

func (bp *BasePlugin) GetWorldName(namespace_id string) string

func (*BasePlugin) Init

func (bp *BasePlugin) Init(pm pluginabi.PluginManager, plugin pluginabi.Plugin) error

func (*BasePlugin) Name

func (bp *BasePlugin) Name() string

func (*BasePlugin) Pause

func (bp *BasePlugin) Pause()

func (*BasePlugin) Println

func (bp *BasePlugin) Println(a ...any) (int, error)

func (*BasePlugin) RegisterCommand

func (bp *BasePlugin) RegisterCommand(command string, commandFunc func(string, ...string)) error

func (*BasePlugin) RegisterTrigger

func (bp *BasePlugin) RegisterTrigger(goFunc tellraw.GoFunc) (name string)

func (*BasePlugin) RegisterTriggerBatch

func (bp *BasePlugin) RegisterTriggerBatch(goFunc ...tellraw.GoFunc) (name []string)

func (*BasePlugin) RunCommand

func (bp *BasePlugin) RunCommand(command string) string

func (*BasePlugin) ScoreAction

func (bp *BasePlugin) ScoreAction(player string, name string, action string, count int64)

func (*BasePlugin) Start

func (bp *BasePlugin) Start()

func (*BasePlugin) Teleport

func (bp *BasePlugin) Teleport(src string, dst any) error

func (*BasePlugin) Tellraw

func (bp *BasePlugin) Tellraw(Target string, msg []tellraw.Message)

func (*BasePlugin) TellrawError

func (bp *BasePlugin) TellrawError(Target string, err error)

type MinecraftPlayerInfo

type MinecraftPlayerInfo struct {
	Player       string
	Location     *MinecraftPosition
	LastLocation *MinecraftPosition
	UUID         string
	Extra        MinecraftPlayerInfo_Extra
	// contains filtered or unexported fields
}

func (*MinecraftPlayerInfo) Commit

func (mpi *MinecraftPlayerInfo) Commit() error

func (*MinecraftPlayerInfo) GetExtra

func (mpi *MinecraftPlayerInfo) GetExtra(context pluginabi.PluginName, v any) error

func (*MinecraftPlayerInfo) PutExtra

func (mpi *MinecraftPlayerInfo) PutExtra(context pluginabi.PluginName, extra any)

type MinecraftPlayerInfo_Extra

type MinecraftPlayerInfo_Extra map[string]any

func (*MinecraftPlayerInfo_Extra) UnmarshalJSON

func (extra *MinecraftPlayerInfo_Extra) UnmarshalJSON(data []byte) error

type MinecraftPosition

type MinecraftPosition struct {
	Position  [3]float64
	Dimension string
}

type PlayerInfo

type PlayerInfo struct {
	BasePlugin
	// contains filtered or unexported fields
}

func (*PlayerInfo) Commit

func (pi *PlayerInfo) Commit(mpi *MinecraftPlayerInfo) error

func (*PlayerInfo) DisplayName

func (pi *PlayerInfo) DisplayName() string

func (*PlayerInfo) GetPlayerInfo

func (pi *PlayerInfo) GetPlayerInfo(player string) (playerInfo *MinecraftPlayerInfo, err error)

func (*PlayerInfo) GetPlayerInfo_Position

func (pi *PlayerInfo) GetPlayerInfo_Position(player string) (playerInfo *MinecraftPlayerInfo, err error)

func (*PlayerInfo) GetPlayerList

func (pi *PlayerInfo) GetPlayerList() []string

func (*PlayerInfo) Init

func (pi *PlayerInfo) Init(pm pluginabi.PluginManager) (err error)

func (*PlayerInfo) Load

func (pi *PlayerInfo) Load() error

func (*PlayerInfo) Name

func (pi *PlayerInfo) Name() string

func (*PlayerInfo) Pause

func (pi *PlayerInfo) Pause()

func (*PlayerInfo) Start

func (pi *PlayerInfo) Start()

type PlayerInfo_Storage

type PlayerInfo_Storage struct {
	PlayerInfo map[string]*MinecraftPlayerInfo

	UUIDMap map[string]string
	// contains filtered or unexported fields
}

func (*PlayerInfo_Storage) Lock

func (s *PlayerInfo_Storage) Lock()

func (*PlayerInfo_Storage) RLock

func (s *PlayerInfo_Storage) RLock()

func (*PlayerInfo_Storage) RUnlock

func (s *PlayerInfo_Storage) RUnlock()

func (*PlayerInfo_Storage) Unlock

func (s *PlayerInfo_Storage) Unlock()

type ScoreboardCore

type ScoreboardCore struct {
	BasePlugin
	// contains filtered or unexported fields
}

func (*ScoreboardCore) DisplayName

func (sc *ScoreboardCore) DisplayName() string

func (*ScoreboardCore) Init

func (*ScoreboardCore) Name

func (sc *ScoreboardCore) Name() string

func (*ScoreboardCore) Start

func (sc *ScoreboardCore) Start()

type SimpleCommand

type SimpleCommand struct {
	BasePlugin
	// contains filtered or unexported fields
}

func (*SimpleCommand) DisplayName

func (sp *SimpleCommand) DisplayName() string

func (*SimpleCommand) Init

func (sp *SimpleCommand) Init(pm pluginabi.PluginManager) (err error)

func (*SimpleCommand) Name

func (sp *SimpleCommand) Name() string

func (*SimpleCommand) RegisterCommand

func (sp *SimpleCommand) RegisterCommand(context pluginabi.PluginName, command string, commandFunc func(string, ...string)) error

type TeleportCore

type TeleportCore struct {
	BasePlugin
}

func (*TeleportCore) DisplayName

func (tc *TeleportCore) DisplayName() string

func (*TeleportCore) Init

func (tc *TeleportCore) Init(pm pluginabi.PluginManager) (err error)

func (*TeleportCore) Name

func (tc *TeleportCore) Name() string

func (*TeleportCore) Teleport

func (tc *TeleportCore) Teleport(src string, dst any) error

func (*TeleportCore) TeleportPlayer

func (tc *TeleportCore) TeleportPlayer(src string, dst string) error

func (*TeleportCore) TeleportPosition

func (tc *TeleportCore) TeleportPosition(src string, dst *MinecraftPosition) error

type TellrawManager

type TellrawManager struct {
	BasePlugin
}

func (*TellrawManager) DisplayName

func (tm *TellrawManager) DisplayName() string

func (*TellrawManager) Init

func (tm *TellrawManager) Init(pm pluginabi.PluginManager) (err error)

func (*TellrawManager) Name

func (tm *TellrawManager) Name() string

func (*TellrawManager) Tellraw

func (tm *TellrawManager) Tellraw(p pluginabi.PluginName, Target string, msg []tellraw.Message)

Source Files

  • baseplugin.go
  • playerinfo.go
  • scoreboard.go
  • simplecommand.go
  • teleportcore.go
  • tellraw.go
  • worldname.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL