Documentation
¶
Index ¶
- func LoadPlugins(srv *Server)
- func SetPluginDir(dir string)
- func SetServer(srv *Server)
- func ShutdownPlugins()
- type Allower
- type BanListEnum
- type BlockName
- type Bool
- type CmdName
- type Config
- type DamageCauseEnum
- type DefaultGameModeEnum
- type DifficultyEnum
- type EffectEnum
- type Enchant
- type EntityEvent
- type GameRule
- type GamemodeEnum
- type Gma
- type Gmc
- type Gms
- type Gmsp
- type HudElementEnum
- type InputPermissionEnum
- type ItemName
- type Listener
- type LocateEnum
- type MaskMode
- type MobEventEnum
- type MobName
- type MusicAction
- type OldBlockHandling
- type PackStackEnum
- type ParticleType
- type Permission
- type PermissionAction
- type PermissionBoolEnum
- type Plugin
- type PluginContext
- type PluginMeta
- type Server
- func (srv *Server) Accept() iter.Seq[*player.Player]
- func (srv *Server) AddResourcePack(pack *resource.Pack)
- func (srv *Server) Close() error
- func (srv *Server) CloseOnProgramEnd()
- func (srv *Server) End() *world.World
- func (srv *Server) Listen()
- func (srv *Server) MaxPlayerCount() int
- func (srv *Server) Nether() *world.World
- func (srv *Server) Player(uuid uuid.UUID) (*world.EntityHandle, bool)
- func (srv *Server) PlayerByName(name string) (*world.EntityHandle, bool)
- func (srv *Server) PlayerByXUID(xuid string) (*world.EntityHandle, bool)
- func (srv *Server) PlayerCount() int
- func (srv *Server) Players(tx *world.Tx) iter.Seq[*player.Player]
- func (srv *Server) RefreshPlayersCommands()
- func (srv *Server) World() *world.World
- type Setting
- type SoundType
- type StructureRotation
- type StructureSaveMode
- type TimeOfDayEnum
- type TitleRawSetEnum
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPlugins ¶
func LoadPlugins(srv *Server)
func SetPluginDir ¶
func SetPluginDir(dir string)
func ShutdownPlugins ¶
func ShutdownPlugins()
Types ¶
type Allower ¶
type Allower interface {
Allow(addr net.Addr, d login.IdentityData, c login.ClientData) (string, bool)
}
type BanListEnum ¶
type BanListEnum string
func (BanListEnum) Type ¶
func (BanListEnum) Type() string
type Config ¶
type Config struct {
Log *slog.Logger
Listeners []func(conf Config) (Listener, error)
Name string
Resources []*resource.Pack
ResourcesRequired bool
DisableResourceBuilding bool
Allower Allower
AuthDisabled bool
BehindProxy bool
MuteEmoteChat bool
MaxPlayers int
MaxChunkRadius int
JoinMessage, QuitMessage, ShutdownMessage chat.Translation
StatusProvider minecraft.ServerStatusProvider
Compression packet.Compression
PlayerProvider player.Provider
WorldProvider world.Provider
ReadOnlyWorld bool
Generator func(dim world.Dimension) world.Generator
RandomTickSpeed int
SaveInterval time.Duration
ChunkUnloadInterval time.Duration
ChunkLoadWorkers int
Entities world.EntityRegistry
Blocks world.BlockRegistry
}
type DamageCauseEnum ¶
type DamageCauseEnum string
func (DamageCauseEnum) Type ¶
func (DamageCauseEnum) Type() string
type DefaultGameModeEnum ¶
type DefaultGameModeEnum string
func (DefaultGameModeEnum) Type ¶
func (DefaultGameModeEnum) Type() string
type DifficultyEnum ¶
type DifficultyEnum string
func (DifficultyEnum) Type ¶
func (DifficultyEnum) Type() string
type EntityEvent ¶
type EntityEvent string
func (EntityEvent) Type ¶
func (EntityEvent) Type() string
type GamemodeEnum ¶
type GamemodeEnum string
func (GamemodeEnum) Type ¶
func (GamemodeEnum) Type() string
type HudElementEnum ¶
type HudElementEnum string
func (HudElementEnum) Type ¶
func (HudElementEnum) Type() string
type InputPermissionEnum ¶
type InputPermissionEnum string
func (InputPermissionEnum) Type ¶
func (InputPermissionEnum) Type() string
type MobEventEnum ¶
type MobEventEnum string
func (MobEventEnum) Type ¶
func (MobEventEnum) Type() string
type MusicAction ¶
type MusicAction string
func (MusicAction) Type ¶
func (MusicAction) Type() string
type OldBlockHandling ¶
type OldBlockHandling string
func (OldBlockHandling) Type ¶
func (OldBlockHandling) Type() string
type PackStackEnum ¶
type PackStackEnum string
func (PackStackEnum) Type ¶
func (PackStackEnum) Type() string
type ParticleType ¶
type ParticleType string
func (ParticleType) Type ¶
func (ParticleType) Type() string
type PermissionAction ¶
type PermissionAction string
func (PermissionAction) Type ¶
func (PermissionAction) Type() string
type PermissionBoolEnum ¶
type PermissionBoolEnum string
func (PermissionBoolEnum) Type ¶
func (PermissionBoolEnum) Type() string
type Plugin ¶
type Plugin interface {
Meta() PluginMeta
OnLoad(ctx PluginContext)
OnEnable()
OnDisable()
OnUnload()
}
func AllPlugins ¶
func AllPlugins() []Plugin
func LoadPlugin ¶
func PluginByName ¶
func UnloadPlugin ¶
type PluginContext ¶
type PluginMeta ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddResourcePack ¶
func (*Server) CloseOnProgramEnd ¶
func (srv *Server) CloseOnProgramEnd()
func (*Server) MaxPlayerCount ¶
func (*Server) PlayerByName ¶
func (srv *Server) PlayerByName(name string) (*world.EntityHandle, bool)
func (*Server) PlayerByXUID ¶
func (srv *Server) PlayerByXUID(xuid string) (*world.EntityHandle, bool)
func (*Server) PlayerCount ¶
func (*Server) RefreshPlayersCommands ¶
func (srv *Server) RefreshPlayersCommands()
type StructureRotation ¶
type StructureRotation string
func (StructureRotation) Type ¶
func (StructureRotation) Type() string
type StructureSaveMode ¶
type StructureSaveMode string
func (StructureSaveMode) Type ¶
func (StructureSaveMode) Type() string
type TimeOfDayEnum ¶
type TimeOfDayEnum string
func (TimeOfDayEnum) Type ¶
func (TimeOfDayEnum) Type() string
type TitleRawSetEnum ¶
type TitleRawSetEnum string
func (TitleRawSetEnum) Type ¶
func (TitleRawSetEnum) Type() string
type UserConfig ¶
type UserConfig struct {
Network struct {
Address string
}
Server struct {
Name string
AuthEnabled bool
DisableJoinQuitMessages bool
MuteEmoteChat bool
BehindProxy bool
}
World struct {
SaveData bool
Folder string
}
Players struct {
MaxCount int
MaximumChunkRadius int
SaveData bool
Folder string
}
Resources struct {
AutoBuildPack bool
Folder string
Required bool
}
}
func DefaultConfig ¶
func DefaultConfig() UserConfig
Source Files
¶
Click to show internal directories.
Click to hide internal directories.