diff --git a/plugin/adapters/handlers/player.go b/plugin/adapters/handlers/player.go index 869161e..901fad4 100644 --- a/plugin/adapters/handlers/player.go +++ b/plugin/adapters/handlers/player.go @@ -2,11 +2,17 @@ package handlers import ( "fmt" + "net" + "time" "github.com/df-mc/dragonfly/server/block/cube" "github.com/df-mc/dragonfly/server/cmd" "github.com/df-mc/dragonfly/server/item" "github.com/df-mc/dragonfly/server/player" + "github.com/df-mc/dragonfly/server/player/skin" + "github.com/df-mc/dragonfly/server/session" + "github.com/df-mc/dragonfly/server/world" + "github.com/go-gl/mathgl/mgl64" "github.com/secmc/plugin/plugin/ports" ) @@ -20,31 +26,155 @@ func NewPlayerHandler(manager ports.EventManager) player.Handler { } func (h *PlayerHandler) HandleChat(ctx *player.Context, message *string) { - if h.manager == nil { - return - } h.manager.EmitChat(ctx, ctx.Val(), message) } +func (h *PlayerHandler) HandleMove(ctx *player.Context, newPos mgl64.Vec3, newRot cube.Rotation) { + h.manager.EmitPlayerMove(ctx, ctx.Val(), newPos, newRot) +} + +func (h *PlayerHandler) HandleJump(p *player.Player) { + h.manager.EmitPlayerJump(p) +} + +func (h *PlayerHandler) HandleTeleport(ctx *player.Context, pos mgl64.Vec3) { + h.manager.EmitPlayerTeleport(ctx, ctx.Val(), pos) +} + +func (h *PlayerHandler) HandleChangeWorld(p *player.Player, before, after *world.World) { + h.manager.EmitPlayerChangeWorld(p, before, after) +} + +func (h *PlayerHandler) HandleToggleSprint(ctx *player.Context, after bool) { + h.manager.EmitPlayerToggleSprint(ctx, ctx.Val(), after) +} + +func (h *PlayerHandler) HandleToggleSneak(ctx *player.Context, after bool) { + h.manager.EmitPlayerToggleSneak(ctx, ctx.Val(), after) +} + +func (h *PlayerHandler) HandleFoodLoss(ctx *player.Context, from int, to *int) { + h.manager.EmitPlayerFoodLoss(ctx, ctx.Val(), from, to) +} + +func (h *PlayerHandler) HandleHeal(ctx *player.Context, health *float64, src world.HealingSource) { + h.manager.EmitPlayerHeal(ctx, ctx.Val(), health, src) +} + +func (h *PlayerHandler) HandleHurt(ctx *player.Context, damage *float64, immune bool, attackImmunity *time.Duration, src world.DamageSource) { + h.manager.EmitPlayerHurt(ctx, ctx.Val(), damage, immune, attackImmunity, src) +} + +func (h *PlayerHandler) HandleDeath(p *player.Player, src world.DamageSource, keepInv *bool) { + h.manager.EmitPlayerDeath(p, src, keepInv) +} + +func (h *PlayerHandler) HandleRespawn(p *player.Player, pos *mgl64.Vec3, w **world.World) { + h.manager.EmitPlayerRespawn(p, pos, w) +} + +func (h *PlayerHandler) HandleSkinChange(ctx *player.Context, skin *skin.Skin) { + h.manager.EmitPlayerSkinChange(ctx, ctx.Val(), skin) +} + +func (h *PlayerHandler) HandleFireExtinguish(ctx *player.Context, pos cube.Pos) { + h.manager.EmitPlayerFireExtinguish(ctx, ctx.Val(), pos) +} + +func (h *PlayerHandler) HandleStartBreak(ctx *player.Context, pos cube.Pos) { + h.manager.EmitPlayerStartBreak(ctx, ctx.Val(), pos) +} + func (h *PlayerHandler) HandleCommandExecution(ctx *player.Context, command cmd.Command, args []string) { - if h.manager == nil { - return - } h.manager.EmitCommand(ctx, ctx.Val(), command.Name(), args) } func (h *PlayerHandler) HandleBlockBreak(ctx *player.Context, pos cube.Pos, drops *[]item.Stack, xp *int) { - if h.manager == nil { - return - } p := ctx.Val() worldDim := fmt.Sprint(p.Tx().World().Dimension()) h.manager.EmitBlockBreak(ctx, p, pos, drops, xp, worldDim) } func (h *PlayerHandler) HandleQuit(p *player.Player) { - if h.manager == nil { + h.manager.EmitPlayerQuit(p) +} + +func (h *PlayerHandler) HandleBlockPlace(ctx *player.Context, pos cube.Pos, b world.Block) { + h.manager.EmitPlayerBlockPlace(ctx, ctx.Val(), pos, b) +} + +func (h *PlayerHandler) HandleBlockPick(ctx *player.Context, pos cube.Pos, b world.Block) { + h.manager.EmitPlayerBlockPick(ctx, ctx.Val(), pos, b) +} + +func (h *PlayerHandler) HandleItemUse(ctx *player.Context) { + h.manager.EmitPlayerItemUse(ctx, ctx.Val()) +} + +func (h *PlayerHandler) HandleItemUseOnBlock(ctx *player.Context, pos cube.Pos, face cube.Face, clickPos mgl64.Vec3) { + p := ctx.Val() + if p == nil { return } - h.manager.EmitPlayerQuit(p) + var block world.Block + if tx := p.Tx(); tx != nil { + block = tx.Block(pos) + } + h.manager.EmitPlayerItemUseOnBlock(ctx, p, pos, face, clickPos, block) +} + +func (h *PlayerHandler) HandleItemUseOnEntity(ctx *player.Context, e world.Entity) { + h.manager.EmitPlayerItemUseOnEntity(ctx, ctx.Val(), e) +} + +func (h *PlayerHandler) HandleItemRelease(ctx *player.Context, it item.Stack, dur time.Duration) { + h.manager.EmitPlayerItemRelease(ctx, ctx.Val(), it, dur) +} + +func (h *PlayerHandler) HandleItemConsume(ctx *player.Context, it item.Stack) { + h.manager.EmitPlayerItemConsume(ctx, ctx.Val(), it) +} + +func (h *PlayerHandler) HandleAttackEntity(ctx *player.Context, e world.Entity, force, height *float64, critical *bool) { + h.manager.EmitPlayerAttackEntity(ctx, ctx.Val(), e, force, height, critical) +} + +func (h *PlayerHandler) HandleExperienceGain(ctx *player.Context, amount *int) { + h.manager.EmitPlayerExperienceGain(ctx, ctx.Val(), amount) +} + +func (h *PlayerHandler) HandlePunchAir(ctx *player.Context) { + h.manager.EmitPlayerPunchAir(ctx, ctx.Val()) +} + +func (h *PlayerHandler) HandleSignEdit(ctx *player.Context, pos cube.Pos, frontSide bool, oldText, newText string) { + h.manager.EmitPlayerSignEdit(ctx, ctx.Val(), pos, frontSide, oldText, newText) +} + +func (h *PlayerHandler) HandleLecternPageTurn(ctx *player.Context, pos cube.Pos, oldPage int, newPage *int) { + h.manager.EmitPlayerLecternPageTurn(ctx, ctx.Val(), pos, oldPage, newPage) +} + +func (h *PlayerHandler) HandleItemDamage(ctx *player.Context, it item.Stack, damage int) { + h.manager.EmitPlayerItemDamage(ctx, ctx.Val(), it, damage) +} + +func (h *PlayerHandler) HandleItemPickup(ctx *player.Context, it *item.Stack) { + h.manager.EmitPlayerItemPickup(ctx, ctx.Val(), it) +} + +func (h *PlayerHandler) HandleHeldSlotChange(ctx *player.Context, from, to int) { + h.manager.EmitPlayerHeldSlotChange(ctx, ctx.Val(), from, to) +} + +func (h *PlayerHandler) HandleItemDrop(ctx *player.Context, it item.Stack) { + h.manager.EmitPlayerItemDrop(ctx, ctx.Val(), it) +} + +func (h *PlayerHandler) HandleTransfer(ctx *player.Context, addr *net.UDPAddr) { + h.manager.EmitPlayerTransfer(ctx, ctx.Val(), addr) +} + +func (h *PlayerHandler) HandleDiagnostics(p *player.Player, d session.Diagnostics) { + h.manager.EmitPlayerDiagnostics(p, d) } diff --git a/plugin/adapters/handlers/world.go b/plugin/adapters/handlers/world.go index 8baf2ba..c718012 100644 --- a/plugin/adapters/handlers/world.go +++ b/plugin/adapters/handlers/world.go @@ -1,36 +1,67 @@ package handlers import ( + "github.com/df-mc/dragonfly/server/block/cube" "github.com/df-mc/dragonfly/server/world" - pb "github.com/secmc/plugin/proto/generated" + "github.com/go-gl/mathgl/mgl64" + "github.com/secmc/plugin/plugin/ports" ) var _ world.Handler = (*WorldHandler)(nil) -type EventBroadcaster interface { - BroadcastEvent(evt *pb.EventEnvelope) - GenerateEventID() string -} - type WorldHandler struct { world.NopHandler - broadcaster EventBroadcaster + manager ports.EventManager } -func NewWorldHandler(broadcaster EventBroadcaster) world.Handler { - return &WorldHandler{broadcaster: broadcaster} +func NewWorldHandler(manager ports.EventManager) world.Handler { + return &WorldHandler{manager: manager} } func (h *WorldHandler) HandleClose(tx *world.Tx) { - if h.broadcaster == nil || tx == nil { - return - } - evt := &pb.EventEnvelope{ - EventId: h.broadcaster.GenerateEventID(), - Type: pb.EventType_WORLD_CLOSE, - Payload: &pb.EventEnvelope_WorldClose{ - WorldClose: &pb.WorldCloseEvent{}, - }, - } - h.broadcaster.BroadcastEvent(evt) + h.manager.EmitWorldClose(tx) +} + +func (h *WorldHandler) HandleLiquidFlow(ctx *world.Context, from, into cube.Pos, liquid world.Liquid, replaced world.Block) { + h.manager.EmitWorldLiquidFlow(ctx, from, into, liquid, replaced) +} + +func (h *WorldHandler) HandleLiquidDecay(ctx *world.Context, pos cube.Pos, before, after world.Liquid) { + h.manager.EmitWorldLiquidDecay(ctx, pos, before, after) +} + +func (h *WorldHandler) HandleLiquidHarden(ctx *world.Context, pos cube.Pos, liquidHardened, otherLiquid, newBlock world.Block) { + h.manager.EmitWorldLiquidHarden(ctx, pos, liquidHardened, otherLiquid, newBlock) +} + +func (h *WorldHandler) HandleSound(ctx *world.Context, s world.Sound, pos mgl64.Vec3) { + h.manager.EmitWorldSound(ctx, s, pos) +} + +func (h *WorldHandler) HandleFireSpread(ctx *world.Context, from, to cube.Pos) { + h.manager.EmitWorldFireSpread(ctx, from, to) +} + +func (h *WorldHandler) HandleBlockBurn(ctx *world.Context, pos cube.Pos) { + h.manager.EmitWorldBlockBurn(ctx, pos) +} + +func (h *WorldHandler) HandleCropTrample(ctx *world.Context, pos cube.Pos) { + h.manager.EmitWorldCropTrample(ctx, pos) +} + +func (h *WorldHandler) HandleLeavesDecay(ctx *world.Context, pos cube.Pos) { + h.manager.EmitWorldLeavesDecay(ctx, pos) +} + +func (h *WorldHandler) HandleEntitySpawn(tx *world.Tx, e world.Entity) { + h.manager.EmitWorldEntitySpawn(tx, e) +} + +func (h *WorldHandler) HandleEntityDespawn(tx *world.Tx, e world.Entity) { + h.manager.EmitWorldEntityDespawn(tx, e) +} + +func (h *WorldHandler) HandleExplosion(ctx *world.Context, position mgl64.Vec3, entities *[]world.Entity, blocks *[]cube.Pos, itemDropChance *float64, spawnFire *bool) { + h.manager.EmitWorldExplosion(ctx, position, entities, blocks, itemDropChance, spawnFire) } diff --git a/plugin/adapters/plugin/event_helpers.go b/plugin/adapters/plugin/event_helpers.go new file mode 100644 index 0000000..abddc8c --- /dev/null +++ b/plugin/adapters/plugin/event_helpers.go @@ -0,0 +1,274 @@ +package plugin + +import ( + "fmt" + "net" + "strings" + + "github.com/df-mc/dragonfly/server/block/cube" + "github.com/df-mc/dragonfly/server/item" + "github.com/df-mc/dragonfly/server/player" + "github.com/df-mc/dragonfly/server/player/skin" + "github.com/df-mc/dragonfly/server/session" + "github.com/df-mc/dragonfly/server/world" + "github.com/go-gl/mathgl/mgl64" + pb "github.com/secmc/plugin/proto/generated" +) + +type cancelContext interface { + Cancel() +} + +func playerWorldDimension(p *player.Player) string { + if p == nil { + return "" + } + tx := p.Tx() + if tx == nil { + return "" + } + w := tx.World() + if w == nil { + return "" + } + return strings.ToLower(fmt.Sprint(w.Dimension())) +} + +func worldDimension(w *world.World) string { + if w == nil { + return "" + } + return strings.ToLower(fmt.Sprint(w.Dimension())) +} + +func protoVec3(v mgl64.Vec3) *pb.Vec3 { + return &pb.Vec3{X: v[0], Y: v[1], Z: v[2]} +} + +func protoRotation(r cube.Rotation) *pb.Rotation { + yaw, pitch := r.Elem() + return &pb.Rotation{Yaw: float32(yaw), Pitch: float32(pitch)} +} + +func protoBlockPos(pos cube.Pos) *pb.BlockPos { + return &pb.BlockPos{X: int32(pos.X()), Y: int32(pos.Y()), Z: int32(pos.Z())} +} + +func protoBlockState(b world.Block) *pb.BlockState { + if b == nil { + return nil + } + name, props := b.EncodeBlock() + out := &pb.BlockState{Name: name} + if len(props) > 0 { + out.Properties = make(map[string]string, len(props)) + for k, v := range props { + out.Properties[k] = fmt.Sprint(v) + } + } + return out +} + +func protoLiquidState(l world.Liquid) *pb.LiquidState { + if l == nil { + return nil + } + return &pb.LiquidState{ + Block: protoBlockState(l), + Depth: int32(l.LiquidDepth()), + Falling: l.LiquidFalling(), + LiquidType: l.LiquidType(), + } +} + +func protoLiquidOrBlockState(b world.Block) *pb.LiquidState { + if b == nil { + return nil + } + if l, ok := b.(world.Liquid); ok { + return protoLiquidState(l) + } + return &pb.LiquidState{Block: protoBlockState(b)} +} + +func protoItemStack(it item.Stack) *pb.ItemStack { + if it.Empty() { + return nil + } + itm := it.Item() + if itm == nil { + return nil + } + name, meta := itm.EncodeItem() + return &pb.ItemStack{ + Name: name, + Meta: int32(meta), + Count: int32(it.Count()), + } +} + +func protoItemStackPtr(it *item.Stack) *pb.ItemStack { + if it == nil { + return nil + } + return protoItemStack(*it) +} + +func convertProtoItemStackValue(stack *pb.ItemStack) (item.Stack, bool) { + if stack == nil || stack.Name == "" { + return item.Stack{}, false + } + material, ok := world.ItemByName(stack.Name, int16(stack.Meta)) + if !ok { + return item.Stack{}, false + } + count := int(stack.Count) + if count <= 0 { + return item.Stack{}, false + } + return item.NewStack(material, count), true +} + +func convertProtoBlockPositionsToCube(blocks []*pb.BlockPos) []cube.Pos { + if len(blocks) == 0 { + return nil + } + converted := make([]cube.Pos, 0, len(blocks)) + for _, blk := range blocks { + if blk == nil { + continue + } + converted = append(converted, cube.Pos{int(blk.X), int(blk.Y), int(blk.Z)}) + } + if len(converted) == 0 { + return nil + } + return converted +} + +func vec3FromProto(vec *pb.Vec3) (mgl64.Vec3, bool) { + if vec == nil { + return mgl64.Vec3{}, false + } + return mgl64.Vec3{float64(vec.X), float64(vec.Y), float64(vec.Z)}, true +} + +func parseProtoAddress(addr *pb.Address) *net.UDPAddr { + if addr == nil { + return nil + } + parsed := net.ParseIP(addr.Host) + return &net.UDPAddr{IP: parsed, Port: int(addr.Port)} +} + +func protoWorldRef(w *world.World) *pb.WorldRef { + if w == nil { + return nil + } + ref := &pb.WorldRef{ + Name: w.Name(), + Dimension: worldDimension(w), + } + return ref +} + +func protoDamageSource(src world.DamageSource) *pb.DamageSource { + if src == nil { + return nil + } + desc := fmt.Sprint(src) + ds := &pb.DamageSource{Type: fmt.Sprintf("%T", src)} + if desc != "" { + ds.Description = &desc + } + return ds +} + +func protoHealingSource(src world.HealingSource) *pb.HealingSource { + if src == nil { + return nil + } + desc := fmt.Sprint(src) + hs := &pb.HealingSource{Type: fmt.Sprintf("%T", src)} + if desc != "" { + hs.Description = &desc + } + return hs +} + +func protoEntityRef(e world.Entity) *pb.EntityRef { + if e == nil { + return nil + } + ref := &pb.EntityRef{Type: fmt.Sprintf("%T", e)} + if handle := e.H(); handle != nil { + ref.Uuid = handle.UUID().String() + } + ref.Position = protoVec3(e.Position()) + ref.Rotation = protoRotation(e.Rotation()) + return ref +} + +func protoEntityRefs(list []world.Entity) []*pb.EntityRef { + if len(list) == 0 { + return nil + } + refs := make([]*pb.EntityRef, 0, len(list)) + for _, e := range list { + if ref := protoEntityRef(e); ref != nil { + refs = append(refs, ref) + } + } + if len(refs) == 0 { + return nil + } + return refs +} + +func protoBlockPositions(list []cube.Pos) []*pb.BlockPos { + if len(list) == 0 { + return nil + } + positions := make([]*pb.BlockPos, 0, len(list)) + for _, pos := range list { + positions = append(positions, protoBlockPos(pos)) + } + return positions +} + +func protoAddress(addr *net.UDPAddr) *pb.Address { + if addr == nil { + return nil + } + return &pb.Address{Host: addr.IP.String(), Port: int32(addr.Port)} +} + +func protoSkinSummary(sk *skin.Skin) (fullID, playFabID string, persona bool) { + if sk == nil { + return "", "", false + } + return sk.FullID, sk.PlayFabID, sk.Persona +} + +func applyDiagnosticsFields(evt *pb.PlayerDiagnosticsEvent, d session.Diagnostics) { + evt.AverageFramesPerSecond = d.AverageFramesPerSecond + evt.AverageServerSimTickTime = d.AverageServerSimTickTime + evt.AverageClientSimTickTime = d.AverageClientSimTickTime + evt.AverageBeginFrameTime = d.AverageBeginFrameTime + evt.AverageInputTime = d.AverageInputTime + evt.AverageRenderTime = d.AverageRenderTime + evt.AverageEndFrameTime = d.AverageEndFrameTime + evt.AverageRemainderTimePercent = d.AverageRemainderTimePercent + evt.AverageUnaccountedTimePercent = d.AverageUnaccountedTimePercent +} + +func worldFromContext(ctx *world.Context) *world.World { + if ctx == nil { + return nil + } + tx := ctx.Val() + if tx == nil { + return nil + } + return tx.World() +} diff --git a/plugin/adapters/plugin/manager.go b/plugin/adapters/plugin/manager.go index c0db6a6..55e5cbf 100644 --- a/plugin/adapters/plugin/manager.go +++ b/plugin/adapters/plugin/manager.go @@ -39,6 +39,9 @@ type Manager struct { players map[uuid.UUID]*player.Player commands map[string]commandBinding + worldMu sync.RWMutex + worlds map[string]*world.World + eventCounter atomic.Uint64 playerHandlerFactory ports.PlayerHandlerFactory @@ -66,6 +69,7 @@ func NewManager(srv *server.Server, log *slog.Logger, playerHandlerFactory ports plugins: make(map[string]*pluginProcess), players: make(map[uuid.UUID]*player.Player), commands: make(map[string]commandBinding), + worlds: make(map[string]*world.World), playerHandlerFactory: playerHandlerFactory, worldHandlerFactory: worldHandlerFactory, } @@ -191,6 +195,7 @@ func (m *Manager) AttachWorld(w *world.World) { handler := m.worldHandlerFactory(m) w.Handle(handler) } + m.registerWorld(w) } func (m *Manager) AttachPlayer(p *player.Player) { @@ -274,6 +279,20 @@ func (m *Manager) dispatchEvent(envelope *pb.EventEnvelope, expectResult bool) [ return results } +func (m *Manager) emitCancellable(ctx cancelContext, envelope *pb.EventEnvelope) []*pb.EventResult { + results := m.dispatchEvent(envelope, true) + cancelled := false + for _, res := range results { + if res != nil && res.Cancel != nil && *res.Cancel { + cancelled = true + } + } + if cancelled && ctx != nil { + ctx.Cancel() + } + return results +} + func (m *Manager) BroadcastEvent(evt *pb.EventEnvelope) { m.broadcastEvent(evt) } @@ -304,6 +323,59 @@ func convertProtoDrops(drops []*pb.ItemStack) []item.Stack { return converted } +func (m *Manager) registerWorld(w *world.World) { + if w == nil { + return + } + name := strings.ToLower(w.Name()) + m.worldMu.Lock() + m.worlds[name] = w + m.worldMu.Unlock() +} + +func (m *Manager) unregisterWorld(w *world.World) { + if w == nil { + return + } + name := strings.ToLower(w.Name()) + m.worldMu.Lock() + if existing, ok := m.worlds[name]; ok && existing == w { + delete(m.worlds, name) + } + m.worldMu.Unlock() +} + +func (m *Manager) worldFromRef(ref *pb.WorldRef) *world.World { + if ref == nil { + return nil + } + name := strings.ToLower(ref.Name) + m.worldMu.RLock() + if name != "" { + if w := m.worlds[name]; w != nil { + m.worldMu.RUnlock() + return w + } + for _, candidate := range m.worlds { + if strings.EqualFold(candidate.Name(), ref.Name) { + m.worldMu.RUnlock() + return candidate + } + } + } + if ref.Dimension != "" { + dim := strings.ToLower(ref.Dimension) + for _, candidate := range m.worlds { + if worldDimension(candidate) == dim { + m.worldMu.RUnlock() + return candidate + } + } + } + m.worldMu.RUnlock() + return nil +} + func (m *Manager) handlePluginMessage(p *pluginProcess, msg *pb.PluginToHost) { if result := msg.GetEventResult(); result != nil { p.deliverEventResult(result) diff --git a/plugin/adapters/plugin/player_events.go b/plugin/adapters/plugin/player_events.go deleted file mode 100644 index ec3bc68..0000000 --- a/plugin/adapters/plugin/player_events.go +++ /dev/null @@ -1,97 +0,0 @@ -package plugin - -import ( - "strings" - - "github.com/df-mc/dragonfly/server/player" - pb "github.com/secmc/plugin/proto/generated" -) - -func (m *Manager) EmitPlayerJoin(p *player.Player) { - evt := &pb.EventEnvelope{ - EventId: m.generateEventID(), - Type: pb.EventType_PLAYER_JOIN, - Payload: &pb.EventEnvelope_PlayerJoin{ - PlayerJoin: &pb.PlayerJoinEvent{ - PlayerUuid: p.UUID().String(), - Name: p.Name(), - }, - }, - } - m.broadcastEvent(evt) -} - -func (m *Manager) EmitPlayerQuit(p *player.Player) { - evt := &pb.EventEnvelope{ - EventId: m.generateEventID(), - Type: pb.EventType_PLAYER_QUIT, - Payload: &pb.EventEnvelope_PlayerQuit{ - PlayerQuit: &pb.PlayerQuitEvent{ - PlayerUuid: p.UUID().String(), - Name: p.Name(), - }, - }, - } - m.broadcastEvent(evt) - m.detachPlayer(p) -} - -func (m *Manager) EmitChat(ctx *player.Context, p *player.Player, msg *string) { - if msg == nil { - return - } - evt := &pb.EventEnvelope{ - EventId: m.generateEventID(), - Type: pb.EventType_CHAT, - Payload: &pb.EventEnvelope_Chat{ - Chat: &pb.ChatEvent{ - PlayerUuid: p.UUID().String(), - Name: p.Name(), - Message: *msg, - }, - }, - } - results := m.dispatchEvent(evt, true) - var cancelled bool - for _, res := range results { - if res == nil { - continue - } - if res.Cancel != nil && *res.Cancel { - cancelled = true - } - if chatMut := res.GetChat(); chatMut != nil { - *msg = chatMut.Message - } - } - if cancelled && ctx != nil { - ctx.Cancel() - } -} - -func (m *Manager) EmitCommand(ctx *player.Context, p *player.Player, cmdName string, args []string) { - raw := "/" + cmdName - if len(args) > 0 { - raw += " " + strings.Join(args, " ") - } - evt := &pb.EventEnvelope{ - EventId: m.generateEventID(), - Type: pb.EventType_COMMAND, - Payload: &pb.EventEnvelope_Command{ - Command: &pb.CommandEvent{ - PlayerUuid: p.UUID().String(), - Name: p.Name(), - Raw: raw, - Command: cmdName, - Args: args, - }, - }, - } - results := m.dispatchEvent(evt, true) - for _, res := range results { - if res != nil && res.Cancel != nil && *res.Cancel && ctx != nil { - ctx.Cancel() - break - } - } -} diff --git a/plugin/adapters/plugin/player_events_extended.go b/plugin/adapters/plugin/player_events_extended.go new file mode 100644 index 0000000..89ad45e --- /dev/null +++ b/plugin/adapters/plugin/player_events_extended.go @@ -0,0 +1,907 @@ +package plugin + +import ( + "net" + "strings" + "time" + + "github.com/df-mc/dragonfly/server/block/cube" + "github.com/df-mc/dragonfly/server/item" + "github.com/df-mc/dragonfly/server/player" + "github.com/df-mc/dragonfly/server/player/skin" + "github.com/df-mc/dragonfly/server/session" + "github.com/df-mc/dragonfly/server/world" + "github.com/go-gl/mathgl/mgl64" + pb "github.com/secmc/plugin/proto/generated" +) + +func (m *Manager) EmitPlayerJoin(p *player.Player) { + if p == nil { + return + } + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_JOIN, + Payload: &pb.EventEnvelope_PlayerJoin{ + PlayerJoin: &pb.PlayerJoinEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + }, + }, + }) +} + +func (m *Manager) EmitPlayerQuit(p *player.Player) { + if p == nil { + return + } + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_QUIT, + Payload: &pb.EventEnvelope_PlayerQuit{ + PlayerQuit: &pb.PlayerQuitEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + }, + }, + }) + m.detachPlayer(p) +} + +func (m *Manager) EmitChat(ctx *player.Context, p *player.Player, msg *string) { + if p == nil || msg == nil { + return + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_CHAT, + Payload: &pb.EventEnvelope_Chat{ + Chat: &pb.ChatEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Message: *msg, + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if chatMut := res.GetChat(); chatMut != nil { + *msg = chatMut.Message + } + } +} + +func (m *Manager) EmitCommand(ctx *player.Context, p *player.Player, cmdName string, args []string) { + if p == nil { + return + } + raw := "/" + cmdName + if len(args) > 0 { + raw += " " + strings.Join(args, " ") + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_COMMAND, + Payload: &pb.EventEnvelope_Command{ + Command: &pb.CommandEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Raw: raw, + Command: cmdName, + Args: args, + }, + }, + }) +} + +func (m *Manager) EmitBlockBreak(ctx *player.Context, p *player.Player, pos cube.Pos, drops *[]item.Stack, xp *int, worldDim string) { + if p == nil { + return + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_BLOCK_BREAK, + Payload: &pb.EventEnvelope_BlockBreak{ + BlockBreak: &pb.BlockBreakEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: worldDim, + Position: protoBlockPos(pos), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if bbMut := res.GetBlockBreak(); bbMut != nil { + if drops != nil { + *drops = convertProtoDrops(bbMut.Drops) + } + if bbMut.Xp != nil && xp != nil { + *xp = int(*bbMut.Xp) + } + } + } +} + +func (m *Manager) EmitPlayerMove(ctx *player.Context, p *player.Player, newPos mgl64.Vec3, newRot cube.Rotation) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_MOVE, + Payload: &pb.EventEnvelope_PlayerMove{ + PlayerMove: &pb.PlayerMoveEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoVec3(newPos), + Rotation: protoRotation(newRot), + }, + }, + }) +} + +func (m *Manager) EmitPlayerJump(p *player.Player) { + if p == nil { + return + } + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_JUMP, + Payload: &pb.EventEnvelope_PlayerJump{ + PlayerJump: &pb.PlayerJumpEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoVec3(p.Position()), + }, + }, + }) +} + +func (m *Manager) EmitPlayerTeleport(ctx *player.Context, p *player.Player, pos mgl64.Vec3) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_TELEPORT, + Payload: &pb.EventEnvelope_PlayerTeleport{ + PlayerTeleport: &pb.PlayerTeleportEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoVec3(pos), + }, + }, + }) +} + +func (m *Manager) EmitPlayerChangeWorld(p *player.Player, before, after *world.World) { + if p == nil { + return + } + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_CHANGE_WORLD, + Payload: &pb.EventEnvelope_PlayerChangeWorld{ + PlayerChangeWorld: &pb.PlayerChangeWorldEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Before: protoWorldRef(before), + After: protoWorldRef(after), + }, + }, + }) +} + +func (m *Manager) EmitPlayerToggleSprint(ctx *player.Context, p *player.Player, after bool) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_TOGGLE_SPRINT, + Payload: &pb.EventEnvelope_PlayerToggleSprint{ + PlayerToggleSprint: &pb.PlayerToggleSprintEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + After: after, + }, + }, + }) +} + +func (m *Manager) EmitPlayerToggleSneak(ctx *player.Context, p *player.Player, after bool) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_TOGGLE_SNEAK, + Payload: &pb.EventEnvelope_PlayerToggleSneak{ + PlayerToggleSneak: &pb.PlayerToggleSneakEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + After: after, + }, + }, + }) +} + +func (m *Manager) EmitPlayerFoodLoss(ctx *player.Context, p *player.Player, from int, to *int) { + if p == nil { + return + } + toVal := 0 + if to != nil { + toVal = *to + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_FOOD_LOSS, + Payload: &pb.EventEnvelope_PlayerFoodLoss{ + PlayerFoodLoss: &pb.PlayerFoodLossEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + From: int32(from), + To: int32(toVal), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if mut := res.GetPlayerFoodLoss(); mut != nil && to != nil { + *to = int(mut.To) + } + } +} + +func (m *Manager) EmitPlayerHeal(ctx *player.Context, p *player.Player, health *float64, src world.HealingSource) { + if p == nil { + return + } + amount := 0.0 + if health != nil { + amount = *health + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_HEAL, + Payload: &pb.EventEnvelope_PlayerHeal{ + PlayerHeal: &pb.PlayerHealEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Amount: amount, + Source: protoHealingSource(src), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if mut := res.GetPlayerHeal(); mut != nil && health != nil { + *health = mut.Amount + } + } +} + +func (m *Manager) EmitPlayerHurt(ctx *player.Context, p *player.Player, damage *float64, immune bool, attackImmunity *time.Duration, src world.DamageSource) { + if p == nil { + return + } + dmg := 0.0 + if damage != nil { + dmg = *damage + } + var immunityMS int64 + if attackImmunity != nil { + immunityMS = attackImmunity.Milliseconds() + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_HURT, + Payload: &pb.EventEnvelope_PlayerHurt{ + PlayerHurt: &pb.PlayerHurtEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Damage: dmg, + Immune: immune, + AttackImmunityMs: immunityMS, + Source: protoDamageSource(src), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + mut := res.GetPlayerHurt() + if mut == nil { + continue + } + if damage != nil { + *damage = mut.Damage + } + if attackImmunity != nil && mut.AttackImmunityMs != nil { + *attackImmunity = time.Duration(*mut.AttackImmunityMs) * time.Millisecond + } + } +} + +func (m *Manager) EmitPlayerDeath(p *player.Player, src world.DamageSource, keepInv *bool) { + if p == nil { + return + } + keep := false + if keepInv != nil { + keep = *keepInv + } + results := m.emitCancellable(nil, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_DEATH, + Payload: &pb.EventEnvelope_PlayerDeath{ + PlayerDeath: &pb.PlayerDeathEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Source: protoDamageSource(src), + KeepInventory: keep, + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if mut := res.GetPlayerDeath(); mut != nil && keepInv != nil { + *keepInv = mut.KeepInventory + } + } +} + +func (m *Manager) EmitPlayerRespawn(p *player.Player, pos *mgl64.Vec3, w **world.World) { + if p == nil { + return + } + var vec *pb.Vec3 + if pos != nil { + vec = protoVec3(*pos) + } + var worldRef *pb.WorldRef + if w != nil && *w != nil { + worldRef = protoWorldRef(*w) + } + envelope := &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_RESPAWN, + Payload: &pb.EventEnvelope_PlayerRespawn{ + PlayerRespawn: &pb.PlayerRespawnEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Position: vec, + World: worldRef, + }, + }, + } + results := m.dispatchEvent(envelope, true) + for _, res := range results { + if res == nil { + continue + } + mut := res.GetPlayerRespawn() + if mut == nil { + continue + } + if pos != nil { + if newPos, ok := vec3FromProto(mut.Position); ok { + *pos = newPos + } + } + if w != nil { + if mut.World == nil { + *w = nil + continue + } + if newWorld := m.worldFromRef(mut.World); newWorld != nil { + *w = newWorld + } + } + } +} + +func (m *Manager) EmitPlayerSkinChange(ctx *player.Context, p *player.Player, sk *skin.Skin) { + if p == nil { + return + } + fullID, playFabID, persona := protoSkinSummary(sk) + skinEvent := &pb.PlayerSkinChangeEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Persona: persona, + } + if fullID != "" { + skinEvent.FullId = &fullID + } + if playFabID != "" { + skinEvent.PlayFabId = &playFabID + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_SKIN_CHANGE, + Payload: &pb.EventEnvelope_PlayerSkinChange{ + PlayerSkinChange: skinEvent, + }, + }) +} + +func (m *Manager) EmitPlayerFireExtinguish(ctx *player.Context, p *player.Player, pos cube.Pos) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_FIRE_EXTINGUISH, + Payload: &pb.EventEnvelope_PlayerFireExtinguish{ + PlayerFireExtinguish: &pb.PlayerFireExtinguishEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + }, + }, + }) +} + +func (m *Manager) EmitPlayerStartBreak(ctx *player.Context, p *player.Player, pos cube.Pos) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_START_BREAK, + Payload: &pb.EventEnvelope_PlayerStartBreak{ + PlayerStartBreak: &pb.PlayerStartBreakEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + }, + }, + }) +} + +func (m *Manager) EmitPlayerBlockPlace(ctx *player.Context, p *player.Player, pos cube.Pos, b world.Block) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_BLOCK_PLACE, + Payload: &pb.EventEnvelope_PlayerBlockPlace{ + PlayerBlockPlace: &pb.PlayerBlockPlaceEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + Block: protoBlockState(b), + }, + }, + }) +} + +func (m *Manager) EmitPlayerBlockPick(ctx *player.Context, p *player.Player, pos cube.Pos, b world.Block) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_BLOCK_PICK, + Payload: &pb.EventEnvelope_PlayerBlockPick{ + PlayerBlockPick: &pb.PlayerBlockPickEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + Block: protoBlockState(b), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemUse(ctx *player.Context, p *player.Player) { + if p == nil { + return + } + main, _ := p.HeldItems() + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_USE, + Payload: &pb.EventEnvelope_PlayerItemUse{ + PlayerItemUse: &pb.PlayerItemUseEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Item: protoItemStack(main), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemUseOnBlock(ctx *player.Context, p *player.Player, pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, b world.Block) { + if p == nil { + return + } + main, _ := p.HeldItems() + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_USE_ON_BLOCK, + Payload: &pb.EventEnvelope_PlayerItemUseOnBlock{ + PlayerItemUseOnBlock: &pb.PlayerItemUseOnBlockEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + Face: face.String(), + ClickPosition: protoVec3(clickPos), + Block: protoBlockState(b), + Item: protoItemStack(main), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemUseOnEntity(ctx *player.Context, p *player.Player, target world.Entity) { + if p == nil { + return + } + main, _ := p.HeldItems() + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_USE_ON_ENTITY, + Payload: &pb.EventEnvelope_PlayerItemUseOnEntity{ + PlayerItemUseOnEntity: &pb.PlayerItemUseOnEntityEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Entity: protoEntityRef(target), + Item: protoItemStack(main), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemRelease(ctx *player.Context, p *player.Player, it item.Stack, dur time.Duration) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_RELEASE, + Payload: &pb.EventEnvelope_PlayerItemRelease{ + PlayerItemRelease: &pb.PlayerItemReleaseEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Item: protoItemStack(it), + DurationMs: dur.Milliseconds(), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemConsume(ctx *player.Context, p *player.Player, it item.Stack) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_CONSUME, + Payload: &pb.EventEnvelope_PlayerItemConsume{ + PlayerItemConsume: &pb.PlayerItemConsumeEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Item: protoItemStack(it), + }, + }, + }) +} + +func (m *Manager) EmitPlayerAttackEntity(ctx *player.Context, p *player.Player, target world.Entity, force, height *float64, critical *bool) { + if p == nil { + return + } + main, _ := p.HeldItems() + var forceVal, heightVal float64 + if force != nil { + forceVal = *force + } + if height != nil { + heightVal = *height + } + crit := false + if critical != nil { + crit = *critical + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ATTACK_ENTITY, + Payload: &pb.EventEnvelope_PlayerAttackEntity{ + PlayerAttackEntity: &pb.PlayerAttackEntityEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Entity: protoEntityRef(target), + Force: forceVal, + Height: heightVal, + Critical: crit, + Item: protoItemStack(main), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + mut := res.GetPlayerAttackEntity() + if mut == nil { + continue + } + if force != nil { + *force = mut.Force + } + if height != nil { + *height = mut.Height + } + if critical != nil { + *critical = mut.Critical + } + } +} + +func (m *Manager) EmitPlayerExperienceGain(ctx *player.Context, p *player.Player, amount *int) { + if p == nil { + return + } + amt := 0 + if amount != nil { + amt = *amount + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_EXPERIENCE_GAIN, + Payload: &pb.EventEnvelope_PlayerExperienceGain{ + PlayerExperienceGain: &pb.PlayerExperienceGainEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Amount: int32(amt), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if mut := res.GetPlayerExperienceGain(); mut != nil && amount != nil { + *amount = int(mut.Amount) + } + } +} + +func (m *Manager) EmitPlayerPunchAir(ctx *player.Context, p *player.Player) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_PUNCH_AIR, + Payload: &pb.EventEnvelope_PlayerPunchAir{ + PlayerPunchAir: &pb.PlayerPunchAirEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + }, + }, + }) +} + +func (m *Manager) EmitPlayerSignEdit(ctx *player.Context, p *player.Player, pos cube.Pos, frontSide bool, oldText, newText string) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_SIGN_EDIT, + Payload: &pb.EventEnvelope_PlayerSignEdit{ + PlayerSignEdit: &pb.PlayerSignEditEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + FrontSide: frontSide, + OldText: oldText, + NewText: newText, + }, + }, + }) +} + +func (m *Manager) EmitPlayerLecternPageTurn(ctx *player.Context, p *player.Player, pos cube.Pos, oldPage int, newPage *int) { + if p == nil { + return + } + newPageVal := oldPage + if newPage != nil { + newPageVal = *newPage + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_LECTERN_PAGE_TURN, + Payload: &pb.EventEnvelope_PlayerLecternPageTurn{ + PlayerLecternPageTurn: &pb.PlayerLecternPageTurnEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Position: protoBlockPos(pos), + OldPage: int32(oldPage), + NewPage: int32(newPageVal), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + if mut := res.GetPlayerLecternPageTurn(); mut != nil && newPage != nil { + *newPage = int(mut.NewPage) + } + } +} + +func (m *Manager) EmitPlayerItemDamage(ctx *player.Context, p *player.Player, it item.Stack, damage int) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_DAMAGE, + Payload: &pb.EventEnvelope_PlayerItemDamage{ + PlayerItemDamage: &pb.PlayerItemDamageEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Item: protoItemStack(it), + Damage: int32(damage), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemPickup(ctx *player.Context, p *player.Player, it *item.Stack) { + if p == nil { + return + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_PICKUP, + Payload: &pb.EventEnvelope_PlayerItemPickup{ + PlayerItemPickup: &pb.PlayerItemPickupEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Item: protoItemStackPtr(it), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + mut := res.GetPlayerItemPickup() + if mut == nil || it == nil { + continue + } + if mut.Item == nil { + *it = item.Stack{} + continue + } + if stack, ok := convertProtoItemStackValue(mut.Item); ok { + *it = stack + } + } +} + +func (m *Manager) EmitPlayerHeldSlotChange(ctx *player.Context, p *player.Player, from, to int) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_HELD_SLOT_CHANGE, + Payload: &pb.EventEnvelope_PlayerHeldSlotChange{ + PlayerHeldSlotChange: &pb.PlayerHeldSlotChangeEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + FromSlot: int32(from), + ToSlot: int32(to), + }, + }, + }) +} + +func (m *Manager) EmitPlayerItemDrop(ctx *player.Context, p *player.Player, it item.Stack) { + if p == nil { + return + } + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_ITEM_DROP, + Payload: &pb.EventEnvelope_PlayerItemDrop{ + PlayerItemDrop: &pb.PlayerItemDropEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + World: playerWorldDimension(p), + Item: protoItemStack(it), + }, + }, + }) +} + +func (m *Manager) EmitPlayerTransfer(ctx *player.Context, p *player.Player, addr *net.UDPAddr) { + if p == nil { + return + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_TRANSFER, + Payload: &pb.EventEnvelope_PlayerTransfer{ + PlayerTransfer: &pb.PlayerTransferEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + Address: protoAddress(addr), + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + mut := res.GetPlayerTransfer() + if mut == nil || addr == nil { + continue + } + if newAddr := parseProtoAddress(mut.Address); newAddr != nil { + *addr = *newAddr + } else { + *addr = net.UDPAddr{} + } + } +} + +func (m *Manager) EmitPlayerDiagnostics(p *player.Player, d session.Diagnostics) { + if p == nil { + return + } + evt := &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_PLAYER_DIAGNOSTICS, + Payload: &pb.EventEnvelope_PlayerDiagnostics{ + PlayerDiagnostics: &pb.PlayerDiagnosticsEvent{ + PlayerUuid: p.UUID().String(), + Name: p.Name(), + }, + }, + } + applyDiagnosticsFields(evt.GetPlayerDiagnostics(), d) + m.broadcastEvent(evt) +} diff --git a/plugin/adapters/plugin/world_events.go b/plugin/adapters/plugin/world_events.go deleted file mode 100644 index 407edd3..0000000 --- a/plugin/adapters/plugin/world_events.go +++ /dev/null @@ -1,46 +0,0 @@ -package plugin - -import ( - "github.com/df-mc/dragonfly/server/block/cube" - "github.com/df-mc/dragonfly/server/item" - "github.com/df-mc/dragonfly/server/player" - pb "github.com/secmc/plugin/proto/generated" -) - -func (m *Manager) EmitBlockBreak(ctx *player.Context, p *player.Player, pos cube.Pos, drops *[]item.Stack, xp *int, worldDim string) { - evt := &pb.EventEnvelope{ - EventId: m.generateEventID(), - Type: pb.EventType_PLAYER_BLOCK_BREAK, - Payload: &pb.EventEnvelope_BlockBreak{ - BlockBreak: &pb.BlockBreakEvent{ - PlayerUuid: p.UUID().String(), - Name: p.Name(), - World: worldDim, - X: int32(pos.X()), - Y: int32(pos.Y()), - Z: int32(pos.Z()), - }, - }, - } - results := m.dispatchEvent(evt, true) - var cancelled bool - for _, res := range results { - if res == nil { - continue - } - if res.Cancel != nil && *res.Cancel { - cancelled = true - } - if bbMut := res.GetBlockBreak(); bbMut != nil { - if drops != nil { - *drops = convertProtoDrops(bbMut.Drops) - } - if bbMut.Xp != nil && xp != nil { - *xp = int(*bbMut.Xp) - } - } - } - if cancelled && ctx != nil { - ctx.Cancel() - } -} diff --git a/plugin/adapters/plugin/world_events_extended.go b/plugin/adapters/plugin/world_events_extended.go new file mode 100644 index 0000000..d64f4dd --- /dev/null +++ b/plugin/adapters/plugin/world_events_extended.go @@ -0,0 +1,258 @@ +package plugin + +import ( + "fmt" + "strings" + + "github.com/df-mc/dragonfly/server/block/cube" + "github.com/df-mc/dragonfly/server/world" + "github.com/go-gl/mathgl/mgl64" + pb "github.com/secmc/plugin/proto/generated" +) + +func (m *Manager) EmitWorldLiquidFlow(ctx *world.Context, from, into cube.Pos, liquid world.Liquid, replaced world.Block) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_LIQUID_FLOW, + Payload: &pb.EventEnvelope_WorldLiquidFlow{ + WorldLiquidFlow: &pb.WorldLiquidFlowEvent{ + World: protoWorldRef(worldFromContext(ctx)), + From: protoBlockPos(from), + To: protoBlockPos(into), + Liquid: protoLiquidState(liquid), + Replaced: protoBlockState(replaced), + }, + }, + }) +} + +func (m *Manager) EmitWorldLiquidDecay(ctx *world.Context, pos cube.Pos, before, after world.Liquid) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_LIQUID_DECAY, + Payload: &pb.EventEnvelope_WorldLiquidDecay{ + WorldLiquidDecay: &pb.WorldLiquidDecayEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Position: protoBlockPos(pos), + Before: protoLiquidState(before), + After: protoLiquidState(after), + }, + }, + }) +} + +func (m *Manager) EmitWorldLiquidHarden(ctx *world.Context, pos cube.Pos, liquidHardened, otherLiquid, newBlock world.Block) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_LIQUID_HARDEN, + Payload: &pb.EventEnvelope_WorldLiquidHarden{ + WorldLiquidHarden: &pb.WorldLiquidHardenEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Position: protoBlockPos(pos), + LiquidHardened: protoLiquidOrBlockState(liquidHardened), + OtherLiquid: protoLiquidOrBlockState(otherLiquid), + NewBlock: protoBlockState(newBlock), + }, + }, + }) +} + +func (m *Manager) EmitWorldSound(ctx *world.Context, s world.Sound, pos mgl64.Vec3) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_SOUND, + Payload: &pb.EventEnvelope_WorldSound{ + WorldSound: &pb.WorldSoundEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Sound: fmt.Sprintf("%T", s), + Position: protoVec3(pos), + }, + }, + }) +} + +func (m *Manager) EmitWorldFireSpread(ctx *world.Context, from, to cube.Pos) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_FIRE_SPREAD, + Payload: &pb.EventEnvelope_WorldFireSpread{ + WorldFireSpread: &pb.WorldFireSpreadEvent{ + World: protoWorldRef(worldFromContext(ctx)), + From: protoBlockPos(from), + To: protoBlockPos(to), + }, + }, + }) +} + +func (m *Manager) EmitWorldBlockBurn(ctx *world.Context, pos cube.Pos) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_BLOCK_BURN, + Payload: &pb.EventEnvelope_WorldBlockBurn{ + WorldBlockBurn: &pb.WorldBlockBurnEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Position: protoBlockPos(pos), + }, + }, + }) +} + +func (m *Manager) EmitWorldCropTrample(ctx *world.Context, pos cube.Pos) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_CROP_TRAMPLE, + Payload: &pb.EventEnvelope_WorldCropTrample{ + WorldCropTrample: &pb.WorldCropTrampleEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Position: protoBlockPos(pos), + }, + }, + }) +} + +func (m *Manager) EmitWorldLeavesDecay(ctx *world.Context, pos cube.Pos) { + m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_LEAVES_DECAY, + Payload: &pb.EventEnvelope_WorldLeavesDecay{ + WorldLeavesDecay: &pb.WorldLeavesDecayEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Position: protoBlockPos(pos), + }, + }, + }) +} + +func (m *Manager) EmitWorldEntitySpawn(tx *world.Tx, e world.Entity) { + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_ENTITY_SPAWN, + Payload: &pb.EventEnvelope_WorldEntitySpawn{ + WorldEntitySpawn: &pb.WorldEntitySpawnEvent{ + World: protoWorldRef(worldFromTx(tx)), + Entity: protoEntityRef(e), + }, + }, + }) +} + +func (m *Manager) EmitWorldEntityDespawn(tx *world.Tx, e world.Entity) { + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_ENTITY_DESPAWN, + Payload: &pb.EventEnvelope_WorldEntityDespawn{ + WorldEntityDespawn: &pb.WorldEntityDespawnEvent{ + World: protoWorldRef(worldFromTx(tx)), + Entity: protoEntityRef(e), + }, + }, + }) +} + +func (m *Manager) EmitWorldExplosion(ctx *world.Context, position mgl64.Vec3, entities *[]world.Entity, blocks *[]cube.Pos, itemDropChance *float64, spawnFire *bool) { + var entityRefs []*pb.EntityRef + if entities != nil { + entityRefs = protoEntityRefs(*entities) + } + var blockPositions []*pb.BlockPos + if blocks != nil { + blockPositions = protoBlockPositions(*blocks) + } + dropChance := 0.0 + if itemDropChance != nil { + dropChance = *itemDropChance + } + spawnFireVal := false + if spawnFire != nil { + spawnFireVal = *spawnFire + } + results := m.emitCancellable(ctx, &pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_EXPLOSION, + Payload: &pb.EventEnvelope_WorldExplosion{ + WorldExplosion: &pb.WorldExplosionEvent{ + World: protoWorldRef(worldFromContext(ctx)), + Position: protoVec3(position), + AffectedEntities: entityRefs, + AffectedBlocks: blockPositions, + ItemDropChance: dropChance, + SpawnFire: spawnFireVal, + }, + }, + }) + for _, res := range results { + if res == nil { + continue + } + mut := res.GetWorldExplosion() + if mut == nil { + continue + } + if entities != nil && mut.EntityUuids != nil { + *entities = filterEntitiesByUUIDs(*entities, mut.EntityUuids) + } + if blocks != nil && mut.Blocks != nil { + converted := convertProtoBlockPositionsToCube(mut.Blocks) + if converted == nil { + *blocks = nil + } else { + *blocks = converted + } + } + if itemDropChance != nil && mut.ItemDropChance != nil { + *itemDropChance = *mut.ItemDropChance + } + if spawnFire != nil && mut.SpawnFire != nil { + *spawnFire = *mut.SpawnFire + } + } +} + +func (m *Manager) EmitWorldClose(tx *world.Tx) { + w := worldFromTx(tx) + m.broadcastEvent(&pb.EventEnvelope{ + EventId: m.generateEventID(), + Type: pb.EventType_WORLD_CLOSE, + Payload: &pb.EventEnvelope_WorldClose{ + WorldClose: &pb.WorldCloseEvent{ + World: protoWorldRef(w), + }, + }, + }) + m.unregisterWorld(w) +} + +func worldFromTx(tx *world.Tx) *world.World { + if tx == nil { + return nil + } + return tx.World() +} + +func filterEntitiesByUUIDs(entities []world.Entity, uuids []string) []world.Entity { + if len(uuids) == 0 { + return entities + } + allowed := make(map[string]struct{}, len(uuids)) + for _, id := range uuids { + if id == "" { + continue + } + allowed[strings.ToLower(id)] = struct{}{} + } + if len(allowed) == 0 { + return entities + } + filtered := make([]world.Entity, 0, len(entities)) + for _, e := range entities { + handle := e.H() + if handle == nil { + continue + } + if _, ok := allowed[strings.ToLower(handle.UUID().String())]; ok { + filtered = append(filtered, e) + } + } + return filtered +} diff --git a/plugin/ports/ports.go b/plugin/ports/ports.go index e0c6749..0585505 100644 --- a/plugin/ports/ports.go +++ b/plugin/ports/ports.go @@ -2,11 +2,16 @@ package ports import ( "context" + "net" + "time" "github.com/df-mc/dragonfly/server/block/cube" "github.com/df-mc/dragonfly/server/item" "github.com/df-mc/dragonfly/server/player" + "github.com/df-mc/dragonfly/server/player/skin" + "github.com/df-mc/dragonfly/server/session" "github.com/df-mc/dragonfly/server/world" + "github.com/go-gl/mathgl/mgl64" pb "github.com/secmc/plugin/proto/generated" ) @@ -35,6 +40,50 @@ type EventManager interface { EmitChat(ctx *player.Context, p *player.Player, msg *string) EmitCommand(ctx *player.Context, p *player.Player, cmdName string, args []string) EmitBlockBreak(ctx *player.Context, p *player.Player, pos cube.Pos, drops *[]item.Stack, xp *int, worldDim string) + EmitPlayerMove(ctx *player.Context, p *player.Player, newPos mgl64.Vec3, newRot cube.Rotation) + EmitPlayerJump(p *player.Player) + EmitPlayerTeleport(ctx *player.Context, p *player.Player, pos mgl64.Vec3) + EmitPlayerChangeWorld(p *player.Player, before, after *world.World) + EmitPlayerToggleSprint(ctx *player.Context, p *player.Player, after bool) + EmitPlayerToggleSneak(ctx *player.Context, p *player.Player, after bool) + EmitPlayerFoodLoss(ctx *player.Context, p *player.Player, from int, to *int) + EmitPlayerHeal(ctx *player.Context, p *player.Player, health *float64, src world.HealingSource) + EmitPlayerHurt(ctx *player.Context, p *player.Player, damage *float64, immune bool, attackImmunity *time.Duration, src world.DamageSource) + EmitPlayerDeath(p *player.Player, src world.DamageSource, keepInv *bool) + EmitPlayerRespawn(p *player.Player, pos *mgl64.Vec3, w **world.World) + EmitPlayerSkinChange(ctx *player.Context, p *player.Player, sk *skin.Skin) + EmitPlayerFireExtinguish(ctx *player.Context, p *player.Player, pos cube.Pos) + EmitPlayerStartBreak(ctx *player.Context, p *player.Player, pos cube.Pos) + EmitPlayerBlockPlace(ctx *player.Context, p *player.Player, pos cube.Pos, b world.Block) + EmitPlayerBlockPick(ctx *player.Context, p *player.Player, pos cube.Pos, b world.Block) + EmitPlayerItemUse(ctx *player.Context, p *player.Player) + EmitPlayerItemUseOnBlock(ctx *player.Context, p *player.Player, pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, b world.Block) + EmitPlayerItemUseOnEntity(ctx *player.Context, p *player.Player, target world.Entity) + EmitPlayerItemRelease(ctx *player.Context, p *player.Player, it item.Stack, dur time.Duration) + EmitPlayerItemConsume(ctx *player.Context, p *player.Player, it item.Stack) + EmitPlayerAttackEntity(ctx *player.Context, p *player.Player, target world.Entity, force, height *float64, critical *bool) + EmitPlayerExperienceGain(ctx *player.Context, p *player.Player, amount *int) + EmitPlayerPunchAir(ctx *player.Context, p *player.Player) + EmitPlayerSignEdit(ctx *player.Context, p *player.Player, pos cube.Pos, frontSide bool, oldText, newText string) + EmitPlayerLecternPageTurn(ctx *player.Context, p *player.Player, pos cube.Pos, oldPage int, newPage *int) + EmitPlayerItemDamage(ctx *player.Context, p *player.Player, it item.Stack, damage int) + EmitPlayerItemPickup(ctx *player.Context, p *player.Player, it *item.Stack) + EmitPlayerHeldSlotChange(ctx *player.Context, p *player.Player, from, to int) + EmitPlayerItemDrop(ctx *player.Context, p *player.Player, it item.Stack) + EmitPlayerTransfer(ctx *player.Context, p *player.Player, addr *net.UDPAddr) + EmitPlayerDiagnostics(p *player.Player, d session.Diagnostics) + EmitWorldLiquidFlow(ctx *world.Context, from, into cube.Pos, liquid world.Liquid, replaced world.Block) + EmitWorldLiquidDecay(ctx *world.Context, pos cube.Pos, before, after world.Liquid) + EmitWorldLiquidHarden(ctx *world.Context, pos cube.Pos, liquidHardened, otherLiquid world.Block, newBlock world.Block) + EmitWorldSound(ctx *world.Context, s world.Sound, pos mgl64.Vec3) + EmitWorldFireSpread(ctx *world.Context, from, to cube.Pos) + EmitWorldBlockBurn(ctx *world.Context, pos cube.Pos) + EmitWorldCropTrample(ctx *world.Context, pos cube.Pos) + EmitWorldLeavesDecay(ctx *world.Context, pos cube.Pos) + EmitWorldEntitySpawn(tx *world.Tx, e world.Entity) + EmitWorldEntityDespawn(tx *world.Tx, e world.Entity) + EmitWorldExplosion(ctx *world.Context, position mgl64.Vec3, entities *[]world.Entity, blocks *[]cube.Pos, itemDropChance *float64, spawnFire *bool) + EmitWorldClose(tx *world.Tx) BroadcastEvent(evt *pb.EventEnvelope) GenerateEventID() string } diff --git a/proto/generated/actions.pb.go b/proto/generated/actions.pb.go index 0a2b84e..1da9dd8 100644 --- a/proto/generated/actions.pb.go +++ b/proto/generated/actions.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) +// protoc-gen-go v1.36.10 +// protoc v3.21.12 // source: actions.proto package generated @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,20 +22,17 @@ const ( ) type ActionBatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` unknownFields protoimpl.UnknownFields - - Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ActionBatch) Reset() { *x = ActionBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_actions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_actions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActionBatch) String() string { @@ -45,7 +43,7 @@ func (*ActionBatch) ProtoMessage() {} func (x *ActionBatch) ProtoReflect() protoreflect.Message { mi := &file_actions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68,27 +66,24 @@ func (x *ActionBatch) GetActions() []*Action { } type Action struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CorrelationId *string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3,oneof" json:"correlation_id,omitempty"` - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + CorrelationId *string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3,oneof" json:"correlation_id,omitempty"` + // Types that are valid to be assigned to Kind: // // *Action_SendChat // *Action_Teleport // *Action_Kick // *Action_SetGameMode - Kind isAction_Kind `protobuf_oneof:"kind"` + Kind isAction_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Action) Reset() { *x = Action{} - if protoimpl.UnsafeEnabled { - mi := &file_actions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_actions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action) String() string { @@ -99,7 +94,7 @@ func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { mi := &file_actions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,37 +116,45 @@ func (x *Action) GetCorrelationId() string { return "" } -func (m *Action) GetKind() isAction_Kind { - if m != nil { - return m.Kind +func (x *Action) GetKind() isAction_Kind { + if x != nil { + return x.Kind } return nil } func (x *Action) GetSendChat() *SendChatAction { - if x, ok := x.GetKind().(*Action_SendChat); ok { - return x.SendChat + if x != nil { + if x, ok := x.Kind.(*Action_SendChat); ok { + return x.SendChat + } } return nil } func (x *Action) GetTeleport() *TeleportAction { - if x, ok := x.GetKind().(*Action_Teleport); ok { - return x.Teleport + if x != nil { + if x, ok := x.Kind.(*Action_Teleport); ok { + return x.Teleport + } } return nil } func (x *Action) GetKick() *KickAction { - if x, ok := x.GetKind().(*Action_Kick); ok { - return x.Kick + if x != nil { + if x, ok := x.Kind.(*Action_Kick); ok { + return x.Kick + } } return nil } func (x *Action) GetSetGameMode() *SetGameModeAction { - if x, ok := x.GetKind().(*Action_SetGameMode); ok { - return x.SetGameMode + if x != nil { + if x, ok := x.Kind.(*Action_SetGameMode); ok { + return x.SetGameMode + } } return nil } @@ -185,21 +188,18 @@ func (*Action_Kick) isAction_Kind() {} func (*Action_SetGameMode) isAction_Kind() {} type SendChatAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TargetUuid string `protobuf:"bytes,1,opt,name=target_uuid,json=targetUuid,proto3" json:"target_uuid,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields - - TargetUuid string `protobuf:"bytes,1,opt,name=target_uuid,json=targetUuid,proto3" json:"target_uuid,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SendChatAction) Reset() { *x = SendChatAction{} - if protoimpl.UnsafeEnabled { - mi := &file_actions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_actions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendChatAction) String() string { @@ -210,7 +210,7 @@ func (*SendChatAction) ProtoMessage() {} func (x *SendChatAction) ProtoReflect() protoreflect.Message { mi := &file_actions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,25 +240,22 @@ func (x *SendChatAction) GetMessage() string { } type TeleportAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + X float64 `protobuf:"fixed64,2,opt,name=x,proto3" json:"x,omitempty"` + Y float64 `protobuf:"fixed64,3,opt,name=y,proto3" json:"y,omitempty"` + Z float64 `protobuf:"fixed64,4,opt,name=z,proto3" json:"z,omitempty"` + Yaw float32 `protobuf:"fixed32,5,opt,name=yaw,proto3" json:"yaw,omitempty"` + Pitch float32 `protobuf:"fixed32,6,opt,name=pitch,proto3" json:"pitch,omitempty"` unknownFields protoimpl.UnknownFields - - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - X float64 `protobuf:"fixed64,2,opt,name=x,proto3" json:"x,omitempty"` - Y float64 `protobuf:"fixed64,3,opt,name=y,proto3" json:"y,omitempty"` - Z float64 `protobuf:"fixed64,4,opt,name=z,proto3" json:"z,omitempty"` - Yaw float32 `protobuf:"fixed32,5,opt,name=yaw,proto3" json:"yaw,omitempty"` - Pitch float32 `protobuf:"fixed32,6,opt,name=pitch,proto3" json:"pitch,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TeleportAction) Reset() { *x = TeleportAction{} - if protoimpl.UnsafeEnabled { - mi := &file_actions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_actions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TeleportAction) String() string { @@ -269,7 +266,7 @@ func (*TeleportAction) ProtoMessage() {} func (x *TeleportAction) ProtoReflect() protoreflect.Message { mi := &file_actions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,21 +324,18 @@ func (x *TeleportAction) GetPitch() float32 { } type KickAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` unknownFields protoimpl.UnknownFields - - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + sizeCache protoimpl.SizeCache } func (x *KickAction) Reset() { *x = KickAction{} - if protoimpl.UnsafeEnabled { - mi := &file_actions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_actions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KickAction) String() string { @@ -352,7 +346,7 @@ func (*KickAction) ProtoMessage() {} func (x *KickAction) ProtoReflect() protoreflect.Message { mi := &file_actions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,21 +376,18 @@ func (x *KickAction) GetReason() string { } type SetGameModeAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + GameMode GameMode `protobuf:"varint,2,opt,name=game_mode,json=gameMode,proto3,enum=df.plugin.GameMode" json:"game_mode,omitempty"` unknownFields protoimpl.UnknownFields - - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - GameMode GameMode `protobuf:"varint,2,opt,name=game_mode,json=gameMode,proto3,enum=df.plugin.GameMode" json:"game_mode,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetGameModeAction) Reset() { *x = SetGameModeAction{} - if protoimpl.UnsafeEnabled { - mi := &file_actions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_actions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetGameModeAction) String() string { @@ -407,7 +398,7 @@ func (*SetGameModeAction) ProtoMessage() {} func (x *SetGameModeAction) ProtoReflect() protoreflect.Message { mi := &file_actions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,83 +429,56 @@ func (x *SetGameModeAction) GetGameMode() GameMode { var File_actions_proto protoreflect.FileDescriptor -var file_actions_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x09, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x0b, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2b, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x02, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2a, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x09, 0x73, - 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, - 0x68, 0x61, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x73, 0x65, 0x6e, - 0x64, 0x43, 0x68, 0x61, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x2b, - 0x0a, 0x04, 0x6b, 0x69, 0x63, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, - 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x63, 0x6b, 0x12, 0x42, 0x0a, 0x0d, 0x73, - 0x65, 0x74, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, - 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x42, - 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x72, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0e, 0x53, 0x65, - 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x0e, 0x54, 0x65, 0x6c, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x7a, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x01, 0x7a, 0x12, 0x10, 0x0a, 0x03, 0x79, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x03, 0x79, 0x61, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x69, 0x74, 0x63, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x69, 0x74, 0x63, 0x68, 0x22, 0x45, 0x0a, - 0x0a, 0x4b, 0x69, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x09, 0x67, 0x61, - 0x6d, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, - 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x08, 0x67, 0x61, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x8b, 0x01, 0x0a, - 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0c, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x63, 0x6d, 0x63, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0xa2, 0x02, 0x03, 0x44, 0x50, 0x58, 0xaa, 0x02, 0x09, - 0x44, 0x66, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, 0x09, 0x44, 0x66, 0x5c, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x15, 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, - 0x44, 0x66, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} +const file_actions_proto_rawDesc = "" + + "\n" + + "\ractions.proto\x12\tdf.plugin\x1a\fcommon.proto\":\n" + + "\vActionBatch\x12+\n" + + "\aactions\x18\x01 \x03(\v2\x11.df.plugin.ActionR\aactions\"\xb3\x02\n" + + "\x06Action\x12*\n" + + "\x0ecorrelation_id\x18\x01 \x01(\tH\x01R\rcorrelationId\x88\x01\x01\x128\n" + + "\tsend_chat\x18\n" + + " \x01(\v2\x19.df.plugin.SendChatActionH\x00R\bsendChat\x127\n" + + "\bteleport\x18\v \x01(\v2\x19.df.plugin.TeleportActionH\x00R\bteleport\x12+\n" + + "\x04kick\x18\f \x01(\v2\x15.df.plugin.KickActionH\x00R\x04kick\x12B\n" + + "\rset_game_mode\x18\r \x01(\v2\x1c.df.plugin.SetGameModeActionH\x00R\vsetGameModeB\x06\n" + + "\x04kindB\x11\n" + + "\x0f_correlation_id\"K\n" + + "\x0eSendChatAction\x12\x1f\n" + + "\vtarget_uuid\x18\x01 \x01(\tR\n" + + "targetUuid\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x83\x01\n" + + "\x0eTeleportAction\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\f\n" + + "\x01x\x18\x02 \x01(\x01R\x01x\x12\f\n" + + "\x01y\x18\x03 \x01(\x01R\x01y\x12\f\n" + + "\x01z\x18\x04 \x01(\x01R\x01z\x12\x10\n" + + "\x03yaw\x18\x05 \x01(\x02R\x03yaw\x12\x14\n" + + "\x05pitch\x18\x06 \x01(\x02R\x05pitch\"E\n" + + "\n" + + "KickAction\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x16\n" + + "\x06reason\x18\x02 \x01(\tR\x06reason\"f\n" + + "\x11SetGameModeAction\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x120\n" + + "\tgame_mode\x18\x02 \x01(\x0e2\x13.df.plugin.GameModeR\bgameModeB)Z'github.com/secmc/plugin/proto/generatedb\x06proto3" var ( file_actions_proto_rawDescOnce sync.Once - file_actions_proto_rawDescData = file_actions_proto_rawDesc + file_actions_proto_rawDescData []byte ) func file_actions_proto_rawDescGZIP() []byte { file_actions_proto_rawDescOnce.Do(func() { - file_actions_proto_rawDescData = protoimpl.X.CompressGZIP(file_actions_proto_rawDescData) + file_actions_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_actions_proto_rawDesc), len(file_actions_proto_rawDesc))) }) return file_actions_proto_rawDescData } var file_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_actions_proto_goTypes = []interface{}{ +var file_actions_proto_goTypes = []any{ (*ActionBatch)(nil), // 0: df.plugin.ActionBatch (*Action)(nil), // 1: df.plugin.Action (*SendChatAction)(nil), // 2: df.plugin.SendChatAction @@ -543,81 +507,7 @@ func file_actions_proto_init() { return } file_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_actions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_actions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_actions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendChatAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_actions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeleportAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_actions_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_actions_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGameModeAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_actions_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_actions_proto_msgTypes[1].OneofWrappers = []any{ (*Action_SendChat)(nil), (*Action_Teleport)(nil), (*Action_Kick)(nil), @@ -627,7 +517,7 @@ func file_actions_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_actions_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_actions_proto_rawDesc), len(file_actions_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, @@ -638,7 +528,6 @@ func file_actions_proto_init() { MessageInfos: file_actions_proto_msgTypes, }.Build() File_actions_proto = out.File - file_actions_proto_rawDesc = nil file_actions_proto_goTypes = nil file_actions_proto_depIdxs = nil } diff --git a/proto/generated/common.pb.go b/proto/generated/common.pb.go index 84d2f65..a8cb917 100644 --- a/proto/generated/common.pb.go +++ b/proto/generated/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) +// protoc-gen-go v1.36.10 +// protoc v3.21.12 // source: common.proto package generated @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -72,23 +73,192 @@ func (GameMode) EnumDescriptor() ([]byte, []int) { return file_common_proto_rawDescGZIP(), []int{0} } -type ItemStack struct { - state protoimpl.MessageState +type Vec3 struct { + state protoimpl.MessageState `protogen:"open.v1"` + X float64 `protobuf:"fixed64,1,opt,name=x,proto3" json:"x,omitempty"` + Y float64 `protobuf:"fixed64,2,opt,name=y,proto3" json:"y,omitempty"` + Z float64 `protobuf:"fixed64,3,opt,name=z,proto3" json:"z,omitempty"` + unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache +} + +func (x *Vec3) Reset() { + *x = Vec3{} + mi := &file_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Vec3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Vec3) ProtoMessage() {} + +func (x *Vec3) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Vec3.ProtoReflect.Descriptor instead. +func (*Vec3) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{0} +} + +func (x *Vec3) GetX() float64 { + if x != nil { + return x.X + } + return 0 +} + +func (x *Vec3) GetY() float64 { + if x != nil { + return x.Y + } + return 0 +} + +func (x *Vec3) GetZ() float64 { + if x != nil { + return x.Z + } + return 0 +} + +type Rotation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Yaw float32 `protobuf:"fixed32,1,opt,name=yaw,proto3" json:"yaw,omitempty"` + Pitch float32 `protobuf:"fixed32,2,opt,name=pitch,proto3" json:"pitch,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Meta int32 `protobuf:"varint,2,opt,name=meta,proto3" json:"meta,omitempty"` - Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` +func (x *Rotation) Reset() { + *x = Rotation{} + mi := &file_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ItemStack) Reset() { - *x = ItemStack{} - if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[0] +func (x *Rotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rotation) ProtoMessage() {} + +func (x *Rotation) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[1] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) +} + +// Deprecated: Use Rotation.ProtoReflect.Descriptor instead. +func (*Rotation) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{1} +} + +func (x *Rotation) GetYaw() float32 { + if x != nil { + return x.Yaw + } + return 0 +} + +func (x *Rotation) GetPitch() float32 { + if x != nil { + return x.Pitch + } + return 0 +} + +type BlockPos struct { + state protoimpl.MessageState `protogen:"open.v1"` + X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` + Z int32 `protobuf:"varint,3,opt,name=z,proto3" json:"z,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockPos) Reset() { + *x = BlockPos{} + mi := &file_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockPos) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPos) ProtoMessage() {} + +func (x *BlockPos) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockPos.ProtoReflect.Descriptor instead. +func (*BlockPos) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{2} +} + +func (x *BlockPos) GetX() int32 { + if x != nil { + return x.X + } + return 0 +} + +func (x *BlockPos) GetY() int32 { + if x != nil { + return x.Y + } + return 0 +} + +func (x *BlockPos) GetZ() int32 { + if x != nil { + return x.Z + } + return 0 +} + +type ItemStack struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Meta int32 `protobuf:"varint,2,opt,name=meta,proto3" json:"meta,omitempty"` + Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ItemStack) Reset() { + *x = ItemStack{} + mi := &file_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ItemStack) String() string { @@ -98,8 +268,8 @@ func (x *ItemStack) String() string { func (*ItemStack) ProtoMessage() {} func (x *ItemStack) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_common_proto_msgTypes[3] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,7 +281,7 @@ func (x *ItemStack) ProtoReflect() protoreflect.Message { // Deprecated: Use ItemStack.ProtoReflect.Descriptor instead. func (*ItemStack) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{0} + return file_common_proto_rawDescGZIP(), []int{3} } func (x *ItemStack) GetName() string { @@ -135,55 +305,513 @@ func (x *ItemStack) GetCount() int32 { return 0 } -var File_common_proto protoreflect.FileDescriptor +type BlockState struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Properties map[string]string `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockState) Reset() { + *x = BlockState{} + mi := &file_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockState) ProtoMessage() {} + +func (x *BlockState) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockState.ProtoReflect.Descriptor instead. +func (*BlockState) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{4} +} + +func (x *BlockState) GetName() string { + if x != nil { + return x.Name + } + return "" +} -var file_common_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, - 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x49, 0x0a, 0x09, 0x49, 0x74, 0x65, - 0x6d, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x44, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x55, 0x52, 0x56, 0x49, 0x56, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x41, 0x44, 0x56, 0x45, 0x4e, 0x54, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, - 0x50, 0x45, 0x43, 0x54, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x03, 0x42, 0x8a, 0x01, 0x0a, 0x0d, 0x63, - 0x6f, 0x6d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0b, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x63, 0x6d, 0x63, 0x2f, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0xa2, 0x02, 0x03, 0x44, 0x50, 0x58, 0xaa, 0x02, 0x09, 0x44, 0x66, 0x2e, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, 0x09, 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0xe2, 0x02, 0x15, 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x44, 0x66, 0x3a, - 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *BlockState) GetProperties() map[string]string { + if x != nil { + return x.Properties + } + return nil } +type LiquidState struct { + state protoimpl.MessageState `protogen:"open.v1"` + Block *BlockState `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` + Depth int32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"` + Falling bool `protobuf:"varint,3,opt,name=falling,proto3" json:"falling,omitempty"` + LiquidType string `protobuf:"bytes,4,opt,name=liquid_type,json=liquidType,proto3" json:"liquid_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LiquidState) Reset() { + *x = LiquidState{} + mi := &file_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LiquidState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LiquidState) ProtoMessage() {} + +func (x *LiquidState) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LiquidState.ProtoReflect.Descriptor instead. +func (*LiquidState) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{5} +} + +func (x *LiquidState) GetBlock() *BlockState { + if x != nil { + return x.Block + } + return nil +} + +func (x *LiquidState) GetDepth() int32 { + if x != nil { + return x.Depth + } + return 0 +} + +func (x *LiquidState) GetFalling() bool { + if x != nil { + return x.Falling + } + return false +} + +func (x *LiquidState) GetLiquidType() string { + if x != nil { + return x.LiquidType + } + return "" +} + +type WorldRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Dimension string `protobuf:"bytes,2,opt,name=dimension,proto3" json:"dimension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldRef) Reset() { + *x = WorldRef{} + mi := &file_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldRef) ProtoMessage() {} + +func (x *WorldRef) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldRef.ProtoReflect.Descriptor instead. +func (*WorldRef) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{6} +} + +func (x *WorldRef) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorldRef) GetDimension() string { + if x != nil { + return x.Dimension + } + return "" +} + +type EntityRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` + Position *Vec3 `protobuf:"bytes,4,opt,name=position,proto3,oneof" json:"position,omitempty"` + Rotation *Rotation `protobuf:"bytes,5,opt,name=rotation,proto3,oneof" json:"rotation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EntityRef) Reset() { + *x = EntityRef{} + mi := &file_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EntityRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntityRef) ProtoMessage() {} + +func (x *EntityRef) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntityRef.ProtoReflect.Descriptor instead. +func (*EntityRef) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{7} +} + +func (x *EntityRef) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *EntityRef) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *EntityRef) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *EntityRef) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +func (x *EntityRef) GetRotation() *Rotation { + if x != nil { + return x.Rotation + } + return nil +} + +type DamageSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DamageSource) Reset() { + *x = DamageSource{} + mi := &file_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DamageSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DamageSource) ProtoMessage() {} + +func (x *DamageSource) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DamageSource.ProtoReflect.Descriptor instead. +func (*DamageSource) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{8} +} + +func (x *DamageSource) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *DamageSource) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +type HealingSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HealingSource) Reset() { + *x = HealingSource{} + mi := &file_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HealingSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealingSource) ProtoMessage() {} + +func (x *HealingSource) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealingSource.ProtoReflect.Descriptor instead. +func (*HealingSource) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{9} +} + +func (x *HealingSource) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *HealingSource) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +type Address struct { + state protoimpl.MessageState `protogen:"open.v1"` + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Address) Reset() { + *x = Address{} + mi := &file_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Address) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Address) ProtoMessage() {} + +func (x *Address) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Address.ProtoReflect.Descriptor instead. +func (*Address) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{10} +} + +func (x *Address) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Address) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +var File_common_proto protoreflect.FileDescriptor + +const file_common_proto_rawDesc = "" + + "\n" + + "\fcommon.proto\x12\tdf.plugin\"0\n" + + "\x04Vec3\x12\f\n" + + "\x01x\x18\x01 \x01(\x01R\x01x\x12\f\n" + + "\x01y\x18\x02 \x01(\x01R\x01y\x12\f\n" + + "\x01z\x18\x03 \x01(\x01R\x01z\"2\n" + + "\bRotation\x12\x10\n" + + "\x03yaw\x18\x01 \x01(\x02R\x03yaw\x12\x14\n" + + "\x05pitch\x18\x02 \x01(\x02R\x05pitch\"4\n" + + "\bBlockPos\x12\f\n" + + "\x01x\x18\x01 \x01(\x05R\x01x\x12\f\n" + + "\x01y\x18\x02 \x01(\x05R\x01y\x12\f\n" + + "\x01z\x18\x03 \x01(\x05R\x01z\"I\n" + + "\tItemStack\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + + "\x04meta\x18\x02 \x01(\x05R\x04meta\x12\x14\n" + + "\x05count\x18\x03 \x01(\x05R\x05count\"\xa6\x01\n" + + "\n" + + "BlockState\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12E\n" + + "\n" + + "properties\x18\x02 \x03(\v2%.df.plugin.BlockState.PropertiesEntryR\n" + + "properties\x1a=\n" + + "\x0fPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x8b\x01\n" + + "\vLiquidState\x12+\n" + + "\x05block\x18\x01 \x01(\v2\x15.df.plugin.BlockStateR\x05block\x12\x14\n" + + "\x05depth\x18\x02 \x01(\x05R\x05depth\x12\x18\n" + + "\afalling\x18\x03 \x01(\bR\afalling\x12\x1f\n" + + "\vliquid_type\x18\x04 \x01(\tR\n" + + "liquidType\"<\n" + + "\bWorldRef\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" + + "\tdimension\x18\x02 \x01(\tR\tdimension\"\xd7\x01\n" + + "\tEntityRef\x12\x12\n" + + "\x04uuid\x18\x01 \x01(\tR\x04uuid\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x12\x17\n" + + "\x04name\x18\x03 \x01(\tH\x00R\x04name\x88\x01\x01\x120\n" + + "\bposition\x18\x04 \x01(\v2\x0f.df.plugin.Vec3H\x01R\bposition\x88\x01\x01\x124\n" + + "\brotation\x18\x05 \x01(\v2\x13.df.plugin.RotationH\x02R\brotation\x88\x01\x01B\a\n" + + "\x05_nameB\v\n" + + "\t_positionB\v\n" + + "\t_rotation\"Y\n" + + "\fDamageSource\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x12%\n" + + "\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01B\x0e\n" + + "\f_description\"Z\n" + + "\rHealingSource\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x12%\n" + + "\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01B\x0e\n" + + "\f_description\"1\n" + + "\aAddress\x12\x12\n" + + "\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" + + "\x04port\x18\x02 \x01(\x05R\x04port*D\n" + + "\bGameMode\x12\f\n" + + "\bSURVIVAL\x10\x00\x12\f\n" + + "\bCREATIVE\x10\x01\x12\r\n" + + "\tADVENTURE\x10\x02\x12\r\n" + + "\tSPECTATOR\x10\x03B)Z'github.com/secmc/plugin/proto/generatedb\x06proto3" + var ( file_common_proto_rawDescOnce sync.Once - file_common_proto_rawDescData = file_common_proto_rawDesc + file_common_proto_rawDescData []byte ) func file_common_proto_rawDescGZIP() []byte { file_common_proto_rawDescOnce.Do(func() { - file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData) + file_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_proto_rawDesc), len(file_common_proto_rawDesc))) }) return file_common_proto_rawDescData } var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_proto_goTypes = []interface{}{ - (GameMode)(0), // 0: df.plugin.GameMode - (*ItemStack)(nil), // 1: df.plugin.ItemStack +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_common_proto_goTypes = []any{ + (GameMode)(0), // 0: df.plugin.GameMode + (*Vec3)(nil), // 1: df.plugin.Vec3 + (*Rotation)(nil), // 2: df.plugin.Rotation + (*BlockPos)(nil), // 3: df.plugin.BlockPos + (*ItemStack)(nil), // 4: df.plugin.ItemStack + (*BlockState)(nil), // 5: df.plugin.BlockState + (*LiquidState)(nil), // 6: df.plugin.LiquidState + (*WorldRef)(nil), // 7: df.plugin.WorldRef + (*EntityRef)(nil), // 8: df.plugin.EntityRef + (*DamageSource)(nil), // 9: df.plugin.DamageSource + (*HealingSource)(nil), // 10: df.plugin.HealingSource + (*Address)(nil), // 11: df.plugin.Address + nil, // 12: df.plugin.BlockState.PropertiesEntry } var file_common_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 12, // 0: df.plugin.BlockState.properties:type_name -> df.plugin.BlockState.PropertiesEntry + 5, // 1: df.plugin.LiquidState.block:type_name -> df.plugin.BlockState + 1, // 2: df.plugin.EntityRef.position:type_name -> df.plugin.Vec3 + 2, // 3: df.plugin.EntityRef.rotation:type_name -> df.plugin.Rotation + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_common_proto_init() } @@ -191,27 +819,16 @@ func file_common_proto_init() { if File_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ItemStack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_common_proto_msgTypes[7].OneofWrappers = []any{} + file_common_proto_msgTypes[8].OneofWrappers = []any{} + file_common_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_common_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_proto_rawDesc), len(file_common_proto_rawDesc)), NumEnums: 1, - NumMessages: 1, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, @@ -221,7 +838,6 @@ func file_common_proto_init() { MessageInfos: file_common_proto_msgTypes, }.Build() File_common_proto = out.File - file_common_proto_rawDesc = nil file_common_proto_goTypes = nil file_common_proto_depIdxs = nil } diff --git a/proto/generated/mutations.pb.go b/proto/generated/mutations.pb.go index 2107c48..77058be 100644 --- a/proto/generated/mutations.pb.go +++ b/proto/generated/mutations.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) +// protoc-gen-go v1.36.10 +// protoc v3.21.12 // source: mutations.proto package generated @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,26 +22,34 @@ const ( ) type EventResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` - Cancel *bool `protobuf:"varint,2,opt,name=cancel,proto3,oneof" json:"cancel,omitempty"` - // Types that are assignable to Update: + state protoimpl.MessageState `protogen:"open.v1"` + EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + Cancel *bool `protobuf:"varint,2,opt,name=cancel,proto3,oneof" json:"cancel,omitempty"` + // Types that are valid to be assigned to Update: // // *EventResult_Chat // *EventResult_BlockBreak - Update isEventResult_Update `protobuf_oneof:"update"` + // *EventResult_PlayerFoodLoss + // *EventResult_PlayerHeal + // *EventResult_PlayerHurt + // *EventResult_PlayerDeath + // *EventResult_PlayerRespawn + // *EventResult_PlayerAttackEntity + // *EventResult_PlayerExperienceGain + // *EventResult_PlayerLecternPageTurn + // *EventResult_PlayerItemPickup + // *EventResult_PlayerTransfer + // *EventResult_WorldExplosion + Update isEventResult_Update `protobuf_oneof:"update"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EventResult) Reset() { *x = EventResult{} - if protoimpl.UnsafeEnabled { - mi := &file_mutations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mutations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventResult) String() string { @@ -51,7 +60,7 @@ func (*EventResult) ProtoMessage() {} func (x *EventResult) ProtoReflect() protoreflect.Message { mi := &file_mutations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80,23 +89,126 @@ func (x *EventResult) GetCancel() bool { return false } -func (m *EventResult) GetUpdate() isEventResult_Update { - if m != nil { - return m.Update +func (x *EventResult) GetUpdate() isEventResult_Update { + if x != nil { + return x.Update } return nil } func (x *EventResult) GetChat() *ChatMutation { - if x, ok := x.GetUpdate().(*EventResult_Chat); ok { - return x.Chat + if x != nil { + if x, ok := x.Update.(*EventResult_Chat); ok { + return x.Chat + } } return nil } func (x *EventResult) GetBlockBreak() *BlockBreakMutation { - if x, ok := x.GetUpdate().(*EventResult_BlockBreak); ok { - return x.BlockBreak + if x != nil { + if x, ok := x.Update.(*EventResult_BlockBreak); ok { + return x.BlockBreak + } + } + return nil +} + +func (x *EventResult) GetPlayerFoodLoss() *PlayerFoodLossMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerFoodLoss); ok { + return x.PlayerFoodLoss + } + } + return nil +} + +func (x *EventResult) GetPlayerHeal() *PlayerHealMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerHeal); ok { + return x.PlayerHeal + } + } + return nil +} + +func (x *EventResult) GetPlayerHurt() *PlayerHurtMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerHurt); ok { + return x.PlayerHurt + } + } + return nil +} + +func (x *EventResult) GetPlayerDeath() *PlayerDeathMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerDeath); ok { + return x.PlayerDeath + } + } + return nil +} + +func (x *EventResult) GetPlayerRespawn() *PlayerRespawnMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerRespawn); ok { + return x.PlayerRespawn + } + } + return nil +} + +func (x *EventResult) GetPlayerAttackEntity() *PlayerAttackEntityMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerAttackEntity); ok { + return x.PlayerAttackEntity + } + } + return nil +} + +func (x *EventResult) GetPlayerExperienceGain() *PlayerExperienceGainMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerExperienceGain); ok { + return x.PlayerExperienceGain + } + } + return nil +} + +func (x *EventResult) GetPlayerLecternPageTurn() *PlayerLecternPageTurnMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerLecternPageTurn); ok { + return x.PlayerLecternPageTurn + } + } + return nil +} + +func (x *EventResult) GetPlayerItemPickup() *PlayerItemPickupMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerItemPickup); ok { + return x.PlayerItemPickup + } + } + return nil +} + +func (x *EventResult) GetPlayerTransfer() *PlayerTransferMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_PlayerTransfer); ok { + return x.PlayerTransfer + } + } + return nil +} + +func (x *EventResult) GetWorldExplosion() *WorldExplosionMutation { + if x != nil { + if x, ok := x.Update.(*EventResult_WorldExplosion); ok { + return x.WorldExplosion + } } return nil } @@ -117,21 +229,84 @@ func (*EventResult_Chat) isEventResult_Update() {} func (*EventResult_BlockBreak) isEventResult_Update() {} +type EventResult_PlayerFoodLoss struct { + PlayerFoodLoss *PlayerFoodLossMutation `protobuf:"bytes,12,opt,name=player_food_loss,json=playerFoodLoss,proto3,oneof"` +} + +type EventResult_PlayerHeal struct { + PlayerHeal *PlayerHealMutation `protobuf:"bytes,13,opt,name=player_heal,json=playerHeal,proto3,oneof"` +} + +type EventResult_PlayerHurt struct { + PlayerHurt *PlayerHurtMutation `protobuf:"bytes,14,opt,name=player_hurt,json=playerHurt,proto3,oneof"` +} + +type EventResult_PlayerDeath struct { + PlayerDeath *PlayerDeathMutation `protobuf:"bytes,15,opt,name=player_death,json=playerDeath,proto3,oneof"` +} + +type EventResult_PlayerRespawn struct { + PlayerRespawn *PlayerRespawnMutation `protobuf:"bytes,16,opt,name=player_respawn,json=playerRespawn,proto3,oneof"` +} + +type EventResult_PlayerAttackEntity struct { + PlayerAttackEntity *PlayerAttackEntityMutation `protobuf:"bytes,17,opt,name=player_attack_entity,json=playerAttackEntity,proto3,oneof"` +} + +type EventResult_PlayerExperienceGain struct { + PlayerExperienceGain *PlayerExperienceGainMutation `protobuf:"bytes,18,opt,name=player_experience_gain,json=playerExperienceGain,proto3,oneof"` +} + +type EventResult_PlayerLecternPageTurn struct { + PlayerLecternPageTurn *PlayerLecternPageTurnMutation `protobuf:"bytes,19,opt,name=player_lectern_page_turn,json=playerLecternPageTurn,proto3,oneof"` +} + +type EventResult_PlayerItemPickup struct { + PlayerItemPickup *PlayerItemPickupMutation `protobuf:"bytes,20,opt,name=player_item_pickup,json=playerItemPickup,proto3,oneof"` +} + +type EventResult_PlayerTransfer struct { + PlayerTransfer *PlayerTransferMutation `protobuf:"bytes,21,opt,name=player_transfer,json=playerTransfer,proto3,oneof"` +} + +type EventResult_WorldExplosion struct { + WorldExplosion *WorldExplosionMutation `protobuf:"bytes,30,opt,name=world_explosion,json=worldExplosion,proto3,oneof"` +} + +func (*EventResult_PlayerFoodLoss) isEventResult_Update() {} + +func (*EventResult_PlayerHeal) isEventResult_Update() {} + +func (*EventResult_PlayerHurt) isEventResult_Update() {} + +func (*EventResult_PlayerDeath) isEventResult_Update() {} + +func (*EventResult_PlayerRespawn) isEventResult_Update() {} + +func (*EventResult_PlayerAttackEntity) isEventResult_Update() {} + +func (*EventResult_PlayerExperienceGain) isEventResult_Update() {} + +func (*EventResult_PlayerLecternPageTurn) isEventResult_Update() {} + +func (*EventResult_PlayerItemPickup) isEventResult_Update() {} + +func (*EventResult_PlayerTransfer) isEventResult_Update() {} + +func (*EventResult_WorldExplosion) isEventResult_Update() {} + type ChatMutation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ChatMutation) Reset() { *x = ChatMutation{} - if protoimpl.UnsafeEnabled { - mi := &file_mutations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mutations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChatMutation) String() string { @@ -142,7 +317,7 @@ func (*ChatMutation) ProtoMessage() {} func (x *ChatMutation) ProtoReflect() protoreflect.Message { mi := &file_mutations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,21 +340,18 @@ func (x *ChatMutation) GetMessage() string { } type BlockBreakMutation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Drops []*ItemStack `protobuf:"bytes,1,rep,name=drops,proto3" json:"drops,omitempty"` + Xp *int32 `protobuf:"varint,2,opt,name=xp,proto3,oneof" json:"xp,omitempty"` unknownFields protoimpl.UnknownFields - - Drops []*ItemStack `protobuf:"bytes,1,rep,name=drops,proto3" json:"drops,omitempty"` - Xp *int32 `protobuf:"varint,2,opt,name=xp,proto3,oneof" json:"xp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BlockBreakMutation) Reset() { *x = BlockBreakMutation{} - if protoimpl.UnsafeEnabled { - mi := &file_mutations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mutations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockBreakMutation) String() string { @@ -190,7 +362,7 @@ func (*BlockBreakMutation) ProtoMessage() {} func (x *BlockBreakMutation) ProtoReflect() protoreflect.Message { mi := &file_mutations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,74 +391,626 @@ func (x *BlockBreakMutation) GetXp() int32 { return 0 } -var File_mutations_proto protoreflect.FileDescriptor +type PlayerFoodLossMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + To int32 `protobuf:"varint,1,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerFoodLossMutation) Reset() { + *x = PlayerFoodLossMutation{} + mi := &file_mutations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerFoodLossMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerFoodLossMutation) ProtoMessage() {} + +func (x *PlayerFoodLossMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerFoodLossMutation.ProtoReflect.Descriptor instead. +func (*PlayerFoodLossMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{3} +} + +func (x *PlayerFoodLossMutation) GetTo() int32 { + if x != nil { + return x.To + } + return 0 +} + +type PlayerHealMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerHealMutation) Reset() { + *x = PlayerHealMutation{} + mi := &file_mutations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerHealMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerHealMutation) ProtoMessage() {} + +func (x *PlayerHealMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerHealMutation.ProtoReflect.Descriptor instead. +func (*PlayerHealMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{4} +} -var file_mutations_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x09, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x1a, 0x0d, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x0b, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x88, 0x01, - 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x74, - 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x63, 0x68, 0x61, 0x74, - 0x12, 0x40, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x4d, 0x75, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x42, 0x08, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x22, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74, 0x4d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0x5c, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x4d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x05, 0x64, 0x72, 0x6f, 0x70, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x05, 0x64, 0x72, - 0x6f, 0x70, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, - 0x00, 0x52, 0x02, 0x78, 0x70, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x78, 0x70, 0x42, - 0x8d, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x42, 0x0e, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x73, 0x65, 0x63, 0x6d, 0x63, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0xa2, 0x02, 0x03, 0x44, - 0x50, 0x58, 0xaa, 0x02, 0x09, 0x44, 0x66, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, - 0x09, 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x15, 0x44, 0x66, 0x5c, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0a, 0x44, 0x66, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *PlayerHealMutation) GetAmount() float64 { + if x != nil { + return x.Amount + } + return 0 } +type PlayerHurtMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Damage float64 `protobuf:"fixed64,1,opt,name=damage,proto3" json:"damage,omitempty"` + AttackImmunityMs *int64 `protobuf:"varint,2,opt,name=attack_immunity_ms,json=attackImmunityMs,proto3,oneof" json:"attack_immunity_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerHurtMutation) Reset() { + *x = PlayerHurtMutation{} + mi := &file_mutations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerHurtMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerHurtMutation) ProtoMessage() {} + +func (x *PlayerHurtMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerHurtMutation.ProtoReflect.Descriptor instead. +func (*PlayerHurtMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{5} +} + +func (x *PlayerHurtMutation) GetDamage() float64 { + if x != nil { + return x.Damage + } + return 0 +} + +func (x *PlayerHurtMutation) GetAttackImmunityMs() int64 { + if x != nil && x.AttackImmunityMs != nil { + return *x.AttackImmunityMs + } + return 0 +} + +type PlayerDeathMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + KeepInventory bool `protobuf:"varint,1,opt,name=keep_inventory,json=keepInventory,proto3" json:"keep_inventory,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerDeathMutation) Reset() { + *x = PlayerDeathMutation{} + mi := &file_mutations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerDeathMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerDeathMutation) ProtoMessage() {} + +func (x *PlayerDeathMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerDeathMutation.ProtoReflect.Descriptor instead. +func (*PlayerDeathMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{6} +} + +func (x *PlayerDeathMutation) GetKeepInventory() bool { + if x != nil { + return x.KeepInventory + } + return false +} + +type PlayerRespawnMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Position *Vec3 `protobuf:"bytes,1,opt,name=position,proto3,oneof" json:"position,omitempty"` + World *WorldRef `protobuf:"bytes,2,opt,name=world,proto3,oneof" json:"world,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerRespawnMutation) Reset() { + *x = PlayerRespawnMutation{} + mi := &file_mutations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerRespawnMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerRespawnMutation) ProtoMessage() {} + +func (x *PlayerRespawnMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerRespawnMutation.ProtoReflect.Descriptor instead. +func (*PlayerRespawnMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{7} +} + +func (x *PlayerRespawnMutation) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerRespawnMutation) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +type PlayerAttackEntityMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Force float64 `protobuf:"fixed64,1,opt,name=force,proto3" json:"force,omitempty"` + Height float64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` + Critical bool `protobuf:"varint,3,opt,name=critical,proto3" json:"critical,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerAttackEntityMutation) Reset() { + *x = PlayerAttackEntityMutation{} + mi := &file_mutations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerAttackEntityMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerAttackEntityMutation) ProtoMessage() {} + +func (x *PlayerAttackEntityMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerAttackEntityMutation.ProtoReflect.Descriptor instead. +func (*PlayerAttackEntityMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{8} +} + +func (x *PlayerAttackEntityMutation) GetForce() float64 { + if x != nil { + return x.Force + } + return 0 +} + +func (x *PlayerAttackEntityMutation) GetHeight() float64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *PlayerAttackEntityMutation) GetCritical() bool { + if x != nil { + return x.Critical + } + return false +} + +type PlayerExperienceGainMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount int32 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerExperienceGainMutation) Reset() { + *x = PlayerExperienceGainMutation{} + mi := &file_mutations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerExperienceGainMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerExperienceGainMutation) ProtoMessage() {} + +func (x *PlayerExperienceGainMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerExperienceGainMutation.ProtoReflect.Descriptor instead. +func (*PlayerExperienceGainMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{9} +} + +func (x *PlayerExperienceGainMutation) GetAmount() int32 { + if x != nil { + return x.Amount + } + return 0 +} + +type PlayerLecternPageTurnMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + NewPage int32 `protobuf:"varint,1,opt,name=new_page,json=newPage,proto3" json:"new_page,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerLecternPageTurnMutation) Reset() { + *x = PlayerLecternPageTurnMutation{} + mi := &file_mutations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerLecternPageTurnMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerLecternPageTurnMutation) ProtoMessage() {} + +func (x *PlayerLecternPageTurnMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerLecternPageTurnMutation.ProtoReflect.Descriptor instead. +func (*PlayerLecternPageTurnMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{10} +} + +func (x *PlayerLecternPageTurnMutation) GetNewPage() int32 { + if x != nil { + return x.NewPage + } + return 0 +} + +type PlayerItemPickupMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Item *ItemStack `protobuf:"bytes,1,opt,name=item,proto3,oneof" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemPickupMutation) Reset() { + *x = PlayerItemPickupMutation{} + mi := &file_mutations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemPickupMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemPickupMutation) ProtoMessage() {} + +func (x *PlayerItemPickupMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemPickupMutation.ProtoReflect.Descriptor instead. +func (*PlayerItemPickupMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{11} +} + +func (x *PlayerItemPickupMutation) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerTransferMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address *Address `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerTransferMutation) Reset() { + *x = PlayerTransferMutation{} + mi := &file_mutations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerTransferMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerTransferMutation) ProtoMessage() {} + +func (x *PlayerTransferMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerTransferMutation.ProtoReflect.Descriptor instead. +func (*PlayerTransferMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{12} +} + +func (x *PlayerTransferMutation) GetAddress() *Address { + if x != nil { + return x.Address + } + return nil +} + +type WorldExplosionMutation struct { + state protoimpl.MessageState `protogen:"open.v1"` + EntityUuids []string `protobuf:"bytes,1,rep,name=entity_uuids,json=entityUuids,proto3" json:"entity_uuids,omitempty"` + Blocks []*BlockPos `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"` + ItemDropChance *float64 `protobuf:"fixed64,3,opt,name=item_drop_chance,json=itemDropChance,proto3,oneof" json:"item_drop_chance,omitempty"` + SpawnFire *bool `protobuf:"varint,4,opt,name=spawn_fire,json=spawnFire,proto3,oneof" json:"spawn_fire,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldExplosionMutation) Reset() { + *x = WorldExplosionMutation{} + mi := &file_mutations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldExplosionMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldExplosionMutation) ProtoMessage() {} + +func (x *WorldExplosionMutation) ProtoReflect() protoreflect.Message { + mi := &file_mutations_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldExplosionMutation.ProtoReflect.Descriptor instead. +func (*WorldExplosionMutation) Descriptor() ([]byte, []int) { + return file_mutations_proto_rawDescGZIP(), []int{13} +} + +func (x *WorldExplosionMutation) GetEntityUuids() []string { + if x != nil { + return x.EntityUuids + } + return nil +} + +func (x *WorldExplosionMutation) GetBlocks() []*BlockPos { + if x != nil { + return x.Blocks + } + return nil +} + +func (x *WorldExplosionMutation) GetItemDropChance() float64 { + if x != nil && x.ItemDropChance != nil { + return *x.ItemDropChance + } + return 0 +} + +func (x *WorldExplosionMutation) GetSpawnFire() bool { + if x != nil && x.SpawnFire != nil { + return *x.SpawnFire + } + return false +} + +var File_mutations_proto protoreflect.FileDescriptor + +const file_mutations_proto_rawDesc = "" + + "\n" + + "\x0fmutations.proto\x12\tdf.plugin\x1a\ractions.proto\x1a\fcommon.proto\"\xcb\x01\n" + + "\vEventResult\x12\x19\n" + + "\bevent_id\x18\x01 \x01(\tR\aeventId\x12\x1b\n" + + "\x06cancel\x18\x02 \x01(\bH\x01R\x06cancel\x88\x01\x01\x12-\n" + + "\x04chat\x18\n" + + " \x01(\v2\x17.df.plugin.ChatMutationH\x00R\x04chat\x12@\n" + + "\vblock_break\x18\v \x01(\v2\x1d.df.plugin.BlockBreakMutationH\x00R\n" + + "blockBreakB\b\n" + + "\x06updateB\t\n" + + "\a_cancel\"(\n" + + "\fChatMutation\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\"\\\n" + + "\x12BlockBreakMutation\x12*\n" + + "\x05drops\x18\x01 \x03(\v2\x14.df.plugin.ItemStackR\x05drops\x12\x13\n" + + "\x02xp\x18\x02 \x01(\x05H\x00R\x02xp\x88\x01\x01B\x05\n" + + "\x03_xpB)Z'github.com/secmc/plugin/proto/generatedb\x06proto3" + var ( file_mutations_proto_rawDescOnce sync.Once - file_mutations_proto_rawDescData = file_mutations_proto_rawDesc + file_mutations_proto_rawDescData []byte ) func file_mutations_proto_rawDescGZIP() []byte { file_mutations_proto_rawDescOnce.Do(func() { - file_mutations_proto_rawDescData = protoimpl.X.CompressGZIP(file_mutations_proto_rawDescData) + file_mutations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mutations_proto_rawDesc), len(file_mutations_proto_rawDesc))) }) return file_mutations_proto_rawDescData } -var file_mutations_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_mutations_proto_goTypes = []interface{}{ - (*EventResult)(nil), // 0: df.plugin.EventResult - (*ChatMutation)(nil), // 1: df.plugin.ChatMutation - (*BlockBreakMutation)(nil), // 2: df.plugin.BlockBreakMutation - (*ItemStack)(nil), // 3: df.plugin.ItemStack +var file_mutations_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_mutations_proto_goTypes = []any{ + (*EventResult)(nil), // 0: df.plugin.EventResult + (*ChatMutation)(nil), // 1: df.plugin.ChatMutation + (*BlockBreakMutation)(nil), // 2: df.plugin.BlockBreakMutation + (*PlayerFoodLossMutation)(nil), // 3: df.plugin.PlayerFoodLossMutation + (*PlayerHealMutation)(nil), // 4: df.plugin.PlayerHealMutation + (*PlayerHurtMutation)(nil), // 5: df.plugin.PlayerHurtMutation + (*PlayerDeathMutation)(nil), // 6: df.plugin.PlayerDeathMutation + (*PlayerRespawnMutation)(nil), // 7: df.plugin.PlayerRespawnMutation + (*PlayerAttackEntityMutation)(nil), // 8: df.plugin.PlayerAttackEntityMutation + (*PlayerExperienceGainMutation)(nil), // 9: df.plugin.PlayerExperienceGainMutation + (*PlayerLecternPageTurnMutation)(nil), // 10: df.plugin.PlayerLecternPageTurnMutation + (*PlayerItemPickupMutation)(nil), // 11: df.plugin.PlayerItemPickupMutation + (*PlayerTransferMutation)(nil), // 12: df.plugin.PlayerTransferMutation + (*WorldExplosionMutation)(nil), // 13: df.plugin.WorldExplosionMutation + (*ItemStack)(nil), // 14: df.plugin.ItemStack + (*Vec3)(nil), // 15: df.plugin.Vec3 + (*WorldRef)(nil), // 16: df.plugin.WorldRef + (*BlockPos)(nil), // 17: df.plugin.BlockPos + (*Address)(nil), // 18: df.plugin.Address } var file_mutations_proto_depIdxs = []int32{ - 1, // 0: df.plugin.EventResult.chat:type_name -> df.plugin.ChatMutation - 2, // 1: df.plugin.EventResult.block_break:type_name -> df.plugin.BlockBreakMutation - 3, // 2: df.plugin.BlockBreakMutation.drops:type_name -> df.plugin.ItemStack - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 1, // 0: df.plugin.EventResult.chat:type_name -> df.plugin.ChatMutation + 2, // 1: df.plugin.EventResult.block_break:type_name -> df.plugin.BlockBreakMutation + 3, // 2: df.plugin.EventResult.player_food_loss:type_name -> df.plugin.PlayerFoodLossMutation + 4, // 3: df.plugin.EventResult.player_heal:type_name -> df.plugin.PlayerHealMutation + 5, // 4: df.plugin.EventResult.player_hurt:type_name -> df.plugin.PlayerHurtMutation + 6, // 5: df.plugin.EventResult.player_death:type_name -> df.plugin.PlayerDeathMutation + 7, // 6: df.plugin.EventResult.player_respawn:type_name -> df.plugin.PlayerRespawnMutation + 8, // 7: df.plugin.EventResult.player_attack_entity:type_name -> df.plugin.PlayerAttackEntityMutation + 9, // 8: df.plugin.EventResult.player_experience_gain:type_name -> df.plugin.PlayerExperienceGainMutation + 10, // 9: df.plugin.EventResult.player_lectern_page_turn:type_name -> df.plugin.PlayerLecternPageTurnMutation + 11, // 10: df.plugin.EventResult.player_item_pickup:type_name -> df.plugin.PlayerItemPickupMutation + 12, // 11: df.plugin.EventResult.player_transfer:type_name -> df.plugin.PlayerTransferMutation + 13, // 12: df.plugin.EventResult.world_explosion:type_name -> df.plugin.WorldExplosionMutation + 14, // 13: df.plugin.BlockBreakMutation.drops:type_name -> df.plugin.ItemStack + 15, // 14: df.plugin.PlayerRespawnMutation.position:type_name -> df.plugin.Vec3 + 16, // 15: df.plugin.PlayerRespawnMutation.world:type_name -> df.plugin.WorldRef + 14, // 16: df.plugin.PlayerItemPickupMutation.item:type_name -> df.plugin.ItemStack + 18, // 17: df.plugin.PlayerTransferMutation.address:type_name -> df.plugin.Address + 17, // 18: df.plugin.WorldExplosionMutation.blocks:type_name -> df.plugin.BlockPos + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_mutations_proto_init() } @@ -296,56 +1020,34 @@ func file_mutations_proto_init() { } file_actions_proto_init() file_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_mutations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mutations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatMutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mutations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockBreakMutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_mutations_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_mutations_proto_msgTypes[0].OneofWrappers = []any{ (*EventResult_Chat)(nil), (*EventResult_BlockBreak)(nil), + (*EventResult_PlayerFoodLoss)(nil), + (*EventResult_PlayerHeal)(nil), + (*EventResult_PlayerHurt)(nil), + (*EventResult_PlayerDeath)(nil), + (*EventResult_PlayerRespawn)(nil), + (*EventResult_PlayerAttackEntity)(nil), + (*EventResult_PlayerExperienceGain)(nil), + (*EventResult_PlayerLecternPageTurn)(nil), + (*EventResult_PlayerItemPickup)(nil), + (*EventResult_PlayerTransfer)(nil), + (*EventResult_WorldExplosion)(nil), } - file_mutations_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_mutations_proto_msgTypes[2].OneofWrappers = []any{} + file_mutations_proto_msgTypes[5].OneofWrappers = []any{} + file_mutations_proto_msgTypes[7].OneofWrappers = []any{} + file_mutations_proto_msgTypes[11].OneofWrappers = []any{} + file_mutations_proto_msgTypes[12].OneofWrappers = []any{} + file_mutations_proto_msgTypes[13].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_mutations_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_mutations_proto_rawDesc), len(file_mutations_proto_rawDesc)), NumEnums: 0, - NumMessages: 3, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, @@ -354,7 +1056,6 @@ func file_mutations_proto_init() { MessageInfos: file_mutations_proto_msgTypes, }.Build() File_mutations_proto = out.File - file_mutations_proto_rawDesc = nil file_mutations_proto_goTypes = nil file_mutations_proto_depIdxs = nil } diff --git a/proto/generated/player_events.pb.go b/proto/generated/player_events.pb.go index 18d00fd..6d3a9fb 100644 --- a/proto/generated/player_events.pb.go +++ b/proto/generated/player_events.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) +// protoc-gen-go v1.36.10 +// protoc v3.21.12 // source: player_events.proto package generated @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,32 +22,2176 @@ const ( ) type PlayerJoinEvent struct { - state protoimpl.MessageState + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerJoinEvent) Reset() { + *x = PlayerJoinEvent{} + mi := &file_player_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerJoinEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerJoinEvent) ProtoMessage() {} + +func (x *PlayerJoinEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerJoinEvent.ProtoReflect.Descriptor instead. +func (*PlayerJoinEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{0} +} + +func (x *PlayerJoinEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerJoinEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PlayerQuitEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerQuitEvent) Reset() { + *x = PlayerQuitEvent{} + mi := &file_player_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerQuitEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerQuitEvent) ProtoMessage() {} + +func (x *PlayerQuitEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerQuitEvent.ProtoReflect.Descriptor instead. +func (*PlayerQuitEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{1} +} + +func (x *PlayerQuitEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerQuitEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PlayerMoveEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *Vec3 `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + Rotation *Rotation `protobuf:"bytes,5,opt,name=rotation,proto3" json:"rotation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerMoveEvent) Reset() { + *x = PlayerMoveEvent{} + mi := &file_player_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerMoveEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerMoveEvent) ProtoMessage() {} + +func (x *PlayerMoveEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerMoveEvent.ProtoReflect.Descriptor instead. +func (*PlayerMoveEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{2} +} + +func (x *PlayerMoveEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerMoveEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerMoveEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerMoveEvent) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerMoveEvent) GetRotation() *Rotation { + if x != nil { + return x.Rotation + } + return nil +} + +type PlayerJumpEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *Vec3 `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerJumpEvent) Reset() { + *x = PlayerJumpEvent{} + mi := &file_player_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerJumpEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerJumpEvent) ProtoMessage() {} + +func (x *PlayerJumpEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerJumpEvent.ProtoReflect.Descriptor instead. +func (*PlayerJumpEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{3} +} + +func (x *PlayerJumpEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerJumpEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerJumpEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerJumpEvent) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +type PlayerTeleportEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *Vec3 `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerTeleportEvent) Reset() { + *x = PlayerTeleportEvent{} + mi := &file_player_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerTeleportEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerTeleportEvent) ProtoMessage() {} + +func (x *PlayerTeleportEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerTeleportEvent.ProtoReflect.Descriptor instead. +func (*PlayerTeleportEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{4} +} + +func (x *PlayerTeleportEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerTeleportEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerTeleportEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerTeleportEvent) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +type PlayerChangeWorldEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Before *WorldRef `protobuf:"bytes,3,opt,name=before,proto3,oneof" json:"before,omitempty"` + After *WorldRef `protobuf:"bytes,4,opt,name=after,proto3,oneof" json:"after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerChangeWorldEvent) Reset() { + *x = PlayerChangeWorldEvent{} + mi := &file_player_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerChangeWorldEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerChangeWorldEvent) ProtoMessage() {} + +func (x *PlayerChangeWorldEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerChangeWorldEvent.ProtoReflect.Descriptor instead. +func (*PlayerChangeWorldEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{5} +} + +func (x *PlayerChangeWorldEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerChangeWorldEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerChangeWorldEvent) GetBefore() *WorldRef { + if x != nil { + return x.Before + } + return nil +} + +func (x *PlayerChangeWorldEvent) GetAfter() *WorldRef { + if x != nil { + return x.After + } + return nil +} + +type PlayerToggleSprintEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + After bool `protobuf:"varint,3,opt,name=after,proto3" json:"after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerToggleSprintEvent) Reset() { + *x = PlayerToggleSprintEvent{} + mi := &file_player_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerToggleSprintEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerToggleSprintEvent) ProtoMessage() {} + +func (x *PlayerToggleSprintEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerToggleSprintEvent.ProtoReflect.Descriptor instead. +func (*PlayerToggleSprintEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{6} +} + +func (x *PlayerToggleSprintEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerToggleSprintEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerToggleSprintEvent) GetAfter() bool { + if x != nil { + return x.After + } + return false +} + +type PlayerToggleSneakEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + After bool `protobuf:"varint,3,opt,name=after,proto3" json:"after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerToggleSneakEvent) Reset() { + *x = PlayerToggleSneakEvent{} + mi := &file_player_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerToggleSneakEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerToggleSneakEvent) ProtoMessage() {} + +func (x *PlayerToggleSneakEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerToggleSneakEvent.ProtoReflect.Descriptor instead. +func (*PlayerToggleSneakEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{7} +} + +func (x *PlayerToggleSneakEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerToggleSneakEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerToggleSneakEvent) GetAfter() bool { + if x != nil { + return x.After + } + return false +} + +type ChatEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChatEvent) Reset() { + *x = ChatEvent{} + mi := &file_player_events_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChatEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChatEvent) ProtoMessage() {} + +func (x *ChatEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChatEvent.ProtoReflect.Descriptor instead. +func (*ChatEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{8} +} + +func (x *ChatEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *ChatEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChatEvent) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type PlayerFoodLossEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + From int32 `protobuf:"varint,3,opt,name=from,proto3" json:"from,omitempty"` + To int32 `protobuf:"varint,4,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerFoodLossEvent) Reset() { + *x = PlayerFoodLossEvent{} + mi := &file_player_events_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerFoodLossEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerFoodLossEvent) ProtoMessage() {} + +func (x *PlayerFoodLossEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerFoodLossEvent.ProtoReflect.Descriptor instead. +func (*PlayerFoodLossEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{9} +} + +func (x *PlayerFoodLossEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerFoodLossEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerFoodLossEvent) GetFrom() int32 { + if x != nil { + return x.From + } + return 0 +} + +func (x *PlayerFoodLossEvent) GetTo() int32 { + if x != nil { + return x.To + } + return 0 +} + +type PlayerHealEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` + Source *HealingSource `protobuf:"bytes,4,opt,name=source,proto3,oneof" json:"source,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerHealEvent) Reset() { + *x = PlayerHealEvent{} + mi := &file_player_events_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerHealEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerHealEvent) ProtoMessage() {} + +func (x *PlayerHealEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerHealEvent.ProtoReflect.Descriptor instead. +func (*PlayerHealEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{10} +} + +func (x *PlayerHealEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerHealEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerHealEvent) GetAmount() float64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *PlayerHealEvent) GetSource() *HealingSource { + if x != nil { + return x.Source + } + return nil +} + +type PlayerHurtEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Damage float64 `protobuf:"fixed64,3,opt,name=damage,proto3" json:"damage,omitempty"` + Immune bool `protobuf:"varint,4,opt,name=immune,proto3" json:"immune,omitempty"` + AttackImmunityMs int64 `protobuf:"varint,5,opt,name=attack_immunity_ms,json=attackImmunityMs,proto3" json:"attack_immunity_ms,omitempty"` + Source *DamageSource `protobuf:"bytes,6,opt,name=source,proto3,oneof" json:"source,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerHurtEvent) Reset() { + *x = PlayerHurtEvent{} + mi := &file_player_events_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerHurtEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerHurtEvent) ProtoMessage() {} + +func (x *PlayerHurtEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerHurtEvent.ProtoReflect.Descriptor instead. +func (*PlayerHurtEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{11} +} + +func (x *PlayerHurtEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerHurtEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerHurtEvent) GetDamage() float64 { + if x != nil { + return x.Damage + } + return 0 +} + +func (x *PlayerHurtEvent) GetImmune() bool { + if x != nil { + return x.Immune + } + return false +} + +func (x *PlayerHurtEvent) GetAttackImmunityMs() int64 { + if x != nil { + return x.AttackImmunityMs + } + return 0 +} + +func (x *PlayerHurtEvent) GetSource() *DamageSource { + if x != nil { + return x.Source + } + return nil +} + +type PlayerDeathEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Source *DamageSource `protobuf:"bytes,3,opt,name=source,proto3,oneof" json:"source,omitempty"` + KeepInventory bool `protobuf:"varint,4,opt,name=keep_inventory,json=keepInventory,proto3" json:"keep_inventory,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerDeathEvent) Reset() { + *x = PlayerDeathEvent{} + mi := &file_player_events_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerDeathEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerDeathEvent) ProtoMessage() {} + +func (x *PlayerDeathEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerDeathEvent.ProtoReflect.Descriptor instead. +func (*PlayerDeathEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{12} +} + +func (x *PlayerDeathEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerDeathEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerDeathEvent) GetSource() *DamageSource { + if x != nil { + return x.Source + } + return nil +} + +func (x *PlayerDeathEvent) GetKeepInventory() bool { + if x != nil { + return x.KeepInventory + } + return false +} + +type PlayerRespawnEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Position *Vec3 `protobuf:"bytes,3,opt,name=position,proto3,oneof" json:"position,omitempty"` + World *WorldRef `protobuf:"bytes,4,opt,name=world,proto3,oneof" json:"world,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerRespawnEvent) Reset() { + *x = PlayerRespawnEvent{} + mi := &file_player_events_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerRespawnEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerRespawnEvent) ProtoMessage() {} + +func (x *PlayerRespawnEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerRespawnEvent.ProtoReflect.Descriptor instead. +func (*PlayerRespawnEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{13} +} + +func (x *PlayerRespawnEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerRespawnEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerRespawnEvent) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerRespawnEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +type PlayerSkinChangeEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + FullId *string `protobuf:"bytes,3,opt,name=full_id,json=fullId,proto3,oneof" json:"full_id,omitempty"` + PlayFabId *string `protobuf:"bytes,4,opt,name=play_fab_id,json=playFabId,proto3,oneof" json:"play_fab_id,omitempty"` + Persona bool `protobuf:"varint,5,opt,name=persona,proto3" json:"persona,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerSkinChangeEvent) Reset() { + *x = PlayerSkinChangeEvent{} + mi := &file_player_events_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerSkinChangeEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerSkinChangeEvent) ProtoMessage() {} + +func (x *PlayerSkinChangeEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerSkinChangeEvent.ProtoReflect.Descriptor instead. +func (*PlayerSkinChangeEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{14} +} + +func (x *PlayerSkinChangeEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerSkinChangeEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerSkinChangeEvent) GetFullId() string { + if x != nil && x.FullId != nil { + return *x.FullId + } + return "" +} + +func (x *PlayerSkinChangeEvent) GetPlayFabId() string { + if x != nil && x.PlayFabId != nil { + return *x.PlayFabId + } + return "" +} + +func (x *PlayerSkinChangeEvent) GetPersona() bool { + if x != nil { + return x.Persona + } + return false +} + +type PlayerFireExtinguishEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerFireExtinguishEvent) Reset() { + *x = PlayerFireExtinguishEvent{} + mi := &file_player_events_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerFireExtinguishEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerFireExtinguishEvent) ProtoMessage() {} + +func (x *PlayerFireExtinguishEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerFireExtinguishEvent.ProtoReflect.Descriptor instead. +func (*PlayerFireExtinguishEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{15} +} + +func (x *PlayerFireExtinguishEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerFireExtinguishEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerFireExtinguishEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerFireExtinguishEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +type PlayerStartBreakEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerStartBreakEvent) Reset() { + *x = PlayerStartBreakEvent{} + mi := &file_player_events_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerStartBreakEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerStartBreakEvent) ProtoMessage() {} + +func (x *PlayerStartBreakEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerStartBreakEvent.ProtoReflect.Descriptor instead. +func (*PlayerStartBreakEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{16} +} + +func (x *PlayerStartBreakEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerStartBreakEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerStartBreakEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerStartBreakEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +type BlockBreakEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockBreakEvent) Reset() { + *x = BlockBreakEvent{} + mi := &file_player_events_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockBreakEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockBreakEvent) ProtoMessage() {} + +func (x *BlockBreakEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockBreakEvent.ProtoReflect.Descriptor instead. +func (*BlockBreakEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{17} +} + +func (x *BlockBreakEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *BlockBreakEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BlockBreakEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *BlockBreakEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +type PlayerBlockPlaceEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + Block *BlockState `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerBlockPlaceEvent) Reset() { + *x = PlayerBlockPlaceEvent{} + mi := &file_player_events_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerBlockPlaceEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerBlockPlaceEvent) ProtoMessage() {} + +func (x *PlayerBlockPlaceEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerBlockPlaceEvent.ProtoReflect.Descriptor instead. +func (*PlayerBlockPlaceEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{18} +} + +func (x *PlayerBlockPlaceEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerBlockPlaceEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerBlockPlaceEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerBlockPlaceEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerBlockPlaceEvent) GetBlock() *BlockState { + if x != nil { + return x.Block + } + return nil +} + +type PlayerBlockPickEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + Block *BlockState `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerBlockPickEvent) Reset() { + *x = PlayerBlockPickEvent{} + mi := &file_player_events_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerBlockPickEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerBlockPickEvent) ProtoMessage() {} + +func (x *PlayerBlockPickEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerBlockPickEvent.ProtoReflect.Descriptor instead. +func (*PlayerBlockPickEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{19} +} + +func (x *PlayerBlockPickEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerBlockPickEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerBlockPickEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerBlockPickEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerBlockPickEvent) GetBlock() *BlockState { + if x != nil { + return x.Block + } + return nil +} + +type PlayerItemUseEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Item *ItemStack `protobuf:"bytes,4,opt,name=item,proto3,oneof" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemUseEvent) Reset() { + *x = PlayerItemUseEvent{} + mi := &file_player_events_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemUseEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemUseEvent) ProtoMessage() {} + +func (x *PlayerItemUseEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemUseEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemUseEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{20} +} + +func (x *PlayerItemUseEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemUseEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerItemUseEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemUseEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerItemUseOnBlockEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + Face string `protobuf:"bytes,5,opt,name=face,proto3" json:"face,omitempty"` + ClickPosition *Vec3 `protobuf:"bytes,6,opt,name=click_position,json=clickPosition,proto3" json:"click_position,omitempty"` + Block *BlockState `protobuf:"bytes,7,opt,name=block,proto3" json:"block,omitempty"` + Item *ItemStack `protobuf:"bytes,8,opt,name=item,proto3,oneof" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemUseOnBlockEvent) Reset() { + *x = PlayerItemUseOnBlockEvent{} + mi := &file_player_events_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemUseOnBlockEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemUseOnBlockEvent) ProtoMessage() {} + +func (x *PlayerItemUseOnBlockEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemUseOnBlockEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemUseOnBlockEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{21} +} + +func (x *PlayerItemUseOnBlockEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemUseOnBlockEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerItemUseOnBlockEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemUseOnBlockEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerItemUseOnBlockEvent) GetFace() string { + if x != nil { + return x.Face + } + return "" +} + +func (x *PlayerItemUseOnBlockEvent) GetClickPosition() *Vec3 { + if x != nil { + return x.ClickPosition + } + return nil +} + +func (x *PlayerItemUseOnBlockEvent) GetBlock() *BlockState { + if x != nil { + return x.Block + } + return nil +} + +func (x *PlayerItemUseOnBlockEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerItemUseOnEntityEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Entity *EntityRef `protobuf:"bytes,4,opt,name=entity,proto3" json:"entity,omitempty"` + Item *ItemStack `protobuf:"bytes,5,opt,name=item,proto3,oneof" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemUseOnEntityEvent) Reset() { + *x = PlayerItemUseOnEntityEvent{} + mi := &file_player_events_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemUseOnEntityEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemUseOnEntityEvent) ProtoMessage() {} + +func (x *PlayerItemUseOnEntityEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemUseOnEntityEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemUseOnEntityEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{22} +} + +func (x *PlayerItemUseOnEntityEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemUseOnEntityEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerItemUseOnEntityEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemUseOnEntityEvent) GetEntity() *EntityRef { + if x != nil { + return x.Entity + } + return nil +} + +func (x *PlayerItemUseOnEntityEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerItemReleaseEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Item *ItemStack `protobuf:"bytes,4,opt,name=item,proto3,oneof" json:"item,omitempty"` + DurationMs int64 `protobuf:"varint,5,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemReleaseEvent) Reset() { + *x = PlayerItemReleaseEvent{} + mi := &file_player_events_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemReleaseEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemReleaseEvent) ProtoMessage() {} + +func (x *PlayerItemReleaseEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemReleaseEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemReleaseEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{23} +} + +func (x *PlayerItemReleaseEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemReleaseEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerItemReleaseEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemReleaseEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +func (x *PlayerItemReleaseEvent) GetDurationMs() int64 { + if x != nil { + return x.DurationMs + } + return 0 +} + +type PlayerItemConsumeEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Item *ItemStack `protobuf:"bytes,4,opt,name=item,proto3,oneof" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemConsumeEvent) Reset() { + *x = PlayerItemConsumeEvent{} + mi := &file_player_events_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemConsumeEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemConsumeEvent) ProtoMessage() {} + +func (x *PlayerItemConsumeEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemConsumeEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemConsumeEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{24} +} + +func (x *PlayerItemConsumeEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemConsumeEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerItemConsumeEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemConsumeEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerAttackEntityEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Entity *EntityRef `protobuf:"bytes,4,opt,name=entity,proto3" json:"entity,omitempty"` + Force float64 `protobuf:"fixed64,5,opt,name=force,proto3" json:"force,omitempty"` + Height float64 `protobuf:"fixed64,6,opt,name=height,proto3" json:"height,omitempty"` + Critical bool `protobuf:"varint,7,opt,name=critical,proto3" json:"critical,omitempty"` + Item *ItemStack `protobuf:"bytes,8,opt,name=item,proto3,oneof" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerAttackEntityEvent) Reset() { + *x = PlayerAttackEntityEvent{} + mi := &file_player_events_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerAttackEntityEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerAttackEntityEvent) ProtoMessage() {} + +func (x *PlayerAttackEntityEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerAttackEntityEvent.ProtoReflect.Descriptor instead. +func (*PlayerAttackEntityEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{25} +} + +func (x *PlayerAttackEntityEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerAttackEntityEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerAttackEntityEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerAttackEntityEvent) GetEntity() *EntityRef { + if x != nil { + return x.Entity + } + return nil +} + +func (x *PlayerAttackEntityEvent) GetForce() float64 { + if x != nil { + return x.Force + } + return 0 +} + +func (x *PlayerAttackEntityEvent) GetHeight() float64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *PlayerAttackEntityEvent) GetCritical() bool { + if x != nil { + return x.Critical + } + return false +} + +func (x *PlayerAttackEntityEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerExperienceGainEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Amount int32 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerExperienceGainEvent) Reset() { + *x = PlayerExperienceGainEvent{} + mi := &file_player_events_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerExperienceGainEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerExperienceGainEvent) ProtoMessage() {} + +func (x *PlayerExperienceGainEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerExperienceGainEvent.ProtoReflect.Descriptor instead. +func (*PlayerExperienceGainEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{26} +} + +func (x *PlayerExperienceGainEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerExperienceGainEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerExperienceGainEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerExperienceGainEvent) GetAmount() int32 { + if x != nil { + return x.Amount + } + return 0 +} + +type PlayerPunchAirEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerPunchAirEvent) Reset() { + *x = PlayerPunchAirEvent{} + mi := &file_player_events_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerPunchAirEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerPunchAirEvent) ProtoMessage() {} + +func (x *PlayerPunchAirEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerPunchAirEvent.ProtoReflect.Descriptor instead. +func (*PlayerPunchAirEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{27} +} + +func (x *PlayerPunchAirEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerPunchAirEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerPunchAirEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +type PlayerSignEditEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + FrontSide bool `protobuf:"varint,5,opt,name=front_side,json=frontSide,proto3" json:"front_side,omitempty"` + OldText string `protobuf:"bytes,6,opt,name=old_text,json=oldText,proto3" json:"old_text,omitempty"` + NewText string `protobuf:"bytes,7,opt,name=new_text,json=newText,proto3" json:"new_text,omitempty"` + unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache +} + +func (x *PlayerSignEditEvent) Reset() { + *x = PlayerSignEditEvent{} + mi := &file_player_events_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerSignEditEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerSignEditEvent) ProtoMessage() {} + +func (x *PlayerSignEditEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerSignEditEvent.ProtoReflect.Descriptor instead. +func (*PlayerSignEditEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{28} +} + +func (x *PlayerSignEditEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerSignEditEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerSignEditEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerSignEditEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerSignEditEvent) GetFrontSide() bool { + if x != nil { + return x.FrontSide + } + return false +} + +func (x *PlayerSignEditEvent) GetOldText() string { + if x != nil { + return x.OldText + } + return "" +} + +func (x *PlayerSignEditEvent) GetNewText() string { + if x != nil { + return x.NewText + } + return "" +} + +type PlayerLecternPageTurnEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` + OldPage int32 `protobuf:"varint,5,opt,name=old_page,json=oldPage,proto3" json:"old_page,omitempty"` + NewPage int32 `protobuf:"varint,6,opt,name=new_page,json=newPage,proto3" json:"new_page,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerLecternPageTurnEvent) Reset() { + *x = PlayerLecternPageTurnEvent{} + mi := &file_player_events_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerLecternPageTurnEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerLecternPageTurnEvent) ProtoMessage() {} + +func (x *PlayerLecternPageTurnEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerLecternPageTurnEvent.ProtoReflect.Descriptor instead. +func (*PlayerLecternPageTurnEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{29} +} - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +func (x *PlayerLecternPageTurnEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" } -func (x *PlayerJoinEvent) Reset() { - *x = PlayerJoinEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_player_events_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PlayerLecternPageTurnEvent) GetName() string { + if x != nil { + return x.Name } + return "" } -func (x *PlayerJoinEvent) String() string { +func (x *PlayerLecternPageTurnEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerLecternPageTurnEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *PlayerLecternPageTurnEvent) GetOldPage() int32 { + if x != nil { + return x.OldPage + } + return 0 +} + +func (x *PlayerLecternPageTurnEvent) GetNewPage() int32 { + if x != nil { + return x.NewPage + } + return 0 +} + +type PlayerItemDamageEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Item *ItemStack `protobuf:"bytes,4,opt,name=item,proto3,oneof" json:"item,omitempty"` + Damage int32 `protobuf:"varint,5,opt,name=damage,proto3" json:"damage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerItemDamageEvent) Reset() { + *x = PlayerItemDamageEvent{} + mi := &file_player_events_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerItemDamageEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PlayerJoinEvent) ProtoMessage() {} +func (*PlayerItemDamageEvent) ProtoMessage() {} -func (x *PlayerJoinEvent) ProtoReflect() protoreflect.Message { - mi := &file_player_events_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { +func (x *PlayerItemDamageEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[30] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56,52 +2201,141 @@ func (x *PlayerJoinEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PlayerJoinEvent.ProtoReflect.Descriptor instead. -func (*PlayerJoinEvent) Descriptor() ([]byte, []int) { - return file_player_events_proto_rawDescGZIP(), []int{0} +// Deprecated: Use PlayerItemDamageEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemDamageEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{30} } -func (x *PlayerJoinEvent) GetPlayerUuid() string { +func (x *PlayerItemDamageEvent) GetPlayerUuid() string { if x != nil { return x.PlayerUuid } return "" } -func (x *PlayerJoinEvent) GetName() string { +func (x *PlayerItemDamageEvent) GetName() string { if x != nil { return x.Name } return "" } -type PlayerQuitEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +func (x *PlayerItemDamageEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemDamageEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +func (x *PlayerItemDamageEvent) GetDamage() int32 { + if x != nil { + return x.Damage + } + return 0 +} + +type PlayerItemPickupEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Item *ItemStack `protobuf:"bytes,4,opt,name=item,proto3,oneof" json:"item,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +func (x *PlayerItemPickupEvent) Reset() { + *x = PlayerItemPickupEvent{} + mi := &file_player_events_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *PlayerQuitEvent) Reset() { - *x = PlayerQuitEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_player_events_proto_msgTypes[1] +func (x *PlayerItemPickupEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemPickupEvent) ProtoMessage() {} + +func (x *PlayerItemPickupEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[31] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerItemPickupEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemPickupEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{31} +} + +func (x *PlayerItemPickupEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemPickupEvent) GetName() string { + if x != nil { + return x.Name } + return "" } -func (x *PlayerQuitEvent) String() string { +func (x *PlayerItemPickupEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemPickupEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerHeldSlotChangeEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + FromSlot int32 `protobuf:"varint,4,opt,name=from_slot,json=fromSlot,proto3" json:"from_slot,omitempty"` + ToSlot int32 `protobuf:"varint,5,opt,name=to_slot,json=toSlot,proto3" json:"to_slot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerHeldSlotChangeEvent) Reset() { + *x = PlayerHeldSlotChangeEvent{} + mi := &file_player_events_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerHeldSlotChangeEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PlayerQuitEvent) ProtoMessage() {} +func (*PlayerHeldSlotChangeEvent) ProtoMessage() {} -func (x *PlayerQuitEvent) ProtoReflect() protoreflect.Message { - mi := &file_player_events_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { +func (x *PlayerHeldSlotChangeEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[32] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,53 +2345,139 @@ func (x *PlayerQuitEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PlayerQuitEvent.ProtoReflect.Descriptor instead. -func (*PlayerQuitEvent) Descriptor() ([]byte, []int) { - return file_player_events_proto_rawDescGZIP(), []int{1} +// Deprecated: Use PlayerHeldSlotChangeEvent.ProtoReflect.Descriptor instead. +func (*PlayerHeldSlotChangeEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{32} } -func (x *PlayerQuitEvent) GetPlayerUuid() string { +func (x *PlayerHeldSlotChangeEvent) GetPlayerUuid() string { if x != nil { return x.PlayerUuid } return "" } -func (x *PlayerQuitEvent) GetName() string { +func (x *PlayerHeldSlotChangeEvent) GetName() string { if x != nil { return x.Name } return "" } -type ChatEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +func (x *PlayerHeldSlotChangeEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerHeldSlotChangeEvent) GetFromSlot() int32 { + if x != nil { + return x.FromSlot + } + return 0 +} + +func (x *PlayerHeldSlotChangeEvent) GetToSlot() int32 { + if x != nil { + return x.ToSlot + } + return 0 +} + +type PlayerItemDropEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` + Item *ItemStack `protobuf:"bytes,4,opt,name=item,proto3,oneof" json:"item,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` +func (x *PlayerItemDropEvent) Reset() { + *x = PlayerItemDropEvent{} + mi := &file_player_events_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ChatEvent) Reset() { - *x = ChatEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_player_events_proto_msgTypes[2] +func (x *PlayerItemDropEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerItemDropEvent) ProtoMessage() {} + +func (x *PlayerItemDropEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[33] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *ChatEvent) String() string { +// Deprecated: Use PlayerItemDropEvent.ProtoReflect.Descriptor instead. +func (*PlayerItemDropEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{33} +} + +func (x *PlayerItemDropEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *PlayerItemDropEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PlayerItemDropEvent) GetWorld() string { + if x != nil { + return x.World + } + return "" +} + +func (x *PlayerItemDropEvent) GetItem() *ItemStack { + if x != nil { + return x.Item + } + return nil +} + +type PlayerTransferEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Address *Address `protobuf:"bytes,3,opt,name=address,proto3,oneof" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PlayerTransferEvent) Reset() { + *x = PlayerTransferEvent{} + mi := &file_player_events_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PlayerTransferEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChatEvent) ProtoMessage() {} +func (*PlayerTransferEvent) ProtoMessage() {} -func (x *ChatEvent) ProtoReflect() protoreflect.Message { - mi := &file_player_events_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { +func (x *PlayerTransferEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[34] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,51 +2487,48 @@ func (x *ChatEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChatEvent.ProtoReflect.Descriptor instead. -func (*ChatEvent) Descriptor() ([]byte, []int) { - return file_player_events_proto_rawDescGZIP(), []int{2} +// Deprecated: Use PlayerTransferEvent.ProtoReflect.Descriptor instead. +func (*PlayerTransferEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{34} } -func (x *ChatEvent) GetPlayerUuid() string { +func (x *PlayerTransferEvent) GetPlayerUuid() string { if x != nil { return x.PlayerUuid } return "" } -func (x *ChatEvent) GetName() string { +func (x *PlayerTransferEvent) GetName() string { if x != nil { return x.Name } return "" } -func (x *ChatEvent) GetMessage() string { +func (x *PlayerTransferEvent) GetAddress() *Address { if x != nil { - return x.Message + return x.Address } - return "" + return nil } type CommandEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Raw string `protobuf:"bytes,3,opt,name=raw,proto3" json:"raw,omitempty"` // Full command string like "/tp 100 64 200" + Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"` // Just the command name like "tp" + Args []string `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"` // Parsed arguments like ["100", "64", "200"] unknownFields protoimpl.UnknownFields - - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Raw string `protobuf:"bytes,3,opt,name=raw,proto3" json:"raw,omitempty"` // Full command string like "/tp 100 64 200" - Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"` // Just the command name like "tp" - Args []string `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"` // Parsed arguments like ["100", "64", "200"] + sizeCache protoimpl.SizeCache } func (x *CommandEvent) Reset() { *x = CommandEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_player_events_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_player_events_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommandEvent) String() string { @@ -221,8 +2538,8 @@ func (x *CommandEvent) String() string { func (*CommandEvent) ProtoMessage() {} func (x *CommandEvent) ProtoReflect() protoreflect.Message { - mi := &file_player_events_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_player_events_proto_msgTypes[35] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,7 +2551,7 @@ func (x *CommandEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use CommandEvent.ProtoReflect.Descriptor instead. func (*CommandEvent) Descriptor() ([]byte, []int) { - return file_player_events_proto_rawDescGZIP(), []int{3} + return file_player_events_proto_rawDescGZIP(), []int{35} } func (x *CommandEvent) GetPlayerUuid() string { @@ -272,37 +2589,39 @@ func (x *CommandEvent) GetArgs() []string { return nil } -type BlockBreakEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - World string `protobuf:"bytes,3,opt,name=world,proto3" json:"world,omitempty"` - X int32 `protobuf:"varint,4,opt,name=x,proto3" json:"x,omitempty"` - Y int32 `protobuf:"varint,5,opt,name=y,proto3" json:"y,omitempty"` - Z int32 `protobuf:"varint,6,opt,name=z,proto3" json:"z,omitempty"` +type PlayerDiagnosticsEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerUuid string `protobuf:"bytes,1,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + AverageFramesPerSecond float64 `protobuf:"fixed64,3,opt,name=average_frames_per_second,json=averageFramesPerSecond,proto3" json:"average_frames_per_second,omitempty"` + AverageServerSimTickTime float64 `protobuf:"fixed64,4,opt,name=average_server_sim_tick_time,json=averageServerSimTickTime,proto3" json:"average_server_sim_tick_time,omitempty"` + AverageClientSimTickTime float64 `protobuf:"fixed64,5,opt,name=average_client_sim_tick_time,json=averageClientSimTickTime,proto3" json:"average_client_sim_tick_time,omitempty"` + AverageBeginFrameTime float64 `protobuf:"fixed64,6,opt,name=average_begin_frame_time,json=averageBeginFrameTime,proto3" json:"average_begin_frame_time,omitempty"` + AverageInputTime float64 `protobuf:"fixed64,7,opt,name=average_input_time,json=averageInputTime,proto3" json:"average_input_time,omitempty"` + AverageRenderTime float64 `protobuf:"fixed64,8,opt,name=average_render_time,json=averageRenderTime,proto3" json:"average_render_time,omitempty"` + AverageEndFrameTime float64 `protobuf:"fixed64,9,opt,name=average_end_frame_time,json=averageEndFrameTime,proto3" json:"average_end_frame_time,omitempty"` + AverageRemainderTimePercent float64 `protobuf:"fixed64,10,opt,name=average_remainder_time_percent,json=averageRemainderTimePercent,proto3" json:"average_remainder_time_percent,omitempty"` + AverageUnaccountedTimePercent float64 `protobuf:"fixed64,11,opt,name=average_unaccounted_time_percent,json=averageUnaccountedTimePercent,proto3" json:"average_unaccounted_time_percent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *BlockBreakEvent) Reset() { - *x = BlockBreakEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_player_events_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *PlayerDiagnosticsEvent) Reset() { + *x = PlayerDiagnosticsEvent{} + mi := &file_player_events_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *BlockBreakEvent) String() string { +func (x *PlayerDiagnosticsEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BlockBreakEvent) ProtoMessage() {} +func (*PlayerDiagnosticsEvent) ProtoMessage() {} -func (x *BlockBreakEvent) ProtoReflect() protoreflect.Message { - mi := &file_player_events_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { +func (x *PlayerDiagnosticsEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[36] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,128 +2631,465 @@ func (x *BlockBreakEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BlockBreakEvent.ProtoReflect.Descriptor instead. -func (*BlockBreakEvent) Descriptor() ([]byte, []int) { - return file_player_events_proto_rawDescGZIP(), []int{4} +// Deprecated: Use PlayerDiagnosticsEvent.ProtoReflect.Descriptor instead. +func (*PlayerDiagnosticsEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{36} } -func (x *BlockBreakEvent) GetPlayerUuid() string { +func (x *PlayerDiagnosticsEvent) GetPlayerUuid() string { if x != nil { return x.PlayerUuid } return "" } -func (x *BlockBreakEvent) GetName() string { +func (x *PlayerDiagnosticsEvent) GetName() string { if x != nil { return x.Name } return "" } -func (x *BlockBreakEvent) GetWorld() string { +func (x *PlayerDiagnosticsEvent) GetAverageFramesPerSecond() float64 { if x != nil { - return x.World + return x.AverageFramesPerSecond } - return "" + return 0 } -func (x *BlockBreakEvent) GetX() int32 { +func (x *PlayerDiagnosticsEvent) GetAverageServerSimTickTime() float64 { if x != nil { - return x.X + return x.AverageServerSimTickTime } return 0 } -func (x *BlockBreakEvent) GetY() int32 { +func (x *PlayerDiagnosticsEvent) GetAverageClientSimTickTime() float64 { if x != nil { - return x.Y + return x.AverageClientSimTickTime } return 0 } -func (x *BlockBreakEvent) GetZ() int32 { +func (x *PlayerDiagnosticsEvent) GetAverageBeginFrameTime() float64 { if x != nil { - return x.Z + return x.AverageBeginFrameTime } return 0 } -var File_player_events_proto protoreflect.FileDescriptor +func (x *PlayerDiagnosticsEvent) GetAverageInputTime() float64 { + if x != nil { + return x.AverageInputTime + } + return 0 +} + +func (x *PlayerDiagnosticsEvent) GetAverageRenderTime() float64 { + if x != nil { + return x.AverageRenderTime + } + return 0 +} + +func (x *PlayerDiagnosticsEvent) GetAverageEndFrameTime() float64 { + if x != nil { + return x.AverageEndFrameTime + } + return 0 +} + +func (x *PlayerDiagnosticsEvent) GetAverageRemainderTimePercent() float64 { + if x != nil { + return x.AverageRemainderTimePercent + } + return 0 +} -var file_player_events_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x22, 0x46, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x51, 0x75, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x5a, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x83, 0x01, 0x0a, - 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x72, 0x61, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, - 0x67, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x72, 0x65, 0x61, - 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, - 0x6f, 0x72, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x77, 0x6f, 0x72, 0x6c, - 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, - 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, - 0x01, 0x7a, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x7a, 0x42, 0x90, 0x01, 0x0a, 0x0d, - 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x11, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, - 0x65, 0x63, 0x6d, 0x63, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0xa2, 0x02, 0x03, 0x44, 0x50, - 0x58, 0xaa, 0x02, 0x09, 0x44, 0x66, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, 0x09, - 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x15, 0x44, 0x66, 0x5c, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0a, 0x44, 0x66, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *PlayerDiagnosticsEvent) GetAverageUnaccountedTimePercent() float64 { + if x != nil { + return x.AverageUnaccountedTimePercent + } + return 0 } +var File_player_events_proto protoreflect.FileDescriptor + +const file_player_events_proto_rawDesc = "" + + "\n" + + "\x13player_events.proto\x12\tdf.plugin\x1a\fcommon.proto\"F\n" + + "\x0fPlayerJoinEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"F\n" + + "\x0fPlayerQuitEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\xba\x01\n" + + "\x0fPlayerMoveEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12+\n" + + "\bposition\x18\x04 \x01(\v2\x0f.df.plugin.Vec3R\bposition\x12/\n" + + "\brotation\x18\x05 \x01(\v2\x13.df.plugin.RotationR\brotation\"\x89\x01\n" + + "\x0fPlayerJumpEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12+\n" + + "\bposition\x18\x04 \x01(\v2\x0f.df.plugin.Vec3R\bposition\"\x8d\x01\n" + + "\x13PlayerTeleportEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12+\n" + + "\bposition\x18\x04 \x01(\v2\x0f.df.plugin.Vec3R\bposition\"\xc4\x01\n" + + "\x16PlayerChangeWorldEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x120\n" + + "\x06before\x18\x03 \x01(\v2\x13.df.plugin.WorldRefH\x00R\x06before\x88\x01\x01\x12.\n" + + "\x05after\x18\x04 \x01(\v2\x13.df.plugin.WorldRefH\x01R\x05after\x88\x01\x01B\t\n" + + "\a_beforeB\b\n" + + "\x06_after\"d\n" + + "\x17PlayerToggleSprintEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05after\x18\x03 \x01(\bR\x05after\"c\n" + + "\x16PlayerToggleSneakEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05after\x18\x03 \x01(\bR\x05after\"Z\n" + + "\tChatEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\"n\n" + + "\x13PlayerFoodLossEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" + + "\x04from\x18\x03 \x01(\x05R\x04from\x12\x0e\n" + + "\x02to\x18\x04 \x01(\x05R\x02to\"\xa0\x01\n" + + "\x0fPlayerHealEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x01R\x06amount\x125\n" + + "\x06source\x18\x04 \x01(\v2\x18.df.plugin.HealingSourceH\x00R\x06source\x88\x01\x01B\t\n" + + "\a_source\"\xe5\x01\n" + + "\x0fPlayerHurtEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n" + + "\x06damage\x18\x03 \x01(\x01R\x06damage\x12\x16\n" + + "\x06immune\x18\x04 \x01(\bR\x06immune\x12,\n" + + "\x12attack_immunity_ms\x18\x05 \x01(\x03R\x10attackImmunityMs\x124\n" + + "\x06source\x18\x06 \x01(\v2\x17.df.plugin.DamageSourceH\x00R\x06source\x88\x01\x01B\t\n" + + "\a_source\"\xaf\x01\n" + + "\x10PlayerDeathEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x124\n" + + "\x06source\x18\x03 \x01(\v2\x17.df.plugin.DamageSourceH\x00R\x06source\x88\x01\x01\x12%\n" + + "\x0ekeep_inventory\x18\x04 \x01(\bR\rkeepInventoryB\t\n" + + "\a_source\"\xc2\x01\n" + + "\x12PlayerRespawnEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x120\n" + + "\bposition\x18\x03 \x01(\v2\x0f.df.plugin.Vec3H\x00R\bposition\x88\x01\x01\x12.\n" + + "\x05world\x18\x04 \x01(\v2\x13.df.plugin.WorldRefH\x01R\x05world\x88\x01\x01B\v\n" + + "\t_positionB\b\n" + + "\x06_world\"\xc5\x01\n" + + "\x15PlayerSkinChangeEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + + "\afull_id\x18\x03 \x01(\tH\x00R\x06fullId\x88\x01\x01\x12#\n" + + "\vplay_fab_id\x18\x04 \x01(\tH\x01R\tplayFabId\x88\x01\x01\x12\x18\n" + + "\apersona\x18\x05 \x01(\bR\apersonaB\n" + + "\n" + + "\b_full_idB\x0e\n" + + "\f_play_fab_id\"\x97\x01\n" + + "\x19PlayerFireExtinguishEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\"\x93\x01\n" + + "\x15PlayerStartBreakEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\"\x8d\x01\n" + + "\x0fBlockBreakEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\"\xc0\x01\n" + + "\x15PlayerBlockPlaceEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x12+\n" + + "\x05block\x18\x05 \x01(\v2\x15.df.plugin.BlockStateR\x05block\"\xbf\x01\n" + + "\x14PlayerBlockPickEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x12+\n" + + "\x05block\x18\x05 \x01(\v2\x15.df.plugin.BlockStateR\x05block\"\x97\x01\n" + + "\x12PlayerItemUseEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12-\n" + + "\x04item\x18\x04 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"\xc8\x02\n" + + "\x19PlayerItemUseOnBlockEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x12\x12\n" + + "\x04face\x18\x05 \x01(\tR\x04face\x126\n" + + "\x0eclick_position\x18\x06 \x01(\v2\x0f.df.plugin.Vec3R\rclickPosition\x12+\n" + + "\x05block\x18\a \x01(\v2\x15.df.plugin.BlockStateR\x05block\x12-\n" + + "\x04item\x18\b \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"\xcd\x01\n" + + "\x1aPlayerItemUseOnEntityEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12,\n" + + "\x06entity\x18\x04 \x01(\v2\x14.df.plugin.EntityRefR\x06entity\x12-\n" + + "\x04item\x18\x05 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"\xbc\x01\n" + + "\x16PlayerItemReleaseEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12-\n" + + "\x04item\x18\x04 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01\x12\x1f\n" + + "\vduration_ms\x18\x05 \x01(\x03R\n" + + "durationMsB\a\n" + + "\x05_item\"\x9b\x01\n" + + "\x16PlayerItemConsumeEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12-\n" + + "\x04item\x18\x04 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"\x94\x02\n" + + "\x17PlayerAttackEntityEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12,\n" + + "\x06entity\x18\x04 \x01(\v2\x14.df.plugin.EntityRefR\x06entity\x12\x14\n" + + "\x05force\x18\x05 \x01(\x01R\x05force\x12\x16\n" + + "\x06height\x18\x06 \x01(\x01R\x06height\x12\x1a\n" + + "\bcritical\x18\a \x01(\bR\bcritical\x12-\n" + + "\x04item\x18\b \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"~\n" + + "\x19PlayerExperienceGainEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12\x16\n" + + "\x06amount\x18\x04 \x01(\x05R\x06amount\"`\n" + + "\x13PlayerPunchAirEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\"\xe6\x01\n" + + "\x13PlayerSignEditEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x12\x1d\n" + + "\n" + + "front_side\x18\x05 \x01(\bR\tfrontSide\x12\x19\n" + + "\bold_text\x18\x06 \x01(\tR\aoldText\x12\x19\n" + + "\bnew_text\x18\a \x01(\tR\anewText\"\xce\x01\n" + + "\x1aPlayerLecternPageTurnEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12/\n" + + "\bposition\x18\x04 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x12\x19\n" + + "\bold_page\x18\x05 \x01(\x05R\aoldPage\x12\x19\n" + + "\bnew_page\x18\x06 \x01(\x05R\anewPage\"\xb2\x01\n" + + "\x15PlayerItemDamageEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12-\n" + + "\x04item\x18\x04 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01\x12\x16\n" + + "\x06damage\x18\x05 \x01(\x05R\x06damageB\a\n" + + "\x05_item\"\x9a\x01\n" + + "\x15PlayerItemPickupEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12-\n" + + "\x04item\x18\x04 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"\x9c\x01\n" + + "\x19PlayerHeldSlotChangeEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12\x1b\n" + + "\tfrom_slot\x18\x04 \x01(\x05R\bfromSlot\x12\x17\n" + + "\ato_slot\x18\x05 \x01(\x05R\x06toSlot\"\x98\x01\n" + + "\x13PlayerItemDropEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05world\x18\x03 \x01(\tR\x05world\x12-\n" + + "\x04item\x18\x04 \x01(\v2\x14.df.plugin.ItemStackH\x00R\x04item\x88\x01\x01B\a\n" + + "\x05_item\"\x89\x01\n" + + "\x13PlayerTransferEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x121\n" + + "\aaddress\x18\x03 \x01(\v2\x12.df.plugin.AddressH\x00R\aaddress\x88\x01\x01B\n" + + "\n" + + "\b_address\"\x83\x01\n" + + "\fCommandEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" + + "\x03raw\x18\x03 \x01(\tR\x03raw\x12\x18\n" + + "\acommand\x18\x04 \x01(\tR\acommand\x12\x12\n" + + "\x04args\x18\x05 \x03(\tR\x04args\"\xe2\x04\n" + + "\x16PlayerDiagnosticsEvent\x12\x1f\n" + + "\vplayer_uuid\x18\x01 \x01(\tR\n" + + "playerUuid\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x129\n" + + "\x19average_frames_per_second\x18\x03 \x01(\x01R\x16averageFramesPerSecond\x12>\n" + + "\x1caverage_server_sim_tick_time\x18\x04 \x01(\x01R\x18averageServerSimTickTime\x12>\n" + + "\x1caverage_client_sim_tick_time\x18\x05 \x01(\x01R\x18averageClientSimTickTime\x127\n" + + "\x18average_begin_frame_time\x18\x06 \x01(\x01R\x15averageBeginFrameTime\x12,\n" + + "\x12average_input_time\x18\a \x01(\x01R\x10averageInputTime\x12.\n" + + "\x13average_render_time\x18\b \x01(\x01R\x11averageRenderTime\x123\n" + + "\x16average_end_frame_time\x18\t \x01(\x01R\x13averageEndFrameTime\x12C\n" + + "\x1eaverage_remainder_time_percent\x18\n" + + " \x01(\x01R\x1baverageRemainderTimePercent\x12G\n" + + " average_unaccounted_time_percent\x18\v \x01(\x01R\x1daverageUnaccountedTimePercentB)Z'github.com/secmc/plugin/proto/generatedb\x06proto3" + var ( file_player_events_proto_rawDescOnce sync.Once - file_player_events_proto_rawDescData = file_player_events_proto_rawDesc + file_player_events_proto_rawDescData []byte ) func file_player_events_proto_rawDescGZIP() []byte { file_player_events_proto_rawDescOnce.Do(func() { - file_player_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_player_events_proto_rawDescData) + file_player_events_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_player_events_proto_rawDesc), len(file_player_events_proto_rawDesc))) }) return file_player_events_proto_rawDescData } -var file_player_events_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_player_events_proto_goTypes = []interface{}{ - (*PlayerJoinEvent)(nil), // 0: df.plugin.PlayerJoinEvent - (*PlayerQuitEvent)(nil), // 1: df.plugin.PlayerQuitEvent - (*ChatEvent)(nil), // 2: df.plugin.ChatEvent - (*CommandEvent)(nil), // 3: df.plugin.CommandEvent - (*BlockBreakEvent)(nil), // 4: df.plugin.BlockBreakEvent +var file_player_events_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_player_events_proto_goTypes = []any{ + (*PlayerJoinEvent)(nil), // 0: df.plugin.PlayerJoinEvent + (*PlayerQuitEvent)(nil), // 1: df.plugin.PlayerQuitEvent + (*PlayerMoveEvent)(nil), // 2: df.plugin.PlayerMoveEvent + (*PlayerJumpEvent)(nil), // 3: df.plugin.PlayerJumpEvent + (*PlayerTeleportEvent)(nil), // 4: df.plugin.PlayerTeleportEvent + (*PlayerChangeWorldEvent)(nil), // 5: df.plugin.PlayerChangeWorldEvent + (*PlayerToggleSprintEvent)(nil), // 6: df.plugin.PlayerToggleSprintEvent + (*PlayerToggleSneakEvent)(nil), // 7: df.plugin.PlayerToggleSneakEvent + (*ChatEvent)(nil), // 8: df.plugin.ChatEvent + (*PlayerFoodLossEvent)(nil), // 9: df.plugin.PlayerFoodLossEvent + (*PlayerHealEvent)(nil), // 10: df.plugin.PlayerHealEvent + (*PlayerHurtEvent)(nil), // 11: df.plugin.PlayerHurtEvent + (*PlayerDeathEvent)(nil), // 12: df.plugin.PlayerDeathEvent + (*PlayerRespawnEvent)(nil), // 13: df.plugin.PlayerRespawnEvent + (*PlayerSkinChangeEvent)(nil), // 14: df.plugin.PlayerSkinChangeEvent + (*PlayerFireExtinguishEvent)(nil), // 15: df.plugin.PlayerFireExtinguishEvent + (*PlayerStartBreakEvent)(nil), // 16: df.plugin.PlayerStartBreakEvent + (*BlockBreakEvent)(nil), // 17: df.plugin.BlockBreakEvent + (*PlayerBlockPlaceEvent)(nil), // 18: df.plugin.PlayerBlockPlaceEvent + (*PlayerBlockPickEvent)(nil), // 19: df.plugin.PlayerBlockPickEvent + (*PlayerItemUseEvent)(nil), // 20: df.plugin.PlayerItemUseEvent + (*PlayerItemUseOnBlockEvent)(nil), // 21: df.plugin.PlayerItemUseOnBlockEvent + (*PlayerItemUseOnEntityEvent)(nil), // 22: df.plugin.PlayerItemUseOnEntityEvent + (*PlayerItemReleaseEvent)(nil), // 23: df.plugin.PlayerItemReleaseEvent + (*PlayerItemConsumeEvent)(nil), // 24: df.plugin.PlayerItemConsumeEvent + (*PlayerAttackEntityEvent)(nil), // 25: df.plugin.PlayerAttackEntityEvent + (*PlayerExperienceGainEvent)(nil), // 26: df.plugin.PlayerExperienceGainEvent + (*PlayerPunchAirEvent)(nil), // 27: df.plugin.PlayerPunchAirEvent + (*PlayerSignEditEvent)(nil), // 28: df.plugin.PlayerSignEditEvent + (*PlayerLecternPageTurnEvent)(nil), // 29: df.plugin.PlayerLecternPageTurnEvent + (*PlayerItemDamageEvent)(nil), // 30: df.plugin.PlayerItemDamageEvent + (*PlayerItemPickupEvent)(nil), // 31: df.plugin.PlayerItemPickupEvent + (*PlayerHeldSlotChangeEvent)(nil), // 32: df.plugin.PlayerHeldSlotChangeEvent + (*PlayerItemDropEvent)(nil), // 33: df.plugin.PlayerItemDropEvent + (*PlayerTransferEvent)(nil), // 34: df.plugin.PlayerTransferEvent + (*CommandEvent)(nil), // 35: df.plugin.CommandEvent + (*PlayerDiagnosticsEvent)(nil), // 36: df.plugin.PlayerDiagnosticsEvent + (*Vec3)(nil), // 37: df.plugin.Vec3 + (*Rotation)(nil), // 38: df.plugin.Rotation + (*WorldRef)(nil), // 39: df.plugin.WorldRef + (*HealingSource)(nil), // 40: df.plugin.HealingSource + (*DamageSource)(nil), // 41: df.plugin.DamageSource + (*BlockPos)(nil), // 42: df.plugin.BlockPos + (*BlockState)(nil), // 43: df.plugin.BlockState + (*ItemStack)(nil), // 44: df.plugin.ItemStack + (*EntityRef)(nil), // 45: df.plugin.EntityRef + (*Address)(nil), // 46: df.plugin.Address } var file_player_events_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 37, // 0: df.plugin.PlayerMoveEvent.position:type_name -> df.plugin.Vec3 + 38, // 1: df.plugin.PlayerMoveEvent.rotation:type_name -> df.plugin.Rotation + 37, // 2: df.plugin.PlayerJumpEvent.position:type_name -> df.plugin.Vec3 + 37, // 3: df.plugin.PlayerTeleportEvent.position:type_name -> df.plugin.Vec3 + 39, // 4: df.plugin.PlayerChangeWorldEvent.before:type_name -> df.plugin.WorldRef + 39, // 5: df.plugin.PlayerChangeWorldEvent.after:type_name -> df.plugin.WorldRef + 40, // 6: df.plugin.PlayerHealEvent.source:type_name -> df.plugin.HealingSource + 41, // 7: df.plugin.PlayerHurtEvent.source:type_name -> df.plugin.DamageSource + 41, // 8: df.plugin.PlayerDeathEvent.source:type_name -> df.plugin.DamageSource + 37, // 9: df.plugin.PlayerRespawnEvent.position:type_name -> df.plugin.Vec3 + 39, // 10: df.plugin.PlayerRespawnEvent.world:type_name -> df.plugin.WorldRef + 42, // 11: df.plugin.PlayerFireExtinguishEvent.position:type_name -> df.plugin.BlockPos + 42, // 12: df.plugin.PlayerStartBreakEvent.position:type_name -> df.plugin.BlockPos + 42, // 13: df.plugin.BlockBreakEvent.position:type_name -> df.plugin.BlockPos + 42, // 14: df.plugin.PlayerBlockPlaceEvent.position:type_name -> df.plugin.BlockPos + 43, // 15: df.plugin.PlayerBlockPlaceEvent.block:type_name -> df.plugin.BlockState + 42, // 16: df.plugin.PlayerBlockPickEvent.position:type_name -> df.plugin.BlockPos + 43, // 17: df.plugin.PlayerBlockPickEvent.block:type_name -> df.plugin.BlockState + 44, // 18: df.plugin.PlayerItemUseEvent.item:type_name -> df.plugin.ItemStack + 42, // 19: df.plugin.PlayerItemUseOnBlockEvent.position:type_name -> df.plugin.BlockPos + 37, // 20: df.plugin.PlayerItemUseOnBlockEvent.click_position:type_name -> df.plugin.Vec3 + 43, // 21: df.plugin.PlayerItemUseOnBlockEvent.block:type_name -> df.plugin.BlockState + 44, // 22: df.plugin.PlayerItemUseOnBlockEvent.item:type_name -> df.plugin.ItemStack + 45, // 23: df.plugin.PlayerItemUseOnEntityEvent.entity:type_name -> df.plugin.EntityRef + 44, // 24: df.plugin.PlayerItemUseOnEntityEvent.item:type_name -> df.plugin.ItemStack + 44, // 25: df.plugin.PlayerItemReleaseEvent.item:type_name -> df.plugin.ItemStack + 44, // 26: df.plugin.PlayerItemConsumeEvent.item:type_name -> df.plugin.ItemStack + 45, // 27: df.plugin.PlayerAttackEntityEvent.entity:type_name -> df.plugin.EntityRef + 44, // 28: df.plugin.PlayerAttackEntityEvent.item:type_name -> df.plugin.ItemStack + 42, // 29: df.plugin.PlayerSignEditEvent.position:type_name -> df.plugin.BlockPos + 42, // 30: df.plugin.PlayerLecternPageTurnEvent.position:type_name -> df.plugin.BlockPos + 44, // 31: df.plugin.PlayerItemDamageEvent.item:type_name -> df.plugin.ItemStack + 44, // 32: df.plugin.PlayerItemPickupEvent.item:type_name -> df.plugin.ItemStack + 44, // 33: df.plugin.PlayerItemDropEvent.item:type_name -> df.plugin.ItemStack + 46, // 34: df.plugin.PlayerTransferEvent.address:type_name -> df.plugin.Address + 35, // [35:35] is the sub-list for method output_type + 35, // [35:35] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_player_events_proto_init() } @@ -441,75 +3097,30 @@ func file_player_events_proto_init() { if File_player_events_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_player_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerJoinEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_player_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerQuitEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_player_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_player_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_player_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockBreakEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_common_proto_init() + file_player_events_proto_msgTypes[5].OneofWrappers = []any{} + file_player_events_proto_msgTypes[10].OneofWrappers = []any{} + file_player_events_proto_msgTypes[11].OneofWrappers = []any{} + file_player_events_proto_msgTypes[12].OneofWrappers = []any{} + file_player_events_proto_msgTypes[13].OneofWrappers = []any{} + file_player_events_proto_msgTypes[14].OneofWrappers = []any{} + file_player_events_proto_msgTypes[20].OneofWrappers = []any{} + file_player_events_proto_msgTypes[21].OneofWrappers = []any{} + file_player_events_proto_msgTypes[22].OneofWrappers = []any{} + file_player_events_proto_msgTypes[23].OneofWrappers = []any{} + file_player_events_proto_msgTypes[24].OneofWrappers = []any{} + file_player_events_proto_msgTypes[25].OneofWrappers = []any{} + file_player_events_proto_msgTypes[30].OneofWrappers = []any{} + file_player_events_proto_msgTypes[31].OneofWrappers = []any{} + file_player_events_proto_msgTypes[33].OneofWrappers = []any{} + file_player_events_proto_msgTypes[34].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_player_events_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_player_events_proto_rawDesc), len(file_player_events_proto_rawDesc)), NumEnums: 0, - NumMessages: 5, + NumMessages: 37, NumExtensions: 0, NumServices: 0, }, @@ -518,7 +3129,6 @@ func file_player_events_proto_init() { MessageInfos: file_player_events_proto_msgTypes, }.Build() File_player_events_proto = out.File - file_player_events_proto_rawDesc = nil file_player_events_proto_goTypes = nil file_player_events_proto_depIdxs = nil } diff --git a/proto/generated/plugin.pb.go b/proto/generated/plugin.pb.go index b7029ed..1b76a7c 100644 --- a/proto/generated/plugin.pb.go +++ b/proto/generated/plugin.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) +// protoc-gen-go v1.36.10 +// protoc v3.21.12 // source: plugin.proto package generated @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -214,26 +215,23 @@ func (EventType) EnumDescriptor() ([]byte, []int) { } type HostToPlugin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` - // Types that are assignable to Payload: + state protoimpl.MessageState `protogen:"open.v1"` + PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` + // Types that are valid to be assigned to Payload: // // *HostToPlugin_Hello // *HostToPlugin_Shutdown // *HostToPlugin_Event - Payload isHostToPlugin_Payload `protobuf_oneof:"payload"` + Payload isHostToPlugin_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *HostToPlugin) Reset() { *x = HostToPlugin{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostToPlugin) String() string { @@ -244,7 +242,7 @@ func (*HostToPlugin) ProtoMessage() {} func (x *HostToPlugin) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,30 +264,36 @@ func (x *HostToPlugin) GetPluginId() string { return "" } -func (m *HostToPlugin) GetPayload() isHostToPlugin_Payload { - if m != nil { - return m.Payload +func (x *HostToPlugin) GetPayload() isHostToPlugin_Payload { + if x != nil { + return x.Payload } return nil } func (x *HostToPlugin) GetHello() *HostHello { - if x, ok := x.GetPayload().(*HostToPlugin_Hello); ok { - return x.Hello + if x != nil { + if x, ok := x.Payload.(*HostToPlugin_Hello); ok { + return x.Hello + } } return nil } func (x *HostToPlugin) GetShutdown() *HostShutdown { - if x, ok := x.GetPayload().(*HostToPlugin_Shutdown); ok { - return x.Shutdown + if x != nil { + if x, ok := x.Payload.(*HostToPlugin_Shutdown); ok { + return x.Shutdown + } } return nil } func (x *HostToPlugin) GetEvent() *EventEnvelope { - if x, ok := x.GetPayload().(*HostToPlugin_Event); ok { - return x.Event + if x != nil { + if x, ok := x.Payload.(*HostToPlugin_Event); ok { + return x.Event + } } return nil } @@ -317,20 +321,17 @@ func (*HostToPlugin_Shutdown) isHostToPlugin_Payload() {} func (*HostToPlugin_Event) isHostToPlugin_Payload() {} type HostHello struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` unknownFields protoimpl.UnknownFields - - ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + sizeCache protoimpl.SizeCache } func (x *HostHello) Reset() { *x = HostHello{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostHello) String() string { @@ -341,7 +342,7 @@ func (*HostHello) ProtoMessage() {} func (x *HostHello) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,20 +365,17 @@ func (x *HostHello) GetApiVersion() string { } type HostShutdown struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` unknownFields protoimpl.UnknownFields - - Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` + sizeCache protoimpl.SizeCache } func (x *HostShutdown) Reset() { *x = HostShutdown{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostShutdown) String() string { @@ -388,7 +386,7 @@ func (*HostShutdown) ProtoMessage() {} func (x *HostShutdown) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,30 +409,70 @@ func (x *HostShutdown) GetReason() string { } type EventEnvelope struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` - Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=df.plugin.EventType" json:"type,omitempty"` - // Types that are assignable to Payload: + state protoimpl.MessageState `protogen:"open.v1"` + EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=df.plugin.EventType" json:"type,omitempty"` + // Types that are valid to be assigned to Payload: // // *EventEnvelope_PlayerJoin // *EventEnvelope_PlayerQuit + // *EventEnvelope_PlayerMove + // *EventEnvelope_PlayerJump + // *EventEnvelope_PlayerTeleport + // *EventEnvelope_PlayerChangeWorld + // *EventEnvelope_PlayerToggleSprint + // *EventEnvelope_PlayerToggleSneak // *EventEnvelope_Chat - // *EventEnvelope_Command + // *EventEnvelope_PlayerFoodLoss + // *EventEnvelope_PlayerHeal + // *EventEnvelope_PlayerHurt + // *EventEnvelope_PlayerDeath + // *EventEnvelope_PlayerRespawn + // *EventEnvelope_PlayerSkinChange + // *EventEnvelope_PlayerFireExtinguish + // *EventEnvelope_PlayerStartBreak // *EventEnvelope_BlockBreak + // *EventEnvelope_PlayerBlockPlace + // *EventEnvelope_PlayerBlockPick + // *EventEnvelope_PlayerItemUse + // *EventEnvelope_PlayerItemUseOnBlock + // *EventEnvelope_PlayerItemUseOnEntity + // *EventEnvelope_PlayerItemRelease + // *EventEnvelope_PlayerItemConsume + // *EventEnvelope_PlayerAttackEntity + // *EventEnvelope_PlayerExperienceGain + // *EventEnvelope_PlayerPunchAir + // *EventEnvelope_PlayerSignEdit + // *EventEnvelope_PlayerLecternPageTurn + // *EventEnvelope_PlayerItemDamage + // *EventEnvelope_PlayerItemPickup + // *EventEnvelope_PlayerHeldSlotChange + // *EventEnvelope_PlayerItemDrop + // *EventEnvelope_PlayerTransfer + // *EventEnvelope_Command + // *EventEnvelope_PlayerDiagnostics + // *EventEnvelope_WorldLiquidFlow + // *EventEnvelope_WorldLiquidDecay + // *EventEnvelope_WorldLiquidHarden + // *EventEnvelope_WorldSound + // *EventEnvelope_WorldFireSpread + // *EventEnvelope_WorldBlockBurn + // *EventEnvelope_WorldCropTrample + // *EventEnvelope_WorldLeavesDecay + // *EventEnvelope_WorldEntitySpawn + // *EventEnvelope_WorldEntityDespawn + // *EventEnvelope_WorldExplosion // *EventEnvelope_WorldClose - Payload isEventEnvelope_Payload `protobuf_oneof:"payload"` + Payload isEventEnvelope_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EventEnvelope) Reset() { *x = EventEnvelope{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventEnvelope) String() string { @@ -445,7 +483,7 @@ func (*EventEnvelope) ProtoMessage() {} func (x *EventEnvelope) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,51 +512,450 @@ func (x *EventEnvelope) GetType() EventType { return EventType_EVENT_TYPE_UNSPECIFIED } -func (m *EventEnvelope) GetPayload() isEventEnvelope_Payload { - if m != nil { - return m.Payload +func (x *EventEnvelope) GetPayload() isEventEnvelope_Payload { + if x != nil { + return x.Payload } return nil } func (x *EventEnvelope) GetPlayerJoin() *PlayerJoinEvent { - if x, ok := x.GetPayload().(*EventEnvelope_PlayerJoin); ok { - return x.PlayerJoin + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerJoin); ok { + return x.PlayerJoin + } } return nil } func (x *EventEnvelope) GetPlayerQuit() *PlayerQuitEvent { - if x, ok := x.GetPayload().(*EventEnvelope_PlayerQuit); ok { - return x.PlayerQuit + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerQuit); ok { + return x.PlayerQuit + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerMove() *PlayerMoveEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerMove); ok { + return x.PlayerMove + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerJump() *PlayerJumpEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerJump); ok { + return x.PlayerJump + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerTeleport() *PlayerTeleportEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerTeleport); ok { + return x.PlayerTeleport + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerChangeWorld() *PlayerChangeWorldEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerChangeWorld); ok { + return x.PlayerChangeWorld + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerToggleSprint() *PlayerToggleSprintEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerToggleSprint); ok { + return x.PlayerToggleSprint + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerToggleSneak() *PlayerToggleSneakEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerToggleSneak); ok { + return x.PlayerToggleSneak + } } return nil } func (x *EventEnvelope) GetChat() *ChatEvent { - if x, ok := x.GetPayload().(*EventEnvelope_Chat); ok { - return x.Chat + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_Chat); ok { + return x.Chat + } } return nil } -func (x *EventEnvelope) GetCommand() *CommandEvent { - if x, ok := x.GetPayload().(*EventEnvelope_Command); ok { - return x.Command +func (x *EventEnvelope) GetPlayerFoodLoss() *PlayerFoodLossEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerFoodLoss); ok { + return x.PlayerFoodLoss + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerHeal() *PlayerHealEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerHeal); ok { + return x.PlayerHeal + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerHurt() *PlayerHurtEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerHurt); ok { + return x.PlayerHurt + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerDeath() *PlayerDeathEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerDeath); ok { + return x.PlayerDeath + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerRespawn() *PlayerRespawnEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerRespawn); ok { + return x.PlayerRespawn + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerSkinChange() *PlayerSkinChangeEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerSkinChange); ok { + return x.PlayerSkinChange + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerFireExtinguish() *PlayerFireExtinguishEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerFireExtinguish); ok { + return x.PlayerFireExtinguish + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerStartBreak() *PlayerStartBreakEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerStartBreak); ok { + return x.PlayerStartBreak + } } return nil } func (x *EventEnvelope) GetBlockBreak() *BlockBreakEvent { - if x, ok := x.GetPayload().(*EventEnvelope_BlockBreak); ok { - return x.BlockBreak + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_BlockBreak); ok { + return x.BlockBreak + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerBlockPlace() *PlayerBlockPlaceEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerBlockPlace); ok { + return x.PlayerBlockPlace + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerBlockPick() *PlayerBlockPickEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerBlockPick); ok { + return x.PlayerBlockPick + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemUse() *PlayerItemUseEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemUse); ok { + return x.PlayerItemUse + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemUseOnBlock() *PlayerItemUseOnBlockEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemUseOnBlock); ok { + return x.PlayerItemUseOnBlock + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemUseOnEntity() *PlayerItemUseOnEntityEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemUseOnEntity); ok { + return x.PlayerItemUseOnEntity + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemRelease() *PlayerItemReleaseEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemRelease); ok { + return x.PlayerItemRelease + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemConsume() *PlayerItemConsumeEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemConsume); ok { + return x.PlayerItemConsume + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerAttackEntity() *PlayerAttackEntityEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerAttackEntity); ok { + return x.PlayerAttackEntity + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerExperienceGain() *PlayerExperienceGainEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerExperienceGain); ok { + return x.PlayerExperienceGain + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerPunchAir() *PlayerPunchAirEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerPunchAir); ok { + return x.PlayerPunchAir + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerSignEdit() *PlayerSignEditEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerSignEdit); ok { + return x.PlayerSignEdit + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerLecternPageTurn() *PlayerLecternPageTurnEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerLecternPageTurn); ok { + return x.PlayerLecternPageTurn + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemDamage() *PlayerItemDamageEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemDamage); ok { + return x.PlayerItemDamage + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemPickup() *PlayerItemPickupEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemPickup); ok { + return x.PlayerItemPickup + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerHeldSlotChange() *PlayerHeldSlotChangeEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerHeldSlotChange); ok { + return x.PlayerHeldSlotChange + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerItemDrop() *PlayerItemDropEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerItemDrop); ok { + return x.PlayerItemDrop + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerTransfer() *PlayerTransferEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerTransfer); ok { + return x.PlayerTransfer + } + } + return nil +} + +func (x *EventEnvelope) GetCommand() *CommandEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_Command); ok { + return x.Command + } + } + return nil +} + +func (x *EventEnvelope) GetPlayerDiagnostics() *PlayerDiagnosticsEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_PlayerDiagnostics); ok { + return x.PlayerDiagnostics + } + } + return nil +} + +func (x *EventEnvelope) GetWorldLiquidFlow() *WorldLiquidFlowEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldLiquidFlow); ok { + return x.WorldLiquidFlow + } + } + return nil +} + +func (x *EventEnvelope) GetWorldLiquidDecay() *WorldLiquidDecayEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldLiquidDecay); ok { + return x.WorldLiquidDecay + } + } + return nil +} + +func (x *EventEnvelope) GetWorldLiquidHarden() *WorldLiquidHardenEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldLiquidHarden); ok { + return x.WorldLiquidHarden + } + } + return nil +} + +func (x *EventEnvelope) GetWorldSound() *WorldSoundEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldSound); ok { + return x.WorldSound + } + } + return nil +} + +func (x *EventEnvelope) GetWorldFireSpread() *WorldFireSpreadEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldFireSpread); ok { + return x.WorldFireSpread + } + } + return nil +} + +func (x *EventEnvelope) GetWorldBlockBurn() *WorldBlockBurnEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldBlockBurn); ok { + return x.WorldBlockBurn + } + } + return nil +} + +func (x *EventEnvelope) GetWorldCropTrample() *WorldCropTrampleEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldCropTrample); ok { + return x.WorldCropTrample + } + } + return nil +} + +func (x *EventEnvelope) GetWorldLeavesDecay() *WorldLeavesDecayEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldLeavesDecay); ok { + return x.WorldLeavesDecay + } + } + return nil +} + +func (x *EventEnvelope) GetWorldEntitySpawn() *WorldEntitySpawnEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldEntitySpawn); ok { + return x.WorldEntitySpawn + } + } + return nil +} + +func (x *EventEnvelope) GetWorldEntityDespawn() *WorldEntityDespawnEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldEntityDespawn); ok { + return x.WorldEntityDespawn + } + } + return nil +} + +func (x *EventEnvelope) GetWorldExplosion() *WorldExplosionEvent { + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldExplosion); ok { + return x.WorldExplosion + } } return nil } func (x *EventEnvelope) GetWorldClose() *WorldCloseEvent { - if x, ok := x.GetPayload().(*EventEnvelope_WorldClose); ok { - return x.WorldClose + if x != nil { + if x, ok := x.Payload.(*EventEnvelope_WorldClose); ok { + return x.WorldClose + } } return nil } @@ -535,57 +972,312 @@ type EventEnvelope_PlayerQuit struct { PlayerQuit *PlayerQuitEvent `protobuf:"bytes,11,opt,name=player_quit,json=playerQuit,proto3,oneof"` } +type EventEnvelope_PlayerMove struct { + PlayerMove *PlayerMoveEvent `protobuf:"bytes,12,opt,name=player_move,json=playerMove,proto3,oneof"` +} + +type EventEnvelope_PlayerJump struct { + PlayerJump *PlayerJumpEvent `protobuf:"bytes,13,opt,name=player_jump,json=playerJump,proto3,oneof"` +} + +type EventEnvelope_PlayerTeleport struct { + PlayerTeleport *PlayerTeleportEvent `protobuf:"bytes,14,opt,name=player_teleport,json=playerTeleport,proto3,oneof"` +} + +type EventEnvelope_PlayerChangeWorld struct { + PlayerChangeWorld *PlayerChangeWorldEvent `protobuf:"bytes,15,opt,name=player_change_world,json=playerChangeWorld,proto3,oneof"` +} + +type EventEnvelope_PlayerToggleSprint struct { + PlayerToggleSprint *PlayerToggleSprintEvent `protobuf:"bytes,16,opt,name=player_toggle_sprint,json=playerToggleSprint,proto3,oneof"` +} + +type EventEnvelope_PlayerToggleSneak struct { + PlayerToggleSneak *PlayerToggleSneakEvent `protobuf:"bytes,17,opt,name=player_toggle_sneak,json=playerToggleSneak,proto3,oneof"` +} + type EventEnvelope_Chat struct { - Chat *ChatEvent `protobuf:"bytes,12,opt,name=chat,proto3,oneof"` + Chat *ChatEvent `protobuf:"bytes,18,opt,name=chat,proto3,oneof"` } -type EventEnvelope_Command struct { - Command *CommandEvent `protobuf:"bytes,13,opt,name=command,proto3,oneof"` +type EventEnvelope_PlayerFoodLoss struct { + PlayerFoodLoss *PlayerFoodLossEvent `protobuf:"bytes,19,opt,name=player_food_loss,json=playerFoodLoss,proto3,oneof"` +} + +type EventEnvelope_PlayerHeal struct { + PlayerHeal *PlayerHealEvent `protobuf:"bytes,20,opt,name=player_heal,json=playerHeal,proto3,oneof"` +} + +type EventEnvelope_PlayerHurt struct { + PlayerHurt *PlayerHurtEvent `protobuf:"bytes,21,opt,name=player_hurt,json=playerHurt,proto3,oneof"` +} + +type EventEnvelope_PlayerDeath struct { + PlayerDeath *PlayerDeathEvent `protobuf:"bytes,22,opt,name=player_death,json=playerDeath,proto3,oneof"` +} + +type EventEnvelope_PlayerRespawn struct { + PlayerRespawn *PlayerRespawnEvent `protobuf:"bytes,23,opt,name=player_respawn,json=playerRespawn,proto3,oneof"` +} + +type EventEnvelope_PlayerSkinChange struct { + PlayerSkinChange *PlayerSkinChangeEvent `protobuf:"bytes,24,opt,name=player_skin_change,json=playerSkinChange,proto3,oneof"` +} + +type EventEnvelope_PlayerFireExtinguish struct { + PlayerFireExtinguish *PlayerFireExtinguishEvent `protobuf:"bytes,25,opt,name=player_fire_extinguish,json=playerFireExtinguish,proto3,oneof"` +} + +type EventEnvelope_PlayerStartBreak struct { + PlayerStartBreak *PlayerStartBreakEvent `protobuf:"bytes,26,opt,name=player_start_break,json=playerStartBreak,proto3,oneof"` } type EventEnvelope_BlockBreak struct { - BlockBreak *BlockBreakEvent `protobuf:"bytes,14,opt,name=block_break,json=blockBreak,proto3,oneof"` + BlockBreak *BlockBreakEvent `protobuf:"bytes,27,opt,name=block_break,json=blockBreak,proto3,oneof"` +} + +type EventEnvelope_PlayerBlockPlace struct { + PlayerBlockPlace *PlayerBlockPlaceEvent `protobuf:"bytes,28,opt,name=player_block_place,json=playerBlockPlace,proto3,oneof"` +} + +type EventEnvelope_PlayerBlockPick struct { + PlayerBlockPick *PlayerBlockPickEvent `protobuf:"bytes,29,opt,name=player_block_pick,json=playerBlockPick,proto3,oneof"` +} + +type EventEnvelope_PlayerItemUse struct { + PlayerItemUse *PlayerItemUseEvent `protobuf:"bytes,30,opt,name=player_item_use,json=playerItemUse,proto3,oneof"` +} + +type EventEnvelope_PlayerItemUseOnBlock struct { + PlayerItemUseOnBlock *PlayerItemUseOnBlockEvent `protobuf:"bytes,31,opt,name=player_item_use_on_block,json=playerItemUseOnBlock,proto3,oneof"` +} + +type EventEnvelope_PlayerItemUseOnEntity struct { + PlayerItemUseOnEntity *PlayerItemUseOnEntityEvent `protobuf:"bytes,32,opt,name=player_item_use_on_entity,json=playerItemUseOnEntity,proto3,oneof"` +} + +type EventEnvelope_PlayerItemRelease struct { + PlayerItemRelease *PlayerItemReleaseEvent `protobuf:"bytes,33,opt,name=player_item_release,json=playerItemRelease,proto3,oneof"` +} + +type EventEnvelope_PlayerItemConsume struct { + PlayerItemConsume *PlayerItemConsumeEvent `protobuf:"bytes,34,opt,name=player_item_consume,json=playerItemConsume,proto3,oneof"` +} + +type EventEnvelope_PlayerAttackEntity struct { + PlayerAttackEntity *PlayerAttackEntityEvent `protobuf:"bytes,35,opt,name=player_attack_entity,json=playerAttackEntity,proto3,oneof"` +} + +type EventEnvelope_PlayerExperienceGain struct { + PlayerExperienceGain *PlayerExperienceGainEvent `protobuf:"bytes,36,opt,name=player_experience_gain,json=playerExperienceGain,proto3,oneof"` +} + +type EventEnvelope_PlayerPunchAir struct { + PlayerPunchAir *PlayerPunchAirEvent `protobuf:"bytes,37,opt,name=player_punch_air,json=playerPunchAir,proto3,oneof"` +} + +type EventEnvelope_PlayerSignEdit struct { + PlayerSignEdit *PlayerSignEditEvent `protobuf:"bytes,38,opt,name=player_sign_edit,json=playerSignEdit,proto3,oneof"` +} + +type EventEnvelope_PlayerLecternPageTurn struct { + PlayerLecternPageTurn *PlayerLecternPageTurnEvent `protobuf:"bytes,39,opt,name=player_lectern_page_turn,json=playerLecternPageTurn,proto3,oneof"` +} + +type EventEnvelope_PlayerItemDamage struct { + PlayerItemDamage *PlayerItemDamageEvent `protobuf:"bytes,40,opt,name=player_item_damage,json=playerItemDamage,proto3,oneof"` +} + +type EventEnvelope_PlayerItemPickup struct { + PlayerItemPickup *PlayerItemPickupEvent `protobuf:"bytes,41,opt,name=player_item_pickup,json=playerItemPickup,proto3,oneof"` +} + +type EventEnvelope_PlayerHeldSlotChange struct { + PlayerHeldSlotChange *PlayerHeldSlotChangeEvent `protobuf:"bytes,42,opt,name=player_held_slot_change,json=playerHeldSlotChange,proto3,oneof"` +} + +type EventEnvelope_PlayerItemDrop struct { + PlayerItemDrop *PlayerItemDropEvent `protobuf:"bytes,43,opt,name=player_item_drop,json=playerItemDrop,proto3,oneof"` +} + +type EventEnvelope_PlayerTransfer struct { + PlayerTransfer *PlayerTransferEvent `protobuf:"bytes,44,opt,name=player_transfer,json=playerTransfer,proto3,oneof"` +} + +type EventEnvelope_Command struct { + Command *CommandEvent `protobuf:"bytes,45,opt,name=command,proto3,oneof"` +} + +type EventEnvelope_PlayerDiagnostics struct { + PlayerDiagnostics *PlayerDiagnosticsEvent `protobuf:"bytes,46,opt,name=player_diagnostics,json=playerDiagnostics,proto3,oneof"` +} + +type EventEnvelope_WorldLiquidFlow struct { + WorldLiquidFlow *WorldLiquidFlowEvent `protobuf:"bytes,70,opt,name=world_liquid_flow,json=worldLiquidFlow,proto3,oneof"` +} + +type EventEnvelope_WorldLiquidDecay struct { + WorldLiquidDecay *WorldLiquidDecayEvent `protobuf:"bytes,71,opt,name=world_liquid_decay,json=worldLiquidDecay,proto3,oneof"` +} + +type EventEnvelope_WorldLiquidHarden struct { + WorldLiquidHarden *WorldLiquidHardenEvent `protobuf:"bytes,72,opt,name=world_liquid_harden,json=worldLiquidHarden,proto3,oneof"` +} + +type EventEnvelope_WorldSound struct { + WorldSound *WorldSoundEvent `protobuf:"bytes,73,opt,name=world_sound,json=worldSound,proto3,oneof"` +} + +type EventEnvelope_WorldFireSpread struct { + WorldFireSpread *WorldFireSpreadEvent `protobuf:"bytes,74,opt,name=world_fire_spread,json=worldFireSpread,proto3,oneof"` +} + +type EventEnvelope_WorldBlockBurn struct { + WorldBlockBurn *WorldBlockBurnEvent `protobuf:"bytes,75,opt,name=world_block_burn,json=worldBlockBurn,proto3,oneof"` +} + +type EventEnvelope_WorldCropTrample struct { + WorldCropTrample *WorldCropTrampleEvent `protobuf:"bytes,76,opt,name=world_crop_trample,json=worldCropTrample,proto3,oneof"` +} + +type EventEnvelope_WorldLeavesDecay struct { + WorldLeavesDecay *WorldLeavesDecayEvent `protobuf:"bytes,77,opt,name=world_leaves_decay,json=worldLeavesDecay,proto3,oneof"` +} + +type EventEnvelope_WorldEntitySpawn struct { + WorldEntitySpawn *WorldEntitySpawnEvent `protobuf:"bytes,78,opt,name=world_entity_spawn,json=worldEntitySpawn,proto3,oneof"` +} + +type EventEnvelope_WorldEntityDespawn struct { + WorldEntityDespawn *WorldEntityDespawnEvent `protobuf:"bytes,79,opt,name=world_entity_despawn,json=worldEntityDespawn,proto3,oneof"` +} + +type EventEnvelope_WorldExplosion struct { + WorldExplosion *WorldExplosionEvent `protobuf:"bytes,80,opt,name=world_explosion,json=worldExplosion,proto3,oneof"` } type EventEnvelope_WorldClose struct { - WorldClose *WorldCloseEvent `protobuf:"bytes,15,opt,name=world_close,json=worldClose,proto3,oneof"` + WorldClose *WorldCloseEvent `protobuf:"bytes,81,opt,name=world_close,json=worldClose,proto3,oneof"` } func (*EventEnvelope_PlayerJoin) isEventEnvelope_Payload() {} func (*EventEnvelope_PlayerQuit) isEventEnvelope_Payload() {} +func (*EventEnvelope_PlayerMove) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerJump) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerTeleport) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerChangeWorld) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerToggleSprint) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerToggleSneak) isEventEnvelope_Payload() {} + func (*EventEnvelope_Chat) isEventEnvelope_Payload() {} -func (*EventEnvelope_Command) isEventEnvelope_Payload() {} +func (*EventEnvelope_PlayerFoodLoss) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerHeal) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerHurt) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerDeath) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerRespawn) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerSkinChange) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerFireExtinguish) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerStartBreak) isEventEnvelope_Payload() {} func (*EventEnvelope_BlockBreak) isEventEnvelope_Payload() {} +func (*EventEnvelope_PlayerBlockPlace) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerBlockPick) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemUse) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemUseOnBlock) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemUseOnEntity) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemRelease) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemConsume) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerAttackEntity) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerExperienceGain) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerPunchAir) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerSignEdit) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerLecternPageTurn) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemDamage) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemPickup) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerHeldSlotChange) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerItemDrop) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerTransfer) isEventEnvelope_Payload() {} + +func (*EventEnvelope_Command) isEventEnvelope_Payload() {} + +func (*EventEnvelope_PlayerDiagnostics) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldLiquidFlow) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldLiquidDecay) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldLiquidHarden) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldSound) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldFireSpread) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldBlockBurn) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldCropTrample) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldLeavesDecay) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldEntitySpawn) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldEntityDespawn) isEventEnvelope_Payload() {} + +func (*EventEnvelope_WorldExplosion) isEventEnvelope_Payload() {} + func (*EventEnvelope_WorldClose) isEventEnvelope_Payload() {} type PluginToHost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` - // Types that are assignable to Payload: + state protoimpl.MessageState `protogen:"open.v1"` + PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"` + // Types that are valid to be assigned to Payload: // // *PluginToHost_Hello // *PluginToHost_Subscribe // *PluginToHost_Actions // *PluginToHost_Log // *PluginToHost_EventResult - Payload isPluginToHost_Payload `protobuf_oneof:"payload"` + Payload isPluginToHost_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PluginToHost) Reset() { *x = PluginToHost{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PluginToHost) String() string { @@ -596,7 +1288,7 @@ func (*PluginToHost) ProtoMessage() {} func (x *PluginToHost) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,44 +1310,54 @@ func (x *PluginToHost) GetPluginId() string { return "" } -func (m *PluginToHost) GetPayload() isPluginToHost_Payload { - if m != nil { - return m.Payload +func (x *PluginToHost) GetPayload() isPluginToHost_Payload { + if x != nil { + return x.Payload } return nil } func (x *PluginToHost) GetHello() *PluginHello { - if x, ok := x.GetPayload().(*PluginToHost_Hello); ok { - return x.Hello + if x != nil { + if x, ok := x.Payload.(*PluginToHost_Hello); ok { + return x.Hello + } } return nil } func (x *PluginToHost) GetSubscribe() *EventSubscribe { - if x, ok := x.GetPayload().(*PluginToHost_Subscribe); ok { - return x.Subscribe + if x != nil { + if x, ok := x.Payload.(*PluginToHost_Subscribe); ok { + return x.Subscribe + } } return nil } func (x *PluginToHost) GetActions() *ActionBatch { - if x, ok := x.GetPayload().(*PluginToHost_Actions); ok { - return x.Actions + if x != nil { + if x, ok := x.Payload.(*PluginToHost_Actions); ok { + return x.Actions + } } return nil } func (x *PluginToHost) GetLog() *LogMessage { - if x, ok := x.GetPayload().(*PluginToHost_Log); ok { - return x.Log + if x != nil { + if x, ok := x.Payload.(*PluginToHost_Log); ok { + return x.Log + } } return nil } func (x *PluginToHost) GetEventResult() *EventResult { - if x, ok := x.GetPayload().(*PluginToHost_EventResult); ok { - return x.EventResult + if x != nil { + if x, ok := x.Payload.(*PluginToHost_EventResult); ok { + return x.EventResult + } } return nil } @@ -695,23 +1397,20 @@ func (*PluginToHost_Log) isPluginToHost_Payload() {} func (*PluginToHost_EventResult) isPluginToHost_Payload() {} type PluginHello struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + ApiVersion string `protobuf:"bytes,3,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + Commands []*CommandSpec `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - ApiVersion string `protobuf:"bytes,3,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` - Commands []*CommandSpec `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PluginHello) Reset() { *x = PluginHello{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PluginHello) String() string { @@ -722,7 +1421,7 @@ func (*PluginHello) ProtoMessage() {} func (x *PluginHello) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,22 +1465,19 @@ func (x *PluginHello) GetCommands() []*CommandSpec { } type CommandSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CommandSpec) Reset() { *x = CommandSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommandSpec) String() string { @@ -792,7 +1488,7 @@ func (*CommandSpec) ProtoMessage() {} func (x *CommandSpec) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,21 +1525,18 @@ func (x *CommandSpec) GetAliases() []string { } type LogMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields - - Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LogMessage) Reset() { *x = LogMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMessage) String() string { @@ -854,7 +1547,7 @@ func (*LogMessage) ProtoMessage() {} func (x *LogMessage) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,20 +1577,17 @@ func (x *LogMessage) GetMessage() string { } type EventSubscribe struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Events []EventType `protobuf:"varint,1,rep,packed,name=events,proto3,enum=df.plugin.EventType" json:"events,omitempty"` unknownFields protoimpl.UnknownFields - - Events []EventType `protobuf:"varint,1,rep,packed,name=events,proto3,enum=df.plugin.EventType" json:"events,omitempty"` + sizeCache protoimpl.SizeCache } func (x *EventSubscribe) Reset() { *x = EventSubscribe{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_plugin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventSubscribe) String() string { @@ -908,7 +1598,7 @@ func (*EventSubscribe) ProtoMessage() {} func (x *EventSubscribe) ProtoReflect() protoreflect.Message { mi := &file_plugin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,226 +1622,241 @@ func (x *EventSubscribe) GetEvents() []EventType { var File_plugin_proto protoreflect.FileDescriptor -var file_plugin_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, - 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x1a, 0x13, 0x70, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, - 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x0f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xcd, 0x01, 0x0a, 0x0c, 0x48, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x2c, - 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, - 0x6c, 0x6c, 0x6f, 0x48, 0x00, 0x52, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x35, 0x0a, 0x08, - 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, - 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x73, 0x68, 0x75, 0x74, 0x64, - 0x6f, 0x77, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x22, 0x2c, 0x0a, 0x09, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x26, - 0x0a, 0x0c, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xbc, 0x03, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, - 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x0b, - 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x51, 0x75, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x51, 0x75, 0x69, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x63, - 0x68, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x66, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, - 0x00, 0x52, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x3d, 0x0a, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x3d, 0x0a, 0x0b, 0x77, - 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x57, 0x6f, 0x72, - 0x6c, 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, - 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xbd, 0x02, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x54, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x48, 0x00, 0x52, 0x05, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x12, 0x39, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x48, 0x00, 0x52, 0x09, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x32, - 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x3b, 0x0a, - 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x28, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x70, 0x65, 0x63, 0x52, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x5d, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x8a, 0x09, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x12, 0x0a, 0x0e, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, - 0x4c, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x4a, 0x4f, - 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x51, - 0x55, 0x49, 0x54, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, - 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, - 0x5f, 0x4a, 0x55, 0x4d, 0x50, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x4c, 0x41, 0x59, 0x45, - 0x52, 0x5f, 0x54, 0x45, 0x4c, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x0e, 0x12, 0x17, 0x0a, 0x13, - 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x57, 0x4f, - 0x52, 0x4c, 0x44, 0x10, 0x0f, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, - 0x54, 0x4f, 0x47, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x50, 0x52, 0x49, 0x4e, 0x54, 0x10, 0x10, 0x12, - 0x17, 0x0a, 0x13, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x54, 0x4f, 0x47, 0x47, 0x4c, 0x45, - 0x5f, 0x53, 0x4e, 0x45, 0x41, 0x4b, 0x10, 0x11, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x48, 0x41, 0x54, - 0x10, 0x12, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x46, 0x4f, 0x4f, - 0x44, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x13, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, 0x59, - 0x45, 0x52, 0x5f, 0x48, 0x45, 0x41, 0x4c, 0x10, 0x14, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x4c, 0x41, - 0x59, 0x45, 0x52, 0x5f, 0x48, 0x55, 0x52, 0x54, 0x10, 0x15, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x4c, - 0x41, 0x59, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x41, 0x54, 0x48, 0x10, 0x16, 0x12, 0x12, 0x0a, 0x0e, - 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x41, 0x57, 0x4e, 0x10, 0x17, - 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x53, 0x4b, 0x49, 0x4e, 0x5f, - 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x18, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4c, 0x41, 0x59, - 0x45, 0x52, 0x5f, 0x46, 0x49, 0x52, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x49, 0x4e, 0x47, 0x55, 0x49, - 0x53, 0x48, 0x10, 0x19, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x52, 0x54, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x10, 0x1a, 0x12, 0x16, 0x0a, 0x12, - 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x52, 0x45, - 0x41, 0x4b, 0x10, 0x1b, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x42, - 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x1c, 0x12, 0x15, 0x0a, 0x11, - 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x50, 0x49, 0x43, - 0x4b, 0x10, 0x1d, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x49, 0x54, - 0x45, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x1e, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4c, 0x41, 0x59, - 0x45, 0x52, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x42, - 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x1f, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, - 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x54, - 0x49, 0x54, 0x59, 0x10, 0x20, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, - 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x10, 0x21, 0x12, 0x17, - 0x0a, 0x13, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x43, 0x4f, - 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x22, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x41, 0x59, 0x45, - 0x52, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, - 0x23, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x45, - 0x52, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x47, 0x41, 0x49, 0x4e, 0x10, 0x24, 0x12, 0x14, 0x0a, - 0x10, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x50, 0x55, 0x4e, 0x43, 0x48, 0x5f, 0x41, 0x49, - 0x52, 0x10, 0x25, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x53, 0x49, - 0x47, 0x4e, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x10, 0x26, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4c, 0x41, - 0x59, 0x45, 0x52, 0x5f, 0x4c, 0x45, 0x43, 0x54, 0x45, 0x52, 0x4e, 0x5f, 0x50, 0x41, 0x47, 0x45, - 0x5f, 0x54, 0x55, 0x52, 0x4e, 0x10, 0x27, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4c, 0x41, 0x59, 0x45, - 0x52, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x28, 0x12, - 0x16, 0x0a, 0x12, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x50, - 0x49, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x29, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4c, 0x41, 0x59, 0x45, - 0x52, 0x5f, 0x48, 0x45, 0x4c, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x4e, - 0x47, 0x45, 0x10, 0x2a, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x49, - 0x54, 0x45, 0x4d, 0x5f, 0x44, 0x52, 0x4f, 0x50, 0x10, 0x2b, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x4c, - 0x41, 0x59, 0x45, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x2c, 0x12, - 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x10, 0x2d, 0x12, 0x16, 0x0a, 0x12, - 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x41, 0x47, 0x4e, 0x4f, 0x53, 0x54, 0x49, - 0x43, 0x53, 0x10, 0x2e, 0x12, 0x15, 0x0a, 0x11, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x4c, 0x49, - 0x51, 0x55, 0x49, 0x44, 0x5f, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x46, 0x12, 0x16, 0x0a, 0x12, 0x57, - 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x5f, 0x44, 0x45, 0x43, 0x41, - 0x59, 0x10, 0x47, 0x12, 0x17, 0x0a, 0x13, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x4c, 0x49, 0x51, - 0x55, 0x49, 0x44, 0x5f, 0x48, 0x41, 0x52, 0x44, 0x45, 0x4e, 0x10, 0x48, 0x12, 0x0f, 0x0a, 0x0b, - 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x53, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x49, 0x12, 0x15, 0x0a, - 0x11, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x46, 0x49, 0x52, 0x45, 0x5f, 0x53, 0x50, 0x52, 0x45, - 0x41, 0x44, 0x10, 0x4a, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x42, 0x4c, - 0x4f, 0x43, 0x4b, 0x5f, 0x42, 0x55, 0x52, 0x4e, 0x10, 0x4b, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x4f, - 0x52, 0x4c, 0x44, 0x5f, 0x43, 0x52, 0x4f, 0x50, 0x5f, 0x54, 0x52, 0x41, 0x4d, 0x50, 0x4c, 0x45, - 0x10, 0x4c, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x4c, 0x45, 0x41, 0x56, - 0x45, 0x53, 0x5f, 0x44, 0x45, 0x43, 0x41, 0x59, 0x10, 0x4d, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x4f, - 0x52, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x50, 0x41, 0x57, 0x4e, - 0x10, 0x4e, 0x12, 0x18, 0x0a, 0x14, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x54, 0x49, - 0x54, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x50, 0x41, 0x57, 0x4e, 0x10, 0x4f, 0x12, 0x13, 0x0a, 0x0f, - 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x45, 0x58, 0x50, 0x4c, 0x4f, 0x53, 0x49, 0x4f, 0x4e, 0x10, - 0x50, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x4f, 0x52, 0x4c, 0x44, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, - 0x10, 0x51, 0x32, 0x4d, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x0b, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x64, 0x66, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x6f, - 0x48, 0x6f, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x28, 0x01, 0x30, - 0x01, 0x42, 0x8a, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x42, 0x0b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, - 0x65, 0x63, 0x6d, 0x63, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0xa2, 0x02, 0x03, 0x44, 0x50, - 0x58, 0xaa, 0x02, 0x09, 0x44, 0x66, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xca, 0x02, 0x09, - 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x15, 0x44, 0x66, 0x5c, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0a, 0x44, 0x66, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_plugin_proto_rawDesc = "" + + "\n" + + "\fplugin.proto\x12\tdf.plugin\x1a\x13player_events.proto\x1a\x12world_events.proto\x1a\ractions.proto\x1a\x0fmutations.proto\x1a\fcommon.proto\"\xcd\x01\n" + + "\fHostToPlugin\x12\x1b\n" + + "\tplugin_id\x18\x01 \x01(\tR\bpluginId\x12,\n" + + "\x05hello\x18\n" + + " \x01(\v2\x14.df.plugin.HostHelloH\x00R\x05hello\x125\n" + + "\bshutdown\x18\v \x01(\v2\x17.df.plugin.HostShutdownH\x00R\bshutdown\x120\n" + + "\x05event\x18\x14 \x01(\v2\x18.df.plugin.EventEnvelopeH\x00R\x05eventB\t\n" + + "\apayload\",\n" + + "\tHostHello\x12\x1f\n" + + "\vapi_version\x18\x01 \x01(\tR\n" + + "apiVersion\"&\n" + + "\fHostShutdown\x12\x16\n" + + "\x06reason\x18\x01 \x01(\tR\x06reason\"\xbb\x1e\n" + + "\rEventEnvelope\x12\x19\n" + + "\bevent_id\x18\x01 \x01(\tR\aeventId\x12(\n" + + "\x04type\x18\x02 \x01(\x0e2\x14.df.plugin.EventTypeR\x04type\x12=\n" + + "\vplayer_join\x18\n" + + " \x01(\v2\x1a.df.plugin.PlayerJoinEventH\x00R\n" + + "playerJoin\x12=\n" + + "\vplayer_quit\x18\v \x01(\v2\x1a.df.plugin.PlayerQuitEventH\x00R\n" + + "playerQuit\x12=\n" + + "\vplayer_move\x18\f \x01(\v2\x1a.df.plugin.PlayerMoveEventH\x00R\n" + + "playerMove\x12=\n" + + "\vplayer_jump\x18\r \x01(\v2\x1a.df.plugin.PlayerJumpEventH\x00R\n" + + "playerJump\x12I\n" + + "\x0fplayer_teleport\x18\x0e \x01(\v2\x1e.df.plugin.PlayerTeleportEventH\x00R\x0eplayerTeleport\x12S\n" + + "\x13player_change_world\x18\x0f \x01(\v2!.df.plugin.PlayerChangeWorldEventH\x00R\x11playerChangeWorld\x12V\n" + + "\x14player_toggle_sprint\x18\x10 \x01(\v2\".df.plugin.PlayerToggleSprintEventH\x00R\x12playerToggleSprint\x12S\n" + + "\x13player_toggle_sneak\x18\x11 \x01(\v2!.df.plugin.PlayerToggleSneakEventH\x00R\x11playerToggleSneak\x12*\n" + + "\x04chat\x18\x12 \x01(\v2\x14.df.plugin.ChatEventH\x00R\x04chat\x12J\n" + + "\x10player_food_loss\x18\x13 \x01(\v2\x1e.df.plugin.PlayerFoodLossEventH\x00R\x0eplayerFoodLoss\x12=\n" + + "\vplayer_heal\x18\x14 \x01(\v2\x1a.df.plugin.PlayerHealEventH\x00R\n" + + "playerHeal\x12=\n" + + "\vplayer_hurt\x18\x15 \x01(\v2\x1a.df.plugin.PlayerHurtEventH\x00R\n" + + "playerHurt\x12@\n" + + "\fplayer_death\x18\x16 \x01(\v2\x1b.df.plugin.PlayerDeathEventH\x00R\vplayerDeath\x12F\n" + + "\x0eplayer_respawn\x18\x17 \x01(\v2\x1d.df.plugin.PlayerRespawnEventH\x00R\rplayerRespawn\x12P\n" + + "\x12player_skin_change\x18\x18 \x01(\v2 .df.plugin.PlayerSkinChangeEventH\x00R\x10playerSkinChange\x12\\\n" + + "\x16player_fire_extinguish\x18\x19 \x01(\v2$.df.plugin.PlayerFireExtinguishEventH\x00R\x14playerFireExtinguish\x12P\n" + + "\x12player_start_break\x18\x1a \x01(\v2 .df.plugin.PlayerStartBreakEventH\x00R\x10playerStartBreak\x12=\n" + + "\vblock_break\x18\x1b \x01(\v2\x1a.df.plugin.BlockBreakEventH\x00R\n" + + "blockBreak\x12P\n" + + "\x12player_block_place\x18\x1c \x01(\v2 .df.plugin.PlayerBlockPlaceEventH\x00R\x10playerBlockPlace\x12M\n" + + "\x11player_block_pick\x18\x1d \x01(\v2\x1f.df.plugin.PlayerBlockPickEventH\x00R\x0fplayerBlockPick\x12G\n" + + "\x0fplayer_item_use\x18\x1e \x01(\v2\x1d.df.plugin.PlayerItemUseEventH\x00R\rplayerItemUse\x12^\n" + + "\x18player_item_use_on_block\x18\x1f \x01(\v2$.df.plugin.PlayerItemUseOnBlockEventH\x00R\x14playerItemUseOnBlock\x12a\n" + + "\x19player_item_use_on_entity\x18 \x01(\v2%.df.plugin.PlayerItemUseOnEntityEventH\x00R\x15playerItemUseOnEntity\x12S\n" + + "\x13player_item_release\x18! \x01(\v2!.df.plugin.PlayerItemReleaseEventH\x00R\x11playerItemRelease\x12S\n" + + "\x13player_item_consume\x18\" \x01(\v2!.df.plugin.PlayerItemConsumeEventH\x00R\x11playerItemConsume\x12V\n" + + "\x14player_attack_entity\x18# \x01(\v2\".df.plugin.PlayerAttackEntityEventH\x00R\x12playerAttackEntity\x12\\\n" + + "\x16player_experience_gain\x18$ \x01(\v2$.df.plugin.PlayerExperienceGainEventH\x00R\x14playerExperienceGain\x12J\n" + + "\x10player_punch_air\x18% \x01(\v2\x1e.df.plugin.PlayerPunchAirEventH\x00R\x0eplayerPunchAir\x12J\n" + + "\x10player_sign_edit\x18& \x01(\v2\x1e.df.plugin.PlayerSignEditEventH\x00R\x0eplayerSignEdit\x12`\n" + + "\x18player_lectern_page_turn\x18' \x01(\v2%.df.plugin.PlayerLecternPageTurnEventH\x00R\x15playerLecternPageTurn\x12P\n" + + "\x12player_item_damage\x18( \x01(\v2 .df.plugin.PlayerItemDamageEventH\x00R\x10playerItemDamage\x12P\n" + + "\x12player_item_pickup\x18) \x01(\v2 .df.plugin.PlayerItemPickupEventH\x00R\x10playerItemPickup\x12]\n" + + "\x17player_held_slot_change\x18* \x01(\v2$.df.plugin.PlayerHeldSlotChangeEventH\x00R\x14playerHeldSlotChange\x12J\n" + + "\x10player_item_drop\x18+ \x01(\v2\x1e.df.plugin.PlayerItemDropEventH\x00R\x0eplayerItemDrop\x12I\n" + + "\x0fplayer_transfer\x18, \x01(\v2\x1e.df.plugin.PlayerTransferEventH\x00R\x0eplayerTransfer\x123\n" + + "\acommand\x18- \x01(\v2\x17.df.plugin.CommandEventH\x00R\acommand\x12R\n" + + "\x12player_diagnostics\x18. \x01(\v2!.df.plugin.PlayerDiagnosticsEventH\x00R\x11playerDiagnostics\x12M\n" + + "\x11world_liquid_flow\x18F \x01(\v2\x1f.df.plugin.WorldLiquidFlowEventH\x00R\x0fworldLiquidFlow\x12P\n" + + "\x12world_liquid_decay\x18G \x01(\v2 .df.plugin.WorldLiquidDecayEventH\x00R\x10worldLiquidDecay\x12S\n" + + "\x13world_liquid_harden\x18H \x01(\v2!.df.plugin.WorldLiquidHardenEventH\x00R\x11worldLiquidHarden\x12=\n" + + "\vworld_sound\x18I \x01(\v2\x1a.df.plugin.WorldSoundEventH\x00R\n" + + "worldSound\x12M\n" + + "\x11world_fire_spread\x18J \x01(\v2\x1f.df.plugin.WorldFireSpreadEventH\x00R\x0fworldFireSpread\x12J\n" + + "\x10world_block_burn\x18K \x01(\v2\x1e.df.plugin.WorldBlockBurnEventH\x00R\x0eworldBlockBurn\x12P\n" + + "\x12world_crop_trample\x18L \x01(\v2 .df.plugin.WorldCropTrampleEventH\x00R\x10worldCropTrample\x12P\n" + + "\x12world_leaves_decay\x18M \x01(\v2 .df.plugin.WorldLeavesDecayEventH\x00R\x10worldLeavesDecay\x12P\n" + + "\x12world_entity_spawn\x18N \x01(\v2 .df.plugin.WorldEntitySpawnEventH\x00R\x10worldEntitySpawn\x12V\n" + + "\x14world_entity_despawn\x18O \x01(\v2\".df.plugin.WorldEntityDespawnEventH\x00R\x12worldEntityDespawn\x12I\n" + + "\x0fworld_explosion\x18P \x01(\v2\x1e.df.plugin.WorldExplosionEventH\x00R\x0eworldExplosion\x12=\n" + + "\vworld_close\x18Q \x01(\v2\x1a.df.plugin.WorldCloseEventH\x00R\n" + + "worldCloseB\t\n" + + "\apayload\"\xbd\x02\n" + + "\fPluginToHost\x12\x1b\n" + + "\tplugin_id\x18\x01 \x01(\tR\bpluginId\x12.\n" + + "\x05hello\x18\n" + + " \x01(\v2\x16.df.plugin.PluginHelloH\x00R\x05hello\x129\n" + + "\tsubscribe\x18\v \x01(\v2\x19.df.plugin.EventSubscribeH\x00R\tsubscribe\x122\n" + + "\aactions\x18\x14 \x01(\v2\x16.df.plugin.ActionBatchH\x00R\aactions\x12)\n" + + "\x03log\x18\x1e \x01(\v2\x15.df.plugin.LogMessageH\x00R\x03log\x12;\n" + + "\fevent_result\x18( \x01(\v2\x16.df.plugin.EventResultH\x00R\veventResultB\t\n" + + "\apayload\"\x90\x01\n" + + "\vPluginHello\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\x12\x1f\n" + + "\vapi_version\x18\x03 \x01(\tR\n" + + "apiVersion\x122\n" + + "\bcommands\x18\x04 \x03(\v2\x16.df.plugin.CommandSpecR\bcommands\"]\n" + + "\vCommandSpec\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x18\n" + + "\aaliases\x18\x03 \x03(\tR\aaliases\"<\n" + + "\n" + + "LogMessage\x12\x14\n" + + "\x05level\x18\x01 \x01(\tR\x05level\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\">\n" + + "\x0eEventSubscribe\x12,\n" + + "\x06events\x18\x01 \x03(\x0e2\x14.df.plugin.EventTypeR\x06events*\x8a\t\n" + + "\tEventType\x12\x1a\n" + + "\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n" + + "\x0eEVENT_TYPE_ALL\x10\x01\x12\x0f\n" + + "\vPLAYER_JOIN\x10\n" + + "\x12\x0f\n" + + "\vPLAYER_QUIT\x10\v\x12\x0f\n" + + "\vPLAYER_MOVE\x10\f\x12\x0f\n" + + "\vPLAYER_JUMP\x10\r\x12\x13\n" + + "\x0fPLAYER_TELEPORT\x10\x0e\x12\x17\n" + + "\x13PLAYER_CHANGE_WORLD\x10\x0f\x12\x18\n" + + "\x14PLAYER_TOGGLE_SPRINT\x10\x10\x12\x17\n" + + "\x13PLAYER_TOGGLE_SNEAK\x10\x11\x12\b\n" + + "\x04CHAT\x10\x12\x12\x14\n" + + "\x10PLAYER_FOOD_LOSS\x10\x13\x12\x0f\n" + + "\vPLAYER_HEAL\x10\x14\x12\x0f\n" + + "\vPLAYER_HURT\x10\x15\x12\x10\n" + + "\fPLAYER_DEATH\x10\x16\x12\x12\n" + + "\x0ePLAYER_RESPAWN\x10\x17\x12\x16\n" + + "\x12PLAYER_SKIN_CHANGE\x10\x18\x12\x1a\n" + + "\x16PLAYER_FIRE_EXTINGUISH\x10\x19\x12\x16\n" + + "\x12PLAYER_START_BREAK\x10\x1a\x12\x16\n" + + "\x12PLAYER_BLOCK_BREAK\x10\x1b\x12\x16\n" + + "\x12PLAYER_BLOCK_PLACE\x10\x1c\x12\x15\n" + + "\x11PLAYER_BLOCK_PICK\x10\x1d\x12\x13\n" + + "\x0fPLAYER_ITEM_USE\x10\x1e\x12\x1c\n" + + "\x18PLAYER_ITEM_USE_ON_BLOCK\x10\x1f\x12\x1d\n" + + "\x19PLAYER_ITEM_USE_ON_ENTITY\x10 \x12\x17\n" + + "\x13PLAYER_ITEM_RELEASE\x10!\x12\x17\n" + + "\x13PLAYER_ITEM_CONSUME\x10\"\x12\x18\n" + + "\x14PLAYER_ATTACK_ENTITY\x10#\x12\x1a\n" + + "\x16PLAYER_EXPERIENCE_GAIN\x10$\x12\x14\n" + + "\x10PLAYER_PUNCH_AIR\x10%\x12\x14\n" + + "\x10PLAYER_SIGN_EDIT\x10&\x12\x1c\n" + + "\x18PLAYER_LECTERN_PAGE_TURN\x10'\x12\x16\n" + + "\x12PLAYER_ITEM_DAMAGE\x10(\x12\x16\n" + + "\x12PLAYER_ITEM_PICKUP\x10)\x12\x1b\n" + + "\x17PLAYER_HELD_SLOT_CHANGE\x10*\x12\x14\n" + + "\x10PLAYER_ITEM_DROP\x10+\x12\x13\n" + + "\x0fPLAYER_TRANSFER\x10,\x12\v\n" + + "\aCOMMAND\x10-\x12\x16\n" + + "\x12PLAYER_DIAGNOSTICS\x10.\x12\x15\n" + + "\x11WORLD_LIQUID_FLOW\x10F\x12\x16\n" + + "\x12WORLD_LIQUID_DECAY\x10G\x12\x17\n" + + "\x13WORLD_LIQUID_HARDEN\x10H\x12\x0f\n" + + "\vWORLD_SOUND\x10I\x12\x15\n" + + "\x11WORLD_FIRE_SPREAD\x10J\x12\x14\n" + + "\x10WORLD_BLOCK_BURN\x10K\x12\x16\n" + + "\x12WORLD_CROP_TRAMPLE\x10L\x12\x16\n" + + "\x12WORLD_LEAVES_DECAY\x10M\x12\x16\n" + + "\x12WORLD_ENTITY_SPAWN\x10N\x12\x18\n" + + "\x14WORLD_ENTITY_DESPAWN\x10O\x12\x13\n" + + "\x0fWORLD_EXPLOSION\x10P\x12\x0f\n" + + "\vWORLD_CLOSE\x10Q2M\n" + + "\x06Plugin\x12C\n" + + "\vEventStream\x12\x17.df.plugin.PluginToHost\x1a\x17.df.plugin.HostToPlugin(\x010\x01B)Z'github.com/secmc/plugin/proto/generatedb\x06proto3" var ( file_plugin_proto_rawDescOnce sync.Once - file_plugin_proto_rawDescData = file_plugin_proto_rawDesc + file_plugin_proto_rawDescData []byte ) func file_plugin_proto_rawDescGZIP() []byte { file_plugin_proto_rawDescOnce.Do(func() { - file_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_plugin_proto_rawDescData) + file_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_plugin_proto_rawDesc), len(file_plugin_proto_rawDesc))) }) return file_plugin_proto_rawDescData } var file_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_plugin_proto_goTypes = []interface{}{ - (EventType)(0), // 0: df.plugin.EventType - (*HostToPlugin)(nil), // 1: df.plugin.HostToPlugin - (*HostHello)(nil), // 2: df.plugin.HostHello - (*HostShutdown)(nil), // 3: df.plugin.HostShutdown - (*EventEnvelope)(nil), // 4: df.plugin.EventEnvelope - (*PluginToHost)(nil), // 5: df.plugin.PluginToHost - (*PluginHello)(nil), // 6: df.plugin.PluginHello - (*CommandSpec)(nil), // 7: df.plugin.CommandSpec - (*LogMessage)(nil), // 8: df.plugin.LogMessage - (*EventSubscribe)(nil), // 9: df.plugin.EventSubscribe - (*PlayerJoinEvent)(nil), // 10: df.plugin.PlayerJoinEvent - (*PlayerQuitEvent)(nil), // 11: df.plugin.PlayerQuitEvent - (*ChatEvent)(nil), // 12: df.plugin.ChatEvent - (*CommandEvent)(nil), // 13: df.plugin.CommandEvent - (*BlockBreakEvent)(nil), // 14: df.plugin.BlockBreakEvent - (*WorldCloseEvent)(nil), // 15: df.plugin.WorldCloseEvent - (*ActionBatch)(nil), // 16: df.plugin.ActionBatch - (*EventResult)(nil), // 17: df.plugin.EventResult +var file_plugin_proto_goTypes = []any{ + (EventType)(0), // 0: df.plugin.EventType + (*HostToPlugin)(nil), // 1: df.plugin.HostToPlugin + (*HostHello)(nil), // 2: df.plugin.HostHello + (*HostShutdown)(nil), // 3: df.plugin.HostShutdown + (*EventEnvelope)(nil), // 4: df.plugin.EventEnvelope + (*PluginToHost)(nil), // 5: df.plugin.PluginToHost + (*PluginHello)(nil), // 6: df.plugin.PluginHello + (*CommandSpec)(nil), // 7: df.plugin.CommandSpec + (*LogMessage)(nil), // 8: df.plugin.LogMessage + (*EventSubscribe)(nil), // 9: df.plugin.EventSubscribe + (*PlayerJoinEvent)(nil), // 10: df.plugin.PlayerJoinEvent + (*PlayerQuitEvent)(nil), // 11: df.plugin.PlayerQuitEvent + (*PlayerMoveEvent)(nil), // 12: df.plugin.PlayerMoveEvent + (*PlayerJumpEvent)(nil), // 13: df.plugin.PlayerJumpEvent + (*PlayerTeleportEvent)(nil), // 14: df.plugin.PlayerTeleportEvent + (*PlayerChangeWorldEvent)(nil), // 15: df.plugin.PlayerChangeWorldEvent + (*PlayerToggleSprintEvent)(nil), // 16: df.plugin.PlayerToggleSprintEvent + (*PlayerToggleSneakEvent)(nil), // 17: df.plugin.PlayerToggleSneakEvent + (*ChatEvent)(nil), // 18: df.plugin.ChatEvent + (*PlayerFoodLossEvent)(nil), // 19: df.plugin.PlayerFoodLossEvent + (*PlayerHealEvent)(nil), // 20: df.plugin.PlayerHealEvent + (*PlayerHurtEvent)(nil), // 21: df.plugin.PlayerHurtEvent + (*PlayerDeathEvent)(nil), // 22: df.plugin.PlayerDeathEvent + (*PlayerRespawnEvent)(nil), // 23: df.plugin.PlayerRespawnEvent + (*PlayerSkinChangeEvent)(nil), // 24: df.plugin.PlayerSkinChangeEvent + (*PlayerFireExtinguishEvent)(nil), // 25: df.plugin.PlayerFireExtinguishEvent + (*PlayerStartBreakEvent)(nil), // 26: df.plugin.PlayerStartBreakEvent + (*BlockBreakEvent)(nil), // 27: df.plugin.BlockBreakEvent + (*PlayerBlockPlaceEvent)(nil), // 28: df.plugin.PlayerBlockPlaceEvent + (*PlayerBlockPickEvent)(nil), // 29: df.plugin.PlayerBlockPickEvent + (*PlayerItemUseEvent)(nil), // 30: df.plugin.PlayerItemUseEvent + (*PlayerItemUseOnBlockEvent)(nil), // 31: df.plugin.PlayerItemUseOnBlockEvent + (*PlayerItemUseOnEntityEvent)(nil), // 32: df.plugin.PlayerItemUseOnEntityEvent + (*PlayerItemReleaseEvent)(nil), // 33: df.plugin.PlayerItemReleaseEvent + (*PlayerItemConsumeEvent)(nil), // 34: df.plugin.PlayerItemConsumeEvent + (*PlayerAttackEntityEvent)(nil), // 35: df.plugin.PlayerAttackEntityEvent + (*PlayerExperienceGainEvent)(nil), // 36: df.plugin.PlayerExperienceGainEvent + (*PlayerPunchAirEvent)(nil), // 37: df.plugin.PlayerPunchAirEvent + (*PlayerSignEditEvent)(nil), // 38: df.plugin.PlayerSignEditEvent + (*PlayerLecternPageTurnEvent)(nil), // 39: df.plugin.PlayerLecternPageTurnEvent + (*PlayerItemDamageEvent)(nil), // 40: df.plugin.PlayerItemDamageEvent + (*PlayerItemPickupEvent)(nil), // 41: df.plugin.PlayerItemPickupEvent + (*PlayerHeldSlotChangeEvent)(nil), // 42: df.plugin.PlayerHeldSlotChangeEvent + (*PlayerItemDropEvent)(nil), // 43: df.plugin.PlayerItemDropEvent + (*PlayerTransferEvent)(nil), // 44: df.plugin.PlayerTransferEvent + (*CommandEvent)(nil), // 45: df.plugin.CommandEvent + (*PlayerDiagnosticsEvent)(nil), // 46: df.plugin.PlayerDiagnosticsEvent + (*WorldLiquidFlowEvent)(nil), // 47: df.plugin.WorldLiquidFlowEvent + (*WorldLiquidDecayEvent)(nil), // 48: df.plugin.WorldLiquidDecayEvent + (*WorldLiquidHardenEvent)(nil), // 49: df.plugin.WorldLiquidHardenEvent + (*WorldSoundEvent)(nil), // 50: df.plugin.WorldSoundEvent + (*WorldFireSpreadEvent)(nil), // 51: df.plugin.WorldFireSpreadEvent + (*WorldBlockBurnEvent)(nil), // 52: df.plugin.WorldBlockBurnEvent + (*WorldCropTrampleEvent)(nil), // 53: df.plugin.WorldCropTrampleEvent + (*WorldLeavesDecayEvent)(nil), // 54: df.plugin.WorldLeavesDecayEvent + (*WorldEntitySpawnEvent)(nil), // 55: df.plugin.WorldEntitySpawnEvent + (*WorldEntityDespawnEvent)(nil), // 56: df.plugin.WorldEntityDespawnEvent + (*WorldExplosionEvent)(nil), // 57: df.plugin.WorldExplosionEvent + (*WorldCloseEvent)(nil), // 58: df.plugin.WorldCloseEvent + (*ActionBatch)(nil), // 59: df.plugin.ActionBatch + (*EventResult)(nil), // 60: df.plugin.EventResult } var file_plugin_proto_depIdxs = []int32{ 2, // 0: df.plugin.HostToPlugin.hello:type_name -> df.plugin.HostHello @@ -1160,24 +1865,67 @@ var file_plugin_proto_depIdxs = []int32{ 0, // 3: df.plugin.EventEnvelope.type:type_name -> df.plugin.EventType 10, // 4: df.plugin.EventEnvelope.player_join:type_name -> df.plugin.PlayerJoinEvent 11, // 5: df.plugin.EventEnvelope.player_quit:type_name -> df.plugin.PlayerQuitEvent - 12, // 6: df.plugin.EventEnvelope.chat:type_name -> df.plugin.ChatEvent - 13, // 7: df.plugin.EventEnvelope.command:type_name -> df.plugin.CommandEvent - 14, // 8: df.plugin.EventEnvelope.block_break:type_name -> df.plugin.BlockBreakEvent - 15, // 9: df.plugin.EventEnvelope.world_close:type_name -> df.plugin.WorldCloseEvent - 6, // 10: df.plugin.PluginToHost.hello:type_name -> df.plugin.PluginHello - 9, // 11: df.plugin.PluginToHost.subscribe:type_name -> df.plugin.EventSubscribe - 16, // 12: df.plugin.PluginToHost.actions:type_name -> df.plugin.ActionBatch - 8, // 13: df.plugin.PluginToHost.log:type_name -> df.plugin.LogMessage - 17, // 14: df.plugin.PluginToHost.event_result:type_name -> df.plugin.EventResult - 7, // 15: df.plugin.PluginHello.commands:type_name -> df.plugin.CommandSpec - 0, // 16: df.plugin.EventSubscribe.events:type_name -> df.plugin.EventType - 5, // 17: df.plugin.Plugin.EventStream:input_type -> df.plugin.PluginToHost - 1, // 18: df.plugin.Plugin.EventStream:output_type -> df.plugin.HostToPlugin - 18, // [18:19] is the sub-list for method output_type - 17, // [17:18] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 12, // 6: df.plugin.EventEnvelope.player_move:type_name -> df.plugin.PlayerMoveEvent + 13, // 7: df.plugin.EventEnvelope.player_jump:type_name -> df.plugin.PlayerJumpEvent + 14, // 8: df.plugin.EventEnvelope.player_teleport:type_name -> df.plugin.PlayerTeleportEvent + 15, // 9: df.plugin.EventEnvelope.player_change_world:type_name -> df.plugin.PlayerChangeWorldEvent + 16, // 10: df.plugin.EventEnvelope.player_toggle_sprint:type_name -> df.plugin.PlayerToggleSprintEvent + 17, // 11: df.plugin.EventEnvelope.player_toggle_sneak:type_name -> df.plugin.PlayerToggleSneakEvent + 18, // 12: df.plugin.EventEnvelope.chat:type_name -> df.plugin.ChatEvent + 19, // 13: df.plugin.EventEnvelope.player_food_loss:type_name -> df.plugin.PlayerFoodLossEvent + 20, // 14: df.plugin.EventEnvelope.player_heal:type_name -> df.plugin.PlayerHealEvent + 21, // 15: df.plugin.EventEnvelope.player_hurt:type_name -> df.plugin.PlayerHurtEvent + 22, // 16: df.plugin.EventEnvelope.player_death:type_name -> df.plugin.PlayerDeathEvent + 23, // 17: df.plugin.EventEnvelope.player_respawn:type_name -> df.plugin.PlayerRespawnEvent + 24, // 18: df.plugin.EventEnvelope.player_skin_change:type_name -> df.plugin.PlayerSkinChangeEvent + 25, // 19: df.plugin.EventEnvelope.player_fire_extinguish:type_name -> df.plugin.PlayerFireExtinguishEvent + 26, // 20: df.plugin.EventEnvelope.player_start_break:type_name -> df.plugin.PlayerStartBreakEvent + 27, // 21: df.plugin.EventEnvelope.block_break:type_name -> df.plugin.BlockBreakEvent + 28, // 22: df.plugin.EventEnvelope.player_block_place:type_name -> df.plugin.PlayerBlockPlaceEvent + 29, // 23: df.plugin.EventEnvelope.player_block_pick:type_name -> df.plugin.PlayerBlockPickEvent + 30, // 24: df.plugin.EventEnvelope.player_item_use:type_name -> df.plugin.PlayerItemUseEvent + 31, // 25: df.plugin.EventEnvelope.player_item_use_on_block:type_name -> df.plugin.PlayerItemUseOnBlockEvent + 32, // 26: df.plugin.EventEnvelope.player_item_use_on_entity:type_name -> df.plugin.PlayerItemUseOnEntityEvent + 33, // 27: df.plugin.EventEnvelope.player_item_release:type_name -> df.plugin.PlayerItemReleaseEvent + 34, // 28: df.plugin.EventEnvelope.player_item_consume:type_name -> df.plugin.PlayerItemConsumeEvent + 35, // 29: df.plugin.EventEnvelope.player_attack_entity:type_name -> df.plugin.PlayerAttackEntityEvent + 36, // 30: df.plugin.EventEnvelope.player_experience_gain:type_name -> df.plugin.PlayerExperienceGainEvent + 37, // 31: df.plugin.EventEnvelope.player_punch_air:type_name -> df.plugin.PlayerPunchAirEvent + 38, // 32: df.plugin.EventEnvelope.player_sign_edit:type_name -> df.plugin.PlayerSignEditEvent + 39, // 33: df.plugin.EventEnvelope.player_lectern_page_turn:type_name -> df.plugin.PlayerLecternPageTurnEvent + 40, // 34: df.plugin.EventEnvelope.player_item_damage:type_name -> df.plugin.PlayerItemDamageEvent + 41, // 35: df.plugin.EventEnvelope.player_item_pickup:type_name -> df.plugin.PlayerItemPickupEvent + 42, // 36: df.plugin.EventEnvelope.player_held_slot_change:type_name -> df.plugin.PlayerHeldSlotChangeEvent + 43, // 37: df.plugin.EventEnvelope.player_item_drop:type_name -> df.plugin.PlayerItemDropEvent + 44, // 38: df.plugin.EventEnvelope.player_transfer:type_name -> df.plugin.PlayerTransferEvent + 45, // 39: df.plugin.EventEnvelope.command:type_name -> df.plugin.CommandEvent + 46, // 40: df.plugin.EventEnvelope.player_diagnostics:type_name -> df.plugin.PlayerDiagnosticsEvent + 47, // 41: df.plugin.EventEnvelope.world_liquid_flow:type_name -> df.plugin.WorldLiquidFlowEvent + 48, // 42: df.plugin.EventEnvelope.world_liquid_decay:type_name -> df.plugin.WorldLiquidDecayEvent + 49, // 43: df.plugin.EventEnvelope.world_liquid_harden:type_name -> df.plugin.WorldLiquidHardenEvent + 50, // 44: df.plugin.EventEnvelope.world_sound:type_name -> df.plugin.WorldSoundEvent + 51, // 45: df.plugin.EventEnvelope.world_fire_spread:type_name -> df.plugin.WorldFireSpreadEvent + 52, // 46: df.plugin.EventEnvelope.world_block_burn:type_name -> df.plugin.WorldBlockBurnEvent + 53, // 47: df.plugin.EventEnvelope.world_crop_trample:type_name -> df.plugin.WorldCropTrampleEvent + 54, // 48: df.plugin.EventEnvelope.world_leaves_decay:type_name -> df.plugin.WorldLeavesDecayEvent + 55, // 49: df.plugin.EventEnvelope.world_entity_spawn:type_name -> df.plugin.WorldEntitySpawnEvent + 56, // 50: df.plugin.EventEnvelope.world_entity_despawn:type_name -> df.plugin.WorldEntityDespawnEvent + 57, // 51: df.plugin.EventEnvelope.world_explosion:type_name -> df.plugin.WorldExplosionEvent + 58, // 52: df.plugin.EventEnvelope.world_close:type_name -> df.plugin.WorldCloseEvent + 6, // 53: df.plugin.PluginToHost.hello:type_name -> df.plugin.PluginHello + 9, // 54: df.plugin.PluginToHost.subscribe:type_name -> df.plugin.EventSubscribe + 59, // 55: df.plugin.PluginToHost.actions:type_name -> df.plugin.ActionBatch + 8, // 56: df.plugin.PluginToHost.log:type_name -> df.plugin.LogMessage + 60, // 57: df.plugin.PluginToHost.event_result:type_name -> df.plugin.EventResult + 7, // 58: df.plugin.PluginHello.commands:type_name -> df.plugin.CommandSpec + 0, // 59: df.plugin.EventSubscribe.events:type_name -> df.plugin.EventType + 5, // 60: df.plugin.Plugin.EventStream:input_type -> df.plugin.PluginToHost + 1, // 61: df.plugin.Plugin.EventStream:output_type -> df.plugin.HostToPlugin + 61, // [61:62] is the sub-list for method output_type + 60, // [60:61] is the sub-list for method input_type + 60, // [60:60] is the sub-list for extension type_name + 60, // [60:60] is the sub-list for extension extendee + 0, // [0:60] is the sub-list for field type_name } func init() { file_plugin_proto_init() } @@ -1190,130 +1938,63 @@ func file_plugin_proto_init() { file_actions_proto_init() file_mutations_proto_init() file_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostToPlugin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostHello); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostShutdown); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventEnvelope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginToHost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginHello); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_plugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventSubscribe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_plugin_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[0].OneofWrappers = []any{ (*HostToPlugin_Hello)(nil), (*HostToPlugin_Shutdown)(nil), (*HostToPlugin_Event)(nil), } - file_plugin_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[3].OneofWrappers = []any{ (*EventEnvelope_PlayerJoin)(nil), (*EventEnvelope_PlayerQuit)(nil), + (*EventEnvelope_PlayerMove)(nil), + (*EventEnvelope_PlayerJump)(nil), + (*EventEnvelope_PlayerTeleport)(nil), + (*EventEnvelope_PlayerChangeWorld)(nil), + (*EventEnvelope_PlayerToggleSprint)(nil), + (*EventEnvelope_PlayerToggleSneak)(nil), (*EventEnvelope_Chat)(nil), - (*EventEnvelope_Command)(nil), + (*EventEnvelope_PlayerFoodLoss)(nil), + (*EventEnvelope_PlayerHeal)(nil), + (*EventEnvelope_PlayerHurt)(nil), + (*EventEnvelope_PlayerDeath)(nil), + (*EventEnvelope_PlayerRespawn)(nil), + (*EventEnvelope_PlayerSkinChange)(nil), + (*EventEnvelope_PlayerFireExtinguish)(nil), + (*EventEnvelope_PlayerStartBreak)(nil), (*EventEnvelope_BlockBreak)(nil), + (*EventEnvelope_PlayerBlockPlace)(nil), + (*EventEnvelope_PlayerBlockPick)(nil), + (*EventEnvelope_PlayerItemUse)(nil), + (*EventEnvelope_PlayerItemUseOnBlock)(nil), + (*EventEnvelope_PlayerItemUseOnEntity)(nil), + (*EventEnvelope_PlayerItemRelease)(nil), + (*EventEnvelope_PlayerItemConsume)(nil), + (*EventEnvelope_PlayerAttackEntity)(nil), + (*EventEnvelope_PlayerExperienceGain)(nil), + (*EventEnvelope_PlayerPunchAir)(nil), + (*EventEnvelope_PlayerSignEdit)(nil), + (*EventEnvelope_PlayerLecternPageTurn)(nil), + (*EventEnvelope_PlayerItemDamage)(nil), + (*EventEnvelope_PlayerItemPickup)(nil), + (*EventEnvelope_PlayerHeldSlotChange)(nil), + (*EventEnvelope_PlayerItemDrop)(nil), + (*EventEnvelope_PlayerTransfer)(nil), + (*EventEnvelope_Command)(nil), + (*EventEnvelope_PlayerDiagnostics)(nil), + (*EventEnvelope_WorldLiquidFlow)(nil), + (*EventEnvelope_WorldLiquidDecay)(nil), + (*EventEnvelope_WorldLiquidHarden)(nil), + (*EventEnvelope_WorldSound)(nil), + (*EventEnvelope_WorldFireSpread)(nil), + (*EventEnvelope_WorldBlockBurn)(nil), + (*EventEnvelope_WorldCropTrample)(nil), + (*EventEnvelope_WorldLeavesDecay)(nil), + (*EventEnvelope_WorldEntitySpawn)(nil), + (*EventEnvelope_WorldEntityDespawn)(nil), + (*EventEnvelope_WorldExplosion)(nil), (*EventEnvelope_WorldClose)(nil), } - file_plugin_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[4].OneofWrappers = []any{ (*PluginToHost_Hello)(nil), (*PluginToHost_Subscribe)(nil), (*PluginToHost_Actions)(nil), @@ -1324,7 +2005,7 @@ func file_plugin_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_plugin_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_plugin_proto_rawDesc), len(file_plugin_proto_rawDesc)), NumEnums: 1, NumMessages: 9, NumExtensions: 0, @@ -1336,7 +2017,6 @@ func file_plugin_proto_init() { MessageInfos: file_plugin_proto_msgTypes, }.Build() File_plugin_proto = out.File - file_plugin_proto_rawDesc = nil file_plugin_proto_goTypes = nil file_plugin_proto_depIdxs = nil } diff --git a/proto/generated/world_events.pb.go b/proto/generated/world_events.pb.go index 54b2f8c..446acad 100644 --- a/proto/generated/world_events.pb.go +++ b/proto/generated/world_events.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) +// protoc-gen-go v1.36.10 +// protoc v3.21.12 // source: world_events.proto package generated @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -20,19 +21,702 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type WorldCloseEvent struct { - state protoimpl.MessageState +type WorldLiquidFlowEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + From *BlockPos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *BlockPos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Liquid *LiquidState `protobuf:"bytes,4,opt,name=liquid,proto3" json:"liquid,omitempty"` + Replaced *BlockState `protobuf:"bytes,5,opt,name=replaced,proto3" json:"replaced,omitempty"` + unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache +} + +func (x *WorldLiquidFlowEvent) Reset() { + *x = WorldLiquidFlowEvent{} + mi := &file_world_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldLiquidFlowEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldLiquidFlowEvent) ProtoMessage() {} + +func (x *WorldLiquidFlowEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldLiquidFlowEvent.ProtoReflect.Descriptor instead. +func (*WorldLiquidFlowEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{0} +} + +func (x *WorldLiquidFlowEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldLiquidFlowEvent) GetFrom() *BlockPos { + if x != nil { + return x.From + } + return nil +} + +func (x *WorldLiquidFlowEvent) GetTo() *BlockPos { + if x != nil { + return x.To + } + return nil +} + +func (x *WorldLiquidFlowEvent) GetLiquid() *LiquidState { + if x != nil { + return x.Liquid + } + return nil +} + +func (x *WorldLiquidFlowEvent) GetReplaced() *BlockState { + if x != nil { + return x.Replaced + } + return nil +} + +type WorldLiquidDecayEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` + Before *LiquidState `protobuf:"bytes,3,opt,name=before,proto3,oneof" json:"before,omitempty"` + After *LiquidState `protobuf:"bytes,4,opt,name=after,proto3,oneof" json:"after,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *WorldCloseEvent) Reset() { - *x = WorldCloseEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_world_events_proto_msgTypes[0] +func (x *WorldLiquidDecayEvent) Reset() { + *x = WorldLiquidDecayEvent{} + mi := &file_world_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldLiquidDecayEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldLiquidDecayEvent) ProtoMessage() {} + +func (x *WorldLiquidDecayEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldLiquidDecayEvent.ProtoReflect.Descriptor instead. +func (*WorldLiquidDecayEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{1} +} + +func (x *WorldLiquidDecayEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldLiquidDecayEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *WorldLiquidDecayEvent) GetBefore() *LiquidState { + if x != nil { + return x.Before + } + return nil +} + +func (x *WorldLiquidDecayEvent) GetAfter() *LiquidState { + if x != nil { + return x.After + } + return nil +} + +type WorldLiquidHardenEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` + LiquidHardened *LiquidState `protobuf:"bytes,3,opt,name=liquid_hardened,json=liquidHardened,proto3,oneof" json:"liquid_hardened,omitempty"` + OtherLiquid *LiquidState `protobuf:"bytes,4,opt,name=other_liquid,json=otherLiquid,proto3,oneof" json:"other_liquid,omitempty"` + NewBlock *BlockState `protobuf:"bytes,5,opt,name=new_block,json=newBlock,proto3,oneof" json:"new_block,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldLiquidHardenEvent) Reset() { + *x = WorldLiquidHardenEvent{} + mi := &file_world_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldLiquidHardenEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldLiquidHardenEvent) ProtoMessage() {} + +func (x *WorldLiquidHardenEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldLiquidHardenEvent.ProtoReflect.Descriptor instead. +func (*WorldLiquidHardenEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{2} +} + +func (x *WorldLiquidHardenEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldLiquidHardenEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +func (x *WorldLiquidHardenEvent) GetLiquidHardened() *LiquidState { + if x != nil { + return x.LiquidHardened + } + return nil +} + +func (x *WorldLiquidHardenEvent) GetOtherLiquid() *LiquidState { + if x != nil { + return x.OtherLiquid + } + return nil +} + +func (x *WorldLiquidHardenEvent) GetNewBlock() *BlockState { + if x != nil { + return x.NewBlock + } + return nil +} + +type WorldSoundEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Sound string `protobuf:"bytes,2,opt,name=sound,proto3" json:"sound,omitempty"` + Position *Vec3 `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldSoundEvent) Reset() { + *x = WorldSoundEvent{} + mi := &file_world_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldSoundEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldSoundEvent) ProtoMessage() {} + +func (x *WorldSoundEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldSoundEvent.ProtoReflect.Descriptor instead. +func (*WorldSoundEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{3} +} + +func (x *WorldSoundEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldSoundEvent) GetSound() string { + if x != nil { + return x.Sound + } + return "" +} + +func (x *WorldSoundEvent) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +type WorldFireSpreadEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + From *BlockPos `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To *BlockPos `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldFireSpreadEvent) Reset() { + *x = WorldFireSpreadEvent{} + mi := &file_world_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldFireSpreadEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldFireSpreadEvent) ProtoMessage() {} + +func (x *WorldFireSpreadEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldFireSpreadEvent.ProtoReflect.Descriptor instead. +func (*WorldFireSpreadEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{4} +} + +func (x *WorldFireSpreadEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldFireSpreadEvent) GetFrom() *BlockPos { + if x != nil { + return x.From + } + return nil +} + +func (x *WorldFireSpreadEvent) GetTo() *BlockPos { + if x != nil { + return x.To + } + return nil +} + +type WorldBlockBurnEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldBlockBurnEvent) Reset() { + *x = WorldBlockBurnEvent{} + mi := &file_world_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldBlockBurnEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldBlockBurnEvent) ProtoMessage() {} + +func (x *WorldBlockBurnEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[5] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldBlockBurnEvent.ProtoReflect.Descriptor instead. +func (*WorldBlockBurnEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{5} +} + +func (x *WorldBlockBurnEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldBlockBurnEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +type WorldCropTrampleEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldCropTrampleEvent) Reset() { + *x = WorldCropTrampleEvent{} + mi := &file_world_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldCropTrampleEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldCropTrampleEvent) ProtoMessage() {} + +func (x *WorldCropTrampleEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldCropTrampleEvent.ProtoReflect.Descriptor instead. +func (*WorldCropTrampleEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{6} +} + +func (x *WorldCropTrampleEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldCropTrampleEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +type WorldLeavesDecayEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Position *BlockPos `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldLeavesDecayEvent) Reset() { + *x = WorldLeavesDecayEvent{} + mi := &file_world_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldLeavesDecayEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldLeavesDecayEvent) ProtoMessage() {} + +func (x *WorldLeavesDecayEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldLeavesDecayEvent.ProtoReflect.Descriptor instead. +func (*WorldLeavesDecayEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{7} +} + +func (x *WorldLeavesDecayEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldLeavesDecayEvent) GetPosition() *BlockPos { + if x != nil { + return x.Position + } + return nil +} + +type WorldEntitySpawnEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Entity *EntityRef `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldEntitySpawnEvent) Reset() { + *x = WorldEntitySpawnEvent{} + mi := &file_world_events_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldEntitySpawnEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldEntitySpawnEvent) ProtoMessage() {} + +func (x *WorldEntitySpawnEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldEntitySpawnEvent.ProtoReflect.Descriptor instead. +func (*WorldEntitySpawnEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{8} +} + +func (x *WorldEntitySpawnEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldEntitySpawnEvent) GetEntity() *EntityRef { + if x != nil { + return x.Entity + } + return nil +} + +type WorldEntityDespawnEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Entity *EntityRef `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldEntityDespawnEvent) Reset() { + *x = WorldEntityDespawnEvent{} + mi := &file_world_events_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldEntityDespawnEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldEntityDespawnEvent) ProtoMessage() {} + +func (x *WorldEntityDespawnEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldEntityDespawnEvent.ProtoReflect.Descriptor instead. +func (*WorldEntityDespawnEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{9} +} + +func (x *WorldEntityDespawnEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldEntityDespawnEvent) GetEntity() *EntityRef { + if x != nil { + return x.Entity + } + return nil +} + +type WorldExplosionEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + Position *Vec3 `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` + AffectedEntities []*EntityRef `protobuf:"bytes,3,rep,name=affected_entities,json=affectedEntities,proto3" json:"affected_entities,omitempty"` + AffectedBlocks []*BlockPos `protobuf:"bytes,4,rep,name=affected_blocks,json=affectedBlocks,proto3" json:"affected_blocks,omitempty"` + ItemDropChance float64 `protobuf:"fixed64,5,opt,name=item_drop_chance,json=itemDropChance,proto3" json:"item_drop_chance,omitempty"` + SpawnFire bool `protobuf:"varint,6,opt,name=spawn_fire,json=spawnFire,proto3" json:"spawn_fire,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldExplosionEvent) Reset() { + *x = WorldExplosionEvent{} + mi := &file_world_events_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorldExplosionEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldExplosionEvent) ProtoMessage() {} + +func (x *WorldExplosionEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldExplosionEvent.ProtoReflect.Descriptor instead. +func (*WorldExplosionEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{10} +} + +func (x *WorldExplosionEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil +} + +func (x *WorldExplosionEvent) GetPosition() *Vec3 { + if x != nil { + return x.Position + } + return nil +} + +func (x *WorldExplosionEvent) GetAffectedEntities() []*EntityRef { + if x != nil { + return x.AffectedEntities + } + return nil +} + +func (x *WorldExplosionEvent) GetAffectedBlocks() []*BlockPos { + if x != nil { + return x.AffectedBlocks + } + return nil +} + +func (x *WorldExplosionEvent) GetItemDropChance() float64 { + if x != nil { + return x.ItemDropChance + } + return 0 +} + +func (x *WorldExplosionEvent) GetSpawnFire() bool { + if x != nil { + return x.SpawnFire + } + return false +} + +type WorldCloseEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + World *WorldRef `protobuf:"bytes,1,opt,name=world,proto3" json:"world,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorldCloseEvent) Reset() { + *x = WorldCloseEvent{} + mi := &file_world_events_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorldCloseEvent) String() string { @@ -42,8 +726,8 @@ func (x *WorldCloseEvent) String() string { func (*WorldCloseEvent) ProtoMessage() {} func (x *WorldCloseEvent) ProtoReflect() protoreflect.Message { - mi := &file_world_events_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_world_events_proto_msgTypes[11] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55,49 +739,151 @@ func (x *WorldCloseEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldCloseEvent.ProtoReflect.Descriptor instead. func (*WorldCloseEvent) Descriptor() ([]byte, []int) { - return file_world_events_proto_rawDescGZIP(), []int{0} + return file_world_events_proto_rawDescGZIP(), []int{11} +} + +func (x *WorldCloseEvent) GetWorld() *WorldRef { + if x != nil { + return x.World + } + return nil } var File_world_events_proto protoreflect.FileDescriptor -var file_world_events_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, - 0x11, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x42, 0x8f, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x66, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x42, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x63, 0x6d, 0x63, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0xa2, 0x02, 0x03, 0x44, 0x50, 0x58, 0xaa, 0x02, 0x09, 0x44, 0x66, 0x2e, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0xca, 0x02, 0x09, 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, - 0x02, 0x15, 0x44, 0x66, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x44, 0x66, 0x3a, 0x3a, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_world_events_proto_rawDesc = "" + + "\n" + + "\x12world_events.proto\x12\tdf.plugin\x1a\fcommon.proto\"\xf2\x01\n" + + "\x14WorldLiquidFlowEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12'\n" + + "\x04from\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\x04from\x12#\n" + + "\x02to\x18\x03 \x01(\v2\x13.df.plugin.BlockPosR\x02to\x12.\n" + + "\x06liquid\x18\x04 \x01(\v2\x16.df.plugin.LiquidStateR\x06liquid\x121\n" + + "\breplaced\x18\x05 \x01(\v2\x15.df.plugin.BlockStateR\breplaced\"\xf0\x01\n" + + "\x15WorldLiquidDecayEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12/\n" + + "\bposition\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x123\n" + + "\x06before\x18\x03 \x01(\v2\x16.df.plugin.LiquidStateH\x00R\x06before\x88\x01\x01\x121\n" + + "\x05after\x18\x04 \x01(\v2\x16.df.plugin.LiquidStateH\x01R\x05after\x88\x01\x01B\t\n" + + "\a_beforeB\b\n" + + "\x06_after\"\xe6\x02\n" + + "\x16WorldLiquidHardenEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12/\n" + + "\bposition\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\bposition\x12D\n" + + "\x0fliquid_hardened\x18\x03 \x01(\v2\x16.df.plugin.LiquidStateH\x00R\x0eliquidHardened\x88\x01\x01\x12>\n" + + "\fother_liquid\x18\x04 \x01(\v2\x16.df.plugin.LiquidStateH\x01R\votherLiquid\x88\x01\x01\x127\n" + + "\tnew_block\x18\x05 \x01(\v2\x15.df.plugin.BlockStateH\x02R\bnewBlock\x88\x01\x01B\x12\n" + + "\x10_liquid_hardenedB\x0f\n" + + "\r_other_liquidB\f\n" + + "\n" + + "_new_block\"\x7f\n" + + "\x0fWorldSoundEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12\x14\n" + + "\x05sound\x18\x02 \x01(\tR\x05sound\x12+\n" + + "\bposition\x18\x03 \x01(\v2\x0f.df.plugin.Vec3R\bposition\"\x8f\x01\n" + + "\x14WorldFireSpreadEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12'\n" + + "\x04from\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\x04from\x12#\n" + + "\x02to\x18\x03 \x01(\v2\x13.df.plugin.BlockPosR\x02to\"q\n" + + "\x13WorldBlockBurnEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12/\n" + + "\bposition\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\bposition\"s\n" + + "\x15WorldCropTrampleEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12/\n" + + "\bposition\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\bposition\"s\n" + + "\x15WorldLeavesDecayEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12/\n" + + "\bposition\x18\x02 \x01(\v2\x13.df.plugin.BlockPosR\bposition\"p\n" + + "\x15WorldEntitySpawnEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12,\n" + + "\x06entity\x18\x02 \x01(\v2\x14.df.plugin.EntityRefR\x06entity\"r\n" + + "\x17WorldEntityDespawnEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12,\n" + + "\x06entity\x18\x02 \x01(\v2\x14.df.plugin.EntityRefR\x06entity\"\xb7\x02\n" + + "\x13WorldExplosionEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05world\x12+\n" + + "\bposition\x18\x02 \x01(\v2\x0f.df.plugin.Vec3R\bposition\x12A\n" + + "\x11affected_entities\x18\x03 \x03(\v2\x14.df.plugin.EntityRefR\x10affectedEntities\x12<\n" + + "\x0faffected_blocks\x18\x04 \x03(\v2\x13.df.plugin.BlockPosR\x0eaffectedBlocks\x12(\n" + + "\x10item_drop_chance\x18\x05 \x01(\x01R\x0eitemDropChance\x12\x1d\n" + + "\n" + + "spawn_fire\x18\x06 \x01(\bR\tspawnFire\"<\n" + + "\x0fWorldCloseEvent\x12)\n" + + "\x05world\x18\x01 \x01(\v2\x13.df.plugin.WorldRefR\x05worldB)Z'github.com/secmc/plugin/proto/generatedb\x06proto3" var ( file_world_events_proto_rawDescOnce sync.Once - file_world_events_proto_rawDescData = file_world_events_proto_rawDesc + file_world_events_proto_rawDescData []byte ) func file_world_events_proto_rawDescGZIP() []byte { file_world_events_proto_rawDescOnce.Do(func() { - file_world_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_world_events_proto_rawDescData) + file_world_events_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_world_events_proto_rawDesc), len(file_world_events_proto_rawDesc))) }) return file_world_events_proto_rawDescData } -var file_world_events_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_world_events_proto_goTypes = []interface{}{ - (*WorldCloseEvent)(nil), // 0: df.plugin.WorldCloseEvent +var file_world_events_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_world_events_proto_goTypes = []any{ + (*WorldLiquidFlowEvent)(nil), // 0: df.plugin.WorldLiquidFlowEvent + (*WorldLiquidDecayEvent)(nil), // 1: df.plugin.WorldLiquidDecayEvent + (*WorldLiquidHardenEvent)(nil), // 2: df.plugin.WorldLiquidHardenEvent + (*WorldSoundEvent)(nil), // 3: df.plugin.WorldSoundEvent + (*WorldFireSpreadEvent)(nil), // 4: df.plugin.WorldFireSpreadEvent + (*WorldBlockBurnEvent)(nil), // 5: df.plugin.WorldBlockBurnEvent + (*WorldCropTrampleEvent)(nil), // 6: df.plugin.WorldCropTrampleEvent + (*WorldLeavesDecayEvent)(nil), // 7: df.plugin.WorldLeavesDecayEvent + (*WorldEntitySpawnEvent)(nil), // 8: df.plugin.WorldEntitySpawnEvent + (*WorldEntityDespawnEvent)(nil), // 9: df.plugin.WorldEntityDespawnEvent + (*WorldExplosionEvent)(nil), // 10: df.plugin.WorldExplosionEvent + (*WorldCloseEvent)(nil), // 11: df.plugin.WorldCloseEvent + (*WorldRef)(nil), // 12: df.plugin.WorldRef + (*BlockPos)(nil), // 13: df.plugin.BlockPos + (*LiquidState)(nil), // 14: df.plugin.LiquidState + (*BlockState)(nil), // 15: df.plugin.BlockState + (*Vec3)(nil), // 16: df.plugin.Vec3 + (*EntityRef)(nil), // 17: df.plugin.EntityRef } var file_world_events_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 12, // 0: df.plugin.WorldLiquidFlowEvent.world:type_name -> df.plugin.WorldRef + 13, // 1: df.plugin.WorldLiquidFlowEvent.from:type_name -> df.plugin.BlockPos + 13, // 2: df.plugin.WorldLiquidFlowEvent.to:type_name -> df.plugin.BlockPos + 14, // 3: df.plugin.WorldLiquidFlowEvent.liquid:type_name -> df.plugin.LiquidState + 15, // 4: df.plugin.WorldLiquidFlowEvent.replaced:type_name -> df.plugin.BlockState + 12, // 5: df.plugin.WorldLiquidDecayEvent.world:type_name -> df.plugin.WorldRef + 13, // 6: df.plugin.WorldLiquidDecayEvent.position:type_name -> df.plugin.BlockPos + 14, // 7: df.plugin.WorldLiquidDecayEvent.before:type_name -> df.plugin.LiquidState + 14, // 8: df.plugin.WorldLiquidDecayEvent.after:type_name -> df.plugin.LiquidState + 12, // 9: df.plugin.WorldLiquidHardenEvent.world:type_name -> df.plugin.WorldRef + 13, // 10: df.plugin.WorldLiquidHardenEvent.position:type_name -> df.plugin.BlockPos + 14, // 11: df.plugin.WorldLiquidHardenEvent.liquid_hardened:type_name -> df.plugin.LiquidState + 14, // 12: df.plugin.WorldLiquidHardenEvent.other_liquid:type_name -> df.plugin.LiquidState + 15, // 13: df.plugin.WorldLiquidHardenEvent.new_block:type_name -> df.plugin.BlockState + 12, // 14: df.plugin.WorldSoundEvent.world:type_name -> df.plugin.WorldRef + 16, // 15: df.plugin.WorldSoundEvent.position:type_name -> df.plugin.Vec3 + 12, // 16: df.plugin.WorldFireSpreadEvent.world:type_name -> df.plugin.WorldRef + 13, // 17: df.plugin.WorldFireSpreadEvent.from:type_name -> df.plugin.BlockPos + 13, // 18: df.plugin.WorldFireSpreadEvent.to:type_name -> df.plugin.BlockPos + 12, // 19: df.plugin.WorldBlockBurnEvent.world:type_name -> df.plugin.WorldRef + 13, // 20: df.plugin.WorldBlockBurnEvent.position:type_name -> df.plugin.BlockPos + 12, // 21: df.plugin.WorldCropTrampleEvent.world:type_name -> df.plugin.WorldRef + 13, // 22: df.plugin.WorldCropTrampleEvent.position:type_name -> df.plugin.BlockPos + 12, // 23: df.plugin.WorldLeavesDecayEvent.world:type_name -> df.plugin.WorldRef + 13, // 24: df.plugin.WorldLeavesDecayEvent.position:type_name -> df.plugin.BlockPos + 12, // 25: df.plugin.WorldEntitySpawnEvent.world:type_name -> df.plugin.WorldRef + 17, // 26: df.plugin.WorldEntitySpawnEvent.entity:type_name -> df.plugin.EntityRef + 12, // 27: df.plugin.WorldEntityDespawnEvent.world:type_name -> df.plugin.WorldRef + 17, // 28: df.plugin.WorldEntityDespawnEvent.entity:type_name -> df.plugin.EntityRef + 12, // 29: df.plugin.WorldExplosionEvent.world:type_name -> df.plugin.WorldRef + 16, // 30: df.plugin.WorldExplosionEvent.position:type_name -> df.plugin.Vec3 + 17, // 31: df.plugin.WorldExplosionEvent.affected_entities:type_name -> df.plugin.EntityRef + 13, // 32: df.plugin.WorldExplosionEvent.affected_blocks:type_name -> df.plugin.BlockPos + 12, // 33: df.plugin.WorldCloseEvent.world:type_name -> df.plugin.WorldRef + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_world_events_proto_init() } @@ -105,27 +891,16 @@ func file_world_events_proto_init() { if File_world_events_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_world_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldCloseEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_common_proto_init() + file_world_events_proto_msgTypes[1].OneofWrappers = []any{} + file_world_events_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_world_events_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_world_events_proto_rawDesc), len(file_world_events_proto_rawDesc)), NumEnums: 0, - NumMessages: 1, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, @@ -134,7 +909,6 @@ func file_world_events_proto_init() { MessageInfos: file_world_events_proto_msgTypes, }.Build() File_world_events_proto = out.File - file_world_events_proto_rawDesc = nil file_world_events_proto_goTypes = nil file_world_events_proto_depIdxs = nil } diff --git a/proto/types/actions.proto b/proto/types/actions.proto index b2ba8de..87a8e43 100644 --- a/proto/types/actions.proto +++ b/proto/types/actions.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package df.plugin; +option go_package = "github.com/secmc/plugin/proto/generated"; + import "common.proto"; message ActionBatch { diff --git a/proto/types/common.proto b/proto/types/common.proto index 97ddbc9..8f2a573 100644 --- a/proto/types/common.proto +++ b/proto/types/common.proto @@ -9,8 +9,65 @@ enum GameMode { SPECTATOR = 3; } +message Vec3 { + double x = 1; + double y = 2; + double z = 3; +} + +message Rotation { + float yaw = 1; + float pitch = 2; +} + +message BlockPos { + int32 x = 1; + int32 y = 2; + int32 z = 3; +} + message ItemStack { string name = 1; int32 meta = 2; int32 count = 3; +} + +message BlockState { + string name = 1; + map properties = 2; +} + +message LiquidState { + BlockState block = 1; + int32 depth = 2; + bool falling = 3; + string liquid_type = 4; +} + +message WorldRef { + string name = 1; + string dimension = 2; +} + +message EntityRef { + string uuid = 1; + string type = 2; + optional string name = 3; + optional Vec3 position = 4; + optional Rotation rotation = 5; +} + +message DamageSource { + string type = 1; + optional string description = 2; +} + +message HealingSource { + string type = 1; + optional string description = 2; +} + +message Address { + string host = 1; + int32 port = 2; } \ No newline at end of file diff --git a/proto/types/mutations.proto b/proto/types/mutations.proto index a0e6427..e94bf05 100644 --- a/proto/types/mutations.proto +++ b/proto/types/mutations.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package df.plugin; +option go_package = "github.com/secmc/plugin/proto/generated"; + import "actions.proto"; import "common.proto"; @@ -10,6 +12,17 @@ message EventResult { oneof update { ChatMutation chat = 10; BlockBreakMutation block_break = 11; + PlayerFoodLossMutation player_food_loss = 12; + PlayerHealMutation player_heal = 13; + PlayerHurtMutation player_hurt = 14; + PlayerDeathMutation player_death = 15; + PlayerRespawnMutation player_respawn = 16; + PlayerAttackEntityMutation player_attack_entity = 17; + PlayerExperienceGainMutation player_experience_gain = 18; + PlayerLecternPageTurnMutation player_lectern_page_turn = 19; + PlayerItemPickupMutation player_item_pickup = 20; + PlayerTransferMutation player_transfer = 21; + WorldExplosionMutation world_explosion = 30; } } @@ -21,3 +34,54 @@ message BlockBreakMutation { repeated ItemStack drops = 1; optional int32 xp = 2; } + +message PlayerFoodLossMutation { + int32 to = 1; +} + +message PlayerHealMutation { + double amount = 1; +} + +message PlayerHurtMutation { + double damage = 1; + optional int64 attack_immunity_ms = 2; +} + +message PlayerDeathMutation { + bool keep_inventory = 1; +} + +message PlayerRespawnMutation { + optional Vec3 position = 1; + optional WorldRef world = 2; +} + +message PlayerAttackEntityMutation { + double force = 1; + double height = 2; + bool critical = 3; +} + +message PlayerExperienceGainMutation { + int32 amount = 1; +} + +message PlayerLecternPageTurnMutation { + int32 new_page = 1; +} + +message PlayerItemPickupMutation { + optional ItemStack item = 1; +} + +message PlayerTransferMutation { + optional Address address = 1; +} + +message WorldExplosionMutation { + repeated string entity_uuids = 1; + repeated BlockPos blocks = 2; + optional double item_drop_chance = 3; + optional bool spawn_fire = 4; +} diff --git a/proto/types/player_events.proto b/proto/types/player_events.proto index 997222a..4b50574 100644 --- a/proto/types/player_events.proto +++ b/proto/types/player_events.proto @@ -4,6 +4,8 @@ package df.plugin; option go_package = "github.com/secmc/plugin/proto/generated"; +import "common.proto"; + message PlayerJoinEvent { string player_uuid = 1; string name = 2; @@ -14,12 +16,255 @@ message PlayerQuitEvent { string name = 2; } +message PlayerMoveEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + Vec3 position = 4; + Rotation rotation = 5; +} + +message PlayerJumpEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + Vec3 position = 4; +} + +message PlayerTeleportEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + Vec3 position = 4; +} + +message PlayerChangeWorldEvent { + string player_uuid = 1; + string name = 2; + optional WorldRef before = 3; + optional WorldRef after = 4; +} + +message PlayerToggleSprintEvent { + string player_uuid = 1; + string name = 2; + bool after = 3; +} + +message PlayerToggleSneakEvent { + string player_uuid = 1; + string name = 2; + bool after = 3; +} + message ChatEvent { string player_uuid = 1; string name = 2; string message = 3; } +message PlayerFoodLossEvent { + string player_uuid = 1; + string name = 2; + int32 from = 3; + int32 to = 4; +} + +message PlayerHealEvent { + string player_uuid = 1; + string name = 2; + double amount = 3; + optional HealingSource source = 4; +} + +message PlayerHurtEvent { + string player_uuid = 1; + string name = 2; + double damage = 3; + bool immune = 4; + int64 attack_immunity_ms = 5; + optional DamageSource source = 6; +} + +message PlayerDeathEvent { + string player_uuid = 1; + string name = 2; + optional DamageSource source = 3; + bool keep_inventory = 4; +} + +message PlayerRespawnEvent { + string player_uuid = 1; + string name = 2; + optional Vec3 position = 3; + optional WorldRef world = 4; +} + +message PlayerSkinChangeEvent { + string player_uuid = 1; + string name = 2; + optional string full_id = 3; + optional string play_fab_id = 4; + bool persona = 5; +} + +message PlayerFireExtinguishEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; +} + +message PlayerStartBreakEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; +} + +message BlockBreakEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; +} + +message PlayerBlockPlaceEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; + BlockState block = 5; +} + +message PlayerBlockPickEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; + BlockState block = 5; +} + +message PlayerItemUseEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + optional ItemStack item = 4; +} + +message PlayerItemUseOnBlockEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; + string face = 5; + Vec3 click_position = 6; + BlockState block = 7; + optional ItemStack item = 8; +} + +message PlayerItemUseOnEntityEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + EntityRef entity = 4; + optional ItemStack item = 5; +} + +message PlayerItemReleaseEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + optional ItemStack item = 4; + int64 duration_ms = 5; +} + +message PlayerItemConsumeEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + optional ItemStack item = 4; +} + +message PlayerAttackEntityEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + EntityRef entity = 4; + double force = 5; + double height = 6; + bool critical = 7; + optional ItemStack item = 8; +} + +message PlayerExperienceGainEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + int32 amount = 4; +} + +message PlayerPunchAirEvent { + string player_uuid = 1; + string name = 2; + string world = 3; +} + +message PlayerSignEditEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; + bool front_side = 5; + string old_text = 6; + string new_text = 7; +} + +message PlayerLecternPageTurnEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + BlockPos position = 4; + int32 old_page = 5; + int32 new_page = 6; +} + +message PlayerItemDamageEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + optional ItemStack item = 4; + int32 damage = 5; +} + +message PlayerItemPickupEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + optional ItemStack item = 4; +} + +message PlayerHeldSlotChangeEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + int32 from_slot = 4; + int32 to_slot = 5; +} + +message PlayerItemDropEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + optional ItemStack item = 4; +} + +message PlayerTransferEvent { + string player_uuid = 1; + string name = 2; + optional Address address = 3; +} + message CommandEvent { string player_uuid = 1; string name = 2; @@ -28,11 +273,16 @@ message CommandEvent { repeated string args = 5; // Parsed arguments like ["100", "64", "200"] } -message BlockBreakEvent { +message PlayerDiagnosticsEvent { string player_uuid = 1; string name = 2; - string world = 3; - int32 x = 4; - int32 y = 5; - int32 z = 6; + double average_frames_per_second = 3; + double average_server_sim_tick_time = 4; + double average_client_sim_tick_time = 5; + double average_begin_frame_time = 6; + double average_input_time = 7; + double average_render_time = 8; + double average_end_frame_time = 9; + double average_remainder_time_percent = 10; + double average_unaccounted_time_percent = 11; } diff --git a/proto/types/plugin.proto b/proto/types/plugin.proto index 3898720..8cf05bb 100644 --- a/proto/types/plugin.proto +++ b/proto/types/plugin.proto @@ -37,10 +37,53 @@ message EventEnvelope { oneof payload { PlayerJoinEvent player_join = 10; PlayerQuitEvent player_quit = 11; - ChatEvent chat = 12; - CommandEvent command = 13; - BlockBreakEvent block_break = 14; - WorldCloseEvent world_close = 15; + PlayerMoveEvent player_move = 12; + PlayerJumpEvent player_jump = 13; + PlayerTeleportEvent player_teleport = 14; + PlayerChangeWorldEvent player_change_world = 15; + PlayerToggleSprintEvent player_toggle_sprint = 16; + PlayerToggleSneakEvent player_toggle_sneak = 17; + ChatEvent chat = 18; + PlayerFoodLossEvent player_food_loss = 19; + PlayerHealEvent player_heal = 20; + PlayerHurtEvent player_hurt = 21; + PlayerDeathEvent player_death = 22; + PlayerRespawnEvent player_respawn = 23; + PlayerSkinChangeEvent player_skin_change = 24; + PlayerFireExtinguishEvent player_fire_extinguish = 25; + PlayerStartBreakEvent player_start_break = 26; + BlockBreakEvent block_break = 27; + PlayerBlockPlaceEvent player_block_place = 28; + PlayerBlockPickEvent player_block_pick = 29; + PlayerItemUseEvent player_item_use = 30; + PlayerItemUseOnBlockEvent player_item_use_on_block = 31; + PlayerItemUseOnEntityEvent player_item_use_on_entity = 32; + PlayerItemReleaseEvent player_item_release = 33; + PlayerItemConsumeEvent player_item_consume = 34; + PlayerAttackEntityEvent player_attack_entity = 35; + PlayerExperienceGainEvent player_experience_gain = 36; + PlayerPunchAirEvent player_punch_air = 37; + PlayerSignEditEvent player_sign_edit = 38; + PlayerLecternPageTurnEvent player_lectern_page_turn = 39; + PlayerItemDamageEvent player_item_damage = 40; + PlayerItemPickupEvent player_item_pickup = 41; + PlayerHeldSlotChangeEvent player_held_slot_change = 42; + PlayerItemDropEvent player_item_drop = 43; + PlayerTransferEvent player_transfer = 44; + CommandEvent command = 45; + PlayerDiagnosticsEvent player_diagnostics = 46; + WorldLiquidFlowEvent world_liquid_flow = 70; + WorldLiquidDecayEvent world_liquid_decay = 71; + WorldLiquidHardenEvent world_liquid_harden = 72; + WorldSoundEvent world_sound = 73; + WorldFireSpreadEvent world_fire_spread = 74; + WorldBlockBurnEvent world_block_burn = 75; + WorldCropTrampleEvent world_crop_trample = 76; + WorldLeavesDecayEvent world_leaves_decay = 77; + WorldEntitySpawnEvent world_entity_spawn = 78; + WorldEntityDespawnEvent world_entity_despawn = 79; + WorldExplosionEvent world_explosion = 80; + WorldCloseEvent world_close = 81; } } diff --git a/proto/types/world_events.proto b/proto/types/world_events.proto index 327a50e..38e080e 100644 --- a/proto/types/world_events.proto +++ b/proto/types/world_events.proto @@ -4,4 +4,77 @@ package df.plugin; option go_package = "github.com/secmc/plugin/proto/generated"; -message WorldCloseEvent {} +import "common.proto"; + +message WorldLiquidFlowEvent { + WorldRef world = 1; + BlockPos from = 2; + BlockPos to = 3; + LiquidState liquid = 4; + BlockState replaced = 5; +} + +message WorldLiquidDecayEvent { + WorldRef world = 1; + BlockPos position = 2; + optional LiquidState before = 3; + optional LiquidState after = 4; +} + +message WorldLiquidHardenEvent { + WorldRef world = 1; + BlockPos position = 2; + optional LiquidState liquid_hardened = 3; + optional LiquidState other_liquid = 4; + optional BlockState new_block = 5; +} + +message WorldSoundEvent { + WorldRef world = 1; + string sound = 2; + Vec3 position = 3; +} + +message WorldFireSpreadEvent { + WorldRef world = 1; + BlockPos from = 2; + BlockPos to = 3; +} + +message WorldBlockBurnEvent { + WorldRef world = 1; + BlockPos position = 2; +} + +message WorldCropTrampleEvent { + WorldRef world = 1; + BlockPos position = 2; +} + +message WorldLeavesDecayEvent { + WorldRef world = 1; + BlockPos position = 2; +} + +message WorldEntitySpawnEvent { + WorldRef world = 1; + EntityRef entity = 2; +} + +message WorldEntityDespawnEvent { + WorldRef world = 1; + EntityRef entity = 2; +} + +message WorldExplosionEvent { + WorldRef world = 1; + Vec3 position = 2; + repeated EntityRef affected_entities = 3; + repeated BlockPos affected_blocks = 4; + double item_drop_chance = 5; + bool spawn_fire = 6; +} + +message WorldCloseEvent { + WorldRef world = 1; +}