Documentation
¶
Index ¶
- func InitArenas(log *slog.Logger)
- type Arena
- func (a *Arena) BroadcastMessaget(translationName string, args ...any)
- func (a *Arena) DropAllowed() bool
- func (a *Arena) HandleBlockBreak(ctx *player.Context, pos cube.Pos, drops *[]item.Stack, xp *int)
- func (a *Arena) HandleBlockPlace(ctx *player.Context, pos cube.Pos, b world.Block)
- func (a *Arena) HandleFoodLoss(ctx *player.Context, from int, to *int)
- func (a *Arena) HandleHeal(ctx *player.Context, health *float64, src world.HealingSource)
- func (a *Arena) HandleHurt(ctx *player.Context, damage *float64, immune bool, immunity *time.Duration, ...)
- func (a *Arena) HandleItemDrop(ctx *player.Context, s item.Stack)
- func (a *Arena) HandleItemUse(ctx *player.Context)
- func (a *Arena) HandleMove(ctx *player.Context, pos mgl64.Vec3, rot cube.Rotation)
- func (a *Arena) HandleStartBreak(ctx *player.Context, pos cube.Pos)
- func (a *Arena) Icon() string
- func (a *Arena) Init() error
- func (a *Arena) IsInArena(u *user.User) bool
- func (a *Arena) Join(p *player.Player, tx *world.Tx) error
- func (a *Arena) OnKill(p *player.Player, par *Participant)
- func (a *Arena) ParticipantByXUID(xuid string) (*Participant, bool)
- func (a *Arena) Participants() map[string]*Participant
- func (a *Arena) Quit(p *player.Player) error
- func (a *Arena) Respawn(p *player.Player) error
- type Participant
- func (par *Participant) Combat() int
- func (par *Participant) InCombat() bool
- func (par *Participant) LastAttackedBy() string
- func (par *Participant) LastAttackedByWithMaxDuration(maxDuration time.Duration) string
- func (par *Participant) OnKill()
- func (par *Participant) Player(tx *world.Tx) (*player.Player, bool)
- func (par *Participant) StoreLastAttackedBy(xuid string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitArenas ¶
Types ¶
type Arena ¶
type Arena struct {
// contains filtered or unexported fields
}
func BuildArena ¶
func BuildArena() *Arena
func ClassicArena ¶
func ClassicArena() *Arena
func NoDebuffArena ¶
func NoDebuffArena() *Arena
func (*Arena) BroadcastMessaget ¶
func (*Arena) DropAllowed ¶
func (*Arena) HandleBlockBreak ¶
func (*Arena) HandleBlockPlace ¶
func (*Arena) HandleFoodLoss ¶
func (*Arena) HandleHeal ¶
func (*Arena) HandleHurt ¶
func (*Arena) HandleItemUse ¶
func (*Arena) HandleMove ¶
func (*Arena) HandleStartBreak ¶
func (*Arena) ParticipantByXUID ¶
func (a *Arena) ParticipantByXUID(xuid string) (*Participant, bool)
func (*Arena) Participants ¶
func (a *Arena) Participants() map[string]*Participant
type Participant ¶
type Participant struct {
// contains filtered or unexported fields
}
func (*Participant) Combat ¶
func (par *Participant) Combat() int
func (*Participant) InCombat ¶
func (par *Participant) InCombat() bool
func (*Participant) LastAttackedBy ¶
func (par *Participant) LastAttackedBy() string
func (*Participant) LastAttackedByWithMaxDuration ¶
func (par *Participant) LastAttackedByWithMaxDuration(maxDuration time.Duration) string
func (*Participant) OnKill ¶
func (par *Participant) OnKill()
func (*Participant) StoreLastAttackedBy ¶
func (par *Participant) StoreLastAttackedBy(xuid string)
Click to show internal directories.
Click to hide internal directories.