Versions in this module Expand all Collapse all v1 v1.0.2 Mar 7, 2025 Changes in this version type Wrapper + func (w *Wrapper) WriteToConsole(cmd string) error v1.0.1 Mar 7, 2025 Changes in this version type Wrapper + func (w *Wrapper) ConsoleLogs() <-chan string + func (w *Wrapper) SetConsoleLogsChan(ch chan string) v1.0.0 Feb 25, 2025 v0 v0.1.1 Feb 25, 2025 Changes in this version + var PrintLogMessages = false v0.1.0 Feb 23, 2025 Changes in this version + const ClockSyncInterval + const GameTickPerSecond + const MarketCloseTick + const MarketOpenTick + const WrapperOffline + const WrapperOnline + const WrapperSaving + const WrapperStarting + const WrapperStopping + var ErrPlayerNotFound = errors.New("player not found") + var ErrUnknownItem = errors.New("unknown item") + var ErrWrapperNotOnline = errors.New("not online") + var ErrWrapperResponseTimeout = errors.New("response timeout") + type Abilities map[string]float64 + type Attribute struct + Base float64 + Name string + type BanListType string + const BanIPs + const BanPlayers + type Brain map[string]map[string]interface + type Console interface + Kill func() error + ReadLine func() (string, error) + Start func() error + WriteCmd func(string) error + type DataGetOutput struct + Abilities Abilities + AbsorptionAmount float64 + Air int + Attributes []Attribute + Brain Brain + DataVersion int + DeathTime int + Dimension string + EnderItems []interface{} + FallDistance float64 + FallFlying int + Fire int + FoodExhaustionLevel float64 + FoodLevel int + FoodSaturationLevel float64 + FoodTickTimer int + Health float64 + HurtByTimestamp int + HurtTime int + Inventory Inventory + Invulnerable int + Motion []float64 + OnGround int + PlayerGameType int + PortalCooldown int + Pos []float64 + PreviousPlayerGameType int + RecipeBook RecipeBook + Rotation []float64 + Score int + SeenCredits int + SelectedItemSlot int + SleepTimer int + SpawnForced int + UUID []interface{} + XpLevel int + XpP float64 + XpSeed int + XpTotal int + type ExperienceType string + const Levels + const Points + type GameDifficulty string + const Easy + const Hard + const Normal + const Peaceful + type GameMode string + const Adventure + const Creative + const Spectator + const Survival + type Inventory []map[string]interface + type JavaExec interface + Kill func() error + Start func() error + Stdin func() io.WriteCloser + Stdout func() io.ReadCloser + type LogParser func(string, int) (events.Event, events.EventType) + type Player struct + Name string + UUID string + type RecipeBook struct + IsBlastingFurnaceFilteringCraftable int + IsBlastingFurnaceGuiOpen int + IsFilteringCraftable int + IsFurnaceFilteringCraftable int + IsFurnaceGuiOpen int + IsGuiOpen int + IsSmokerFilteringCraftable int + IsSmokerGuiOpen int + Recipes []string + ToBeDisplayed []string + type Wrapper struct + Version string + func NewDefaultWrapper(server string, initial string, max string) (*Wrapper, error) + func NewWrapper(c Console, p LogParser) *Wrapper + func (w *Wrapper) Ban(player, reason string) error + func (w *Wrapper) BanIP(ip, reason string) error + func (w *Wrapper) BanList(t BanListType) ([]string, error) + func (w *Wrapper) DataGet(t, id string) (*DataGetOutput, error) + func (w *Wrapper) DeOp(player string) error + func (w *Wrapper) DefaultGameMode(mode GameMode) error + func (w *Wrapper) Difficulty(d GameDifficulty) error + func (w *Wrapper) ExperienceAdd(target string, xp int32, xpType ExperienceType) error + func (w *Wrapper) ExperienceQuery(target string, xpType ExperienceType) (int, error) + func (w *Wrapper) ForceLoadRemoveAll() error + func (w *Wrapper) GameEvents() <-chan events.GameEvent + func (w *Wrapper) Give(target, item string, count int) error + func (w *Wrapper) Kick(target, reason string) error + func (w *Wrapper) Kill() error + func (w *Wrapper) List() []Player + func (w *Wrapper) Loaded() <-chan bool + func (w *Wrapper) Op(player string) error + func (w *Wrapper) Reload() error + func (w *Wrapper) SaveAll(flush bool) error + func (w *Wrapper) SaveOff() error + func (w *Wrapper) SaveOn() error + func (w *Wrapper) Say(msg string) error + func (w *Wrapper) Seed() (int, error) + func (w *Wrapper) SetIdleTimeout(minutes uint32) error + func (w *Wrapper) Start() error + func (w *Wrapper) State() string + func (w *Wrapper) Stop() error + func (w *Wrapper) Tell(target, msg string) error + func (w *Wrapper) Tick() int