From 77eddace736ab985cef0692cb45adc2d8520cb6d Mon Sep 17 00:00:00 2001 From: HashimTheArab Date: Tue, 11 Nov 2025 09:31:10 +0300 Subject: [PATCH 1/2] refactor: add event types instead of string. add enum containing all events --- README.md | 8 +- docs/plugin-architecture.md | 7 +- examples/plugins/README.md | 4 +- examples/plugins/php/src/HelloPlugin.php | 13 +++- examples/plugins/typescript/src/index.ts | 21 +++-- plugin/adapters/handlers/world.go | 2 +- plugin/adapters/plugin/emitter.go | 16 ++-- plugin/adapters/plugin/process.go | 15 ++-- plugin/ports/ports.go | 2 +- proto/types/player_events.proto | 38 +++++++++ proto/types/plugin.proto | 98 +++++++++++++++--------- proto/types/world_events.proto | 7 ++ 12 files changed, 160 insertions(+), 71 deletions(-) create mode 100644 proto/types/player_events.proto create mode 100644 proto/types/world_events.proto diff --git a/README.md b/README.md index 2f52f3c..0654b19 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,11 @@ try { $sub = new \DF\Plugin\PluginToHost(); $sub->setPluginId($pluginId); $subscribe = new \DF\Plugin\EventSubscribe(); - $subscribe->setEvents(['PLAYER_JOIN', 'COMMAND', 'BLOCK_BREAK']); + $subscribe->setEvents([ + \DF\Plugin\EventType::PLAYER_JOIN, + \DF\Plugin\EventType::COMMAND, + \DF\Plugin\EventType::PLAYER_BLOCK_BREAK, + ]); $sub->setSubscribe($subscribe); $stream->write($sub); continue; @@ -136,7 +140,7 @@ try { $event = $message->getEvent(); // Handle /mine command - if ($event->getType() === 'COMMAND' && $event->hasCommand()) { + if ($event->getType() === \DF\Plugin\EventType::COMMAND && $event->hasCommand()) { $cmd = $event->getCommand(); if ($cmd->getCommand() === 'mine') { // Send message to player diff --git a/docs/plugin-architecture.md b/docs/plugin-architecture.md index ba83718..bcd8314 100644 --- a/docs/plugin-architecture.md +++ b/docs/plugin-architecture.md @@ -97,12 +97,13 @@ plugins: ## 4. Event Routing -The manager sends events to plugins based on their subscriptions. Current events include: +The manager sends events to plugins based on their subscriptions. Current events include values from the +`EventType` enum, such as: * `PLAYER_JOIN` / `PLAYER_QUIT` * `CHAT` * `COMMAND` -* `BLOCK_BREAK` +* `PLAYER_BLOCK_BREAK` * `WORLD_CLOSE` Events carry minimal data required for action correlation (player UUID, name, coordinates). Plugins can correlate @@ -147,7 +148,7 @@ respect Dragonfly’s threading model. * `api_version` * Optional command registrations (shown in `/help`). 3. Dragonfly identifies the plugin by `plugin_id` and sends `HostHello(api_version="v1")`. -4. Plugin sends `EventSubscribe` listing uppercase event names (`["PLAYER_JOIN", "COMMAND"]`). +4. Plugin sends `EventSubscribe` listing `EventType` values (for example, `[EventType.PLAYER_JOIN, EventType.COMMAND]`). 5. Stream enters steady state: host pushes events; plugin sends actions/logs as needed. ## 8. Backpressure & Fault Handling diff --git a/examples/plugins/README.md b/examples/plugins/README.md index f2d5c5e..c896361 100644 --- a/examples/plugins/README.md +++ b/examples/plugins/README.md @@ -127,11 +127,13 @@ Host ←→ Plugin (EventStream) ### 4. Example Event Types +Values come from the `EventType` enum: + - `PLAYER_JOIN` - Player connected - `PLAYER_QUIT` - Player disconnected - `CHAT` - Player sent chat message - `COMMAND` - Player executed command -- `BLOCK_BREAK` - Player broke a block +- `PLAYER_BLOCK_BREAK` - Player broke a block - `WORLD_CLOSE` - World is closing ### 5. Example Actions diff --git a/examples/plugins/php/src/HelloPlugin.php b/examples/plugins/php/src/HelloPlugin.php index 1a999ca..5cf0263 100644 --- a/examples/plugins/php/src/HelloPlugin.php +++ b/examples/plugins/php/src/HelloPlugin.php @@ -14,6 +14,7 @@ use Df\Plugin\CommandSpec; use Df\Plugin\EventResult; use Df\Plugin\EventSubscribe; +use Df\Plugin\EventType; use Df\Plugin\PluginClient; use Df\Plugin\PluginHello; use Df\Plugin\PluginToHost; @@ -51,7 +52,11 @@ $subscribeMsg = new PluginToHost(); $subscribeMsg->setPluginId($pluginId); $subscribe = new EventSubscribe(); -$subscribe->setEvents(['PLAYER_JOIN', 'COMMAND', 'CHAT']); +$subscribe->setEvents([ + EventType::PLAYER_JOIN, + EventType::COMMAND, + EventType::CHAT, +]); $subscribeMsg->setSubscribe($subscribe); $call->write($subscribeMsg); @@ -76,12 +81,12 @@ $event = $message->getEvent(); $eventId = $event->getEventId(); - if ($event->getType() === 'PLAYER_JOIN' && $event->hasPlayerJoin()) { + if ($event->getType() === EventType::PLAYER_JOIN && $event->hasPlayerJoin()) { acknowledgeEvent($call, $pluginId, $eventId); continue; } - if ($event->getType() === 'CHAT' && $event->hasChat()) { + if ($event->getType() === EventType::CHAT && $event->hasChat()) { $chat = $event->getChat(); $text = $chat->getMessage(); @@ -101,7 +106,7 @@ continue; } - if ($event->getType() === 'COMMAND' && $event->hasCommand()) { + if ($event->getType() === EventType::COMMAND && $event->hasCommand()) { $commandEvent = $event->getCommand(); if ($commandEvent->getRaw() === '/cheers') { $action = new Action(); diff --git a/examples/plugins/typescript/src/index.ts b/examples/plugins/typescript/src/index.ts index e0212d7..58383b9 100644 --- a/examples/plugins/typescript/src/index.ts +++ b/examples/plugins/typescript/src/index.ts @@ -6,6 +6,7 @@ import { HostToPlugin, PluginToHost, GameMode, + EventType, } from '@dragonfly/proto'; const pluginId = process.env.DF_PLUGIN_ID || 'typescript-plugin'; @@ -46,7 +47,7 @@ function handleEvent( event: NonNullable ) { switch (event.type) { - case 'PLAYER_JOIN': { + case EventType.PLAYER_JOIN: { const player = event.playerJoin; if (!player) break; @@ -72,7 +73,7 @@ function handleEvent( break; } - case 'PLAYER_QUIT': { + case EventType.PLAYER_QUIT: { const player = event.playerQuit; if (!player) break; console.log(`[ts] player left ${player.name}`); @@ -89,7 +90,7 @@ function handleEvent( break; } - case 'COMMAND': { + case EventType.COMMAND: { const cmd = event.command; if (!cmd) break; @@ -228,7 +229,7 @@ function handleEvent( break; } - case 'CHAT': { + case EventType.CHAT: { const chat = event.chat; if (!chat) break; @@ -292,7 +293,7 @@ function handleEvent( break; } - case 'BLOCK_BREAK': { + case EventType.PLAYER_BLOCK_BREAK: { const blockBreak = event.blockBreak; if (!blockBreak) break; @@ -328,7 +329,7 @@ function handleEvent( } default: - console.log('[ts] unhandled event type:', event.type); + console.log('[ts] unhandled event type:', EventType[event.type] ?? event.type); } } @@ -371,7 +372,13 @@ call.write(helloMessage); const initialSubscribe: PluginToHost = { pluginId, subscribe: { - events: ['PLAYER_JOIN', 'PLAYER_QUIT', 'COMMAND', 'CHAT', 'BLOCK_BREAK'], + events: [ + EventType.PLAYER_JOIN, + EventType.PLAYER_QUIT, + EventType.COMMAND, + EventType.CHAT, + EventType.PLAYER_BLOCK_BREAK, + ], }, }; call.write(initialSubscribe); diff --git a/plugin/adapters/handlers/world.go b/plugin/adapters/handlers/world.go index 2282c10..8baf2ba 100644 --- a/plugin/adapters/handlers/world.go +++ b/plugin/adapters/handlers/world.go @@ -27,7 +27,7 @@ func (h *WorldHandler) HandleClose(tx *world.Tx) { } evt := &pb.EventEnvelope{ EventId: h.broadcaster.GenerateEventID(), - Type: "WORLD_CLOSE", + Type: pb.EventType_WORLD_CLOSE, Payload: &pb.EventEnvelope_WorldClose{ WorldClose: &pb.WorldCloseEvent{}, }, diff --git a/plugin/adapters/plugin/emitter.go b/plugin/adapters/plugin/emitter.go index dc907b5..efce2ab 100644 --- a/plugin/adapters/plugin/emitter.go +++ b/plugin/adapters/plugin/emitter.go @@ -220,7 +220,7 @@ func (m *Emitter) detachPlayer(p *player.Player) { func (m *Emitter) EmitPlayerJoin(p *player.Player) { evt := &pb.EventEnvelope{ EventId: m.generateEventID(), - Type: "PLAYER_JOIN", + Type: pb.EventType_PLAYER_JOIN, Payload: &pb.EventEnvelope_PlayerJoin{ PlayerJoin: &pb.PlayerJoinEvent{ PlayerUuid: p.UUID().String(), @@ -234,7 +234,7 @@ func (m *Emitter) EmitPlayerJoin(p *player.Player) { func (m *Emitter) EmitPlayerQuit(p *player.Player) { evt := &pb.EventEnvelope{ EventId: m.generateEventID(), - Type: "PLAYER_QUIT", + Type: pb.EventType_PLAYER_QUIT, Payload: &pb.EventEnvelope_PlayerQuit{ PlayerQuit: &pb.PlayerQuitEvent{ PlayerUuid: p.UUID().String(), @@ -251,7 +251,7 @@ func (m *Emitter) EmitChat(ctx *player.Context, p *player.Player, msg *string) { } evt := &pb.EventEnvelope{ EventId: m.generateEventID(), - Type: "CHAT", + Type: pb.EventType_CHAT, Payload: &pb.EventEnvelope_Chat{ Chat: &pb.ChatEvent{ PlayerUuid: p.UUID().String(), @@ -285,7 +285,7 @@ func (m *Emitter) EmitCommand(ctx *player.Context, p *player.Player, cmdName str } evt := &pb.EventEnvelope{ EventId: m.generateEventID(), - Type: "COMMAND", + Type: pb.EventType_COMMAND, Payload: &pb.EventEnvelope_Command{ Command: &pb.CommandEvent{ PlayerUuid: p.UUID().String(), @@ -308,7 +308,7 @@ func (m *Emitter) EmitCommand(ctx *player.Context, p *player.Player, cmdName str func (m *Emitter) EmitBlockBreak(ctx *player.Context, p *player.Player, pos cube.Pos, drops *[]item.Stack, xp *int, worldDim string) { evt := &pb.EventEnvelope{ EventId: m.generateEventID(), - Type: "BLOCK_BREAK", + Type: pb.EventType_PLAYER_BLOCK_BREAK, Payload: &pb.EventEnvelope_BlockBreak{ BlockBreak: &pb.BlockBreakEvent{ PlayerUuid: p.UUID().String(), @@ -351,7 +351,7 @@ func (m *Emitter) dispatchEvent(envelope *pb.EventEnvelope, expectResult bool) [ if envelope == nil { return nil } - eventType := strings.ToUpper(envelope.Type) + eventType := envelope.Type m.mu.RLock() procs := make([]*pluginProcess, 0, len(m.plugins)) for _, proc := range m.plugins { @@ -385,14 +385,14 @@ func (m *Emitter) dispatchEvent(envelope *pb.EventEnvelope, expectResult bool) [ res, err := proc.waitEventResult(waitCh, eventResponseTimeout) if err != nil { if errors.Is(err, context.DeadlineExceeded) { - proc.log.Warn("plugin did not respond to event", "event_id", envelope.EventId, "type", envelope.Type) + proc.log.Warn("plugin did not respond to event", "event_id", envelope.EventId, "type", envelope.Type.String()) } proc.discardEventResult(envelope.EventId) continue } if res != nil { results = append(results, res) - if envelope.Type == "CHAT" { + if envelope.Type == pb.EventType_CHAT { if chatEvt := envelope.GetChat(); chatEvt != nil { if chatMut := res.GetChat(); chatMut != nil { chatEvt.Message = chatMut.Message diff --git a/plugin/adapters/plugin/process.go b/plugin/adapters/plugin/process.go index 92cc181..4cb9006 100644 --- a/plugin/adapters/plugin/process.go +++ b/plugin/adapters/plugin/process.go @@ -9,7 +9,6 @@ import ( "log/slog" "os" "os/exec" - "strings" "sync" "sync/atomic" "time" @@ -226,25 +225,27 @@ func (p *pluginProcess) recvLoop() { } } -func (p *pluginProcess) HasSubscription(event string) bool { +func (p *pluginProcess) HasSubscription(event pb.EventType) bool { if !p.ready.Load() { return false } - if _, ok := p.subscriptions.Load("*"); ok { + if _, ok := p.subscriptions.Load(pb.EventType_EVENT_TYPE_ALL); ok { return true } - _, ok := p.subscriptions.Load(strings.ToUpper(event)) + if event == pb.EventType_EVENT_TYPE_UNSPECIFIED { + return false + } + _, ok := p.subscriptions.Load(event) return ok } -func (p *pluginProcess) updateSubscriptions(events []string) { +func (p *pluginProcess) updateSubscriptions(events []pb.EventType) { p.subscriptions.Range(func(key, value any) bool { p.subscriptions.Delete(key) return true }) for _, evt := range events { - evt = strings.ToUpper(strings.TrimSpace(evt)) - if evt == "" { + if evt == pb.EventType_EVENT_TYPE_UNSPECIFIED { continue } p.subscriptions.Store(evt, struct{}{}) diff --git a/plugin/ports/ports.go b/plugin/ports/ports.go index afcf156..c830242 100644 --- a/plugin/ports/ports.go +++ b/plugin/ports/ports.go @@ -18,7 +18,7 @@ type PluginManager interface { type PluginProcess interface { Start(ctx context.Context) error Stop() - HasSubscription(eventType string) bool + HasSubscription(eventType pb.EventType) bool Queue(msg *pb.HostToPlugin) } diff --git a/proto/types/player_events.proto b/proto/types/player_events.proto new file mode 100644 index 0000000..997222a --- /dev/null +++ b/proto/types/player_events.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package df.plugin; + +option go_package = "github.com/secmc/plugin/proto/generated"; + +message PlayerJoinEvent { + string player_uuid = 1; + string name = 2; +} + +message PlayerQuitEvent { + string player_uuid = 1; + string name = 2; +} + +message ChatEvent { + string player_uuid = 1; + string name = 2; + string message = 3; +} + +message CommandEvent { + string player_uuid = 1; + string name = 2; + string raw = 3; // Full command string like "/tp 100 64 200" + string command = 4; // Just the command name like "tp" + repeated string args = 5; // Parsed arguments like ["100", "64", "200"] +} + +message BlockBreakEvent { + string player_uuid = 1; + string name = 2; + string world = 3; + int32 x = 4; + int32 y = 5; + int32 z = 6; +} diff --git a/proto/types/plugin.proto b/proto/types/plugin.proto index 6fd3d1b..0799d3d 100644 --- a/proto/types/plugin.proto +++ b/proto/types/plugin.proto @@ -4,10 +4,69 @@ package df.plugin; option go_package = "github.com/secmc/plugin/proto/generated"; +import "player_events.proto"; +import "world_events.proto"; + service Plugin { rpc EventStream(stream PluginToHost) returns (stream HostToPlugin); } +enum EventType { + EVENT_TYPE_UNSPECIFIED = 0; + EVENT_TYPE_ALL = 1; + + PLAYER_JOIN = 10; + PLAYER_QUIT = 11; + PLAYER_MOVE = 12; + PLAYER_JUMP = 13; + PLAYER_TELEPORT = 14; + PLAYER_CHANGE_WORLD = 15; + PLAYER_TOGGLE_SPRINT = 16; + PLAYER_TOGGLE_SNEAK = 17; + CHAT = 18; + PLAYER_FOOD_LOSS = 19; + PLAYER_HEAL = 20; + PLAYER_HURT = 21; + PLAYER_DEATH = 22; + PLAYER_RESPAWN = 23; + PLAYER_SKIN_CHANGE = 24; + PLAYER_FIRE_EXTINGUISH = 25; + PLAYER_START_BREAK = 26; + PLAYER_BLOCK_BREAK = 27; + PLAYER_BLOCK_PLACE = 28; + PLAYER_BLOCK_PICK = 29; + PLAYER_ITEM_USE = 30; + PLAYER_ITEM_USE_ON_BLOCK = 31; + PLAYER_ITEM_USE_ON_ENTITY = 32; + PLAYER_ITEM_RELEASE = 33; + PLAYER_ITEM_CONSUME = 34; + PLAYER_ATTACK_ENTITY = 35; + PLAYER_EXPERIENCE_GAIN = 36; + PLAYER_PUNCH_AIR = 37; + PLAYER_SIGN_EDIT = 38; + PLAYER_LECTERN_PAGE_TURN = 39; + PLAYER_ITEM_DAMAGE = 40; + PLAYER_ITEM_PICKUP = 41; + PLAYER_HELD_SLOT_CHANGE = 42; + PLAYER_ITEM_DROP = 43; + PLAYER_TRANSFER = 44; + COMMAND = 45; + PLAYER_DIAGNOSTICS = 46; + + WORLD_LIQUID_FLOW = 70; + WORLD_LIQUID_DECAY = 71; + WORLD_LIQUID_HARDEN = 72; + WORLD_SOUND = 73; + WORLD_FIRE_SPREAD = 74; + WORLD_BLOCK_BURN = 75; + WORLD_CROP_TRAMPLE = 76; + WORLD_LEAVES_DECAY = 77; + WORLD_ENTITY_SPAWN = 78; + WORLD_ENTITY_DESPAWN = 79; + WORLD_EXPLOSION = 80; + WORLD_CLOSE = 81; +} + message HostToPlugin { string plugin_id = 1; oneof payload { @@ -27,7 +86,7 @@ message HostShutdown { message EventEnvelope { string event_id = 1; - string type = 2; + EventType type = 2; oneof payload { PlayerJoinEvent player_join = 10; PlayerQuitEvent player_quit = 11; @@ -38,41 +97,6 @@ message EventEnvelope { } } -message PlayerJoinEvent { - string player_uuid = 1; - string name = 2; -} - -message PlayerQuitEvent { - string player_uuid = 1; - string name = 2; -} - -message ChatEvent { - string player_uuid = 1; - string name = 2; - string message = 3; -} - -message CommandEvent { - string player_uuid = 1; - string name = 2; - string raw = 3; // Full command string like "/tp 100 64 200" - string command = 4; // Just the command name like "tp" - repeated string args = 5; // Parsed arguments like ["100", "64", "200"] -} - -message BlockBreakEvent { - string player_uuid = 1; - string name = 2; - string world = 3; - int32 x = 4; - int32 y = 5; - int32 z = 6; -} - -message WorldCloseEvent {} - message PluginToHost { string plugin_id = 1; oneof payload { @@ -98,7 +122,7 @@ message CommandSpec { } message EventSubscribe { - repeated string events = 1; + repeated EventType events = 1; } message ActionBatch { diff --git a/proto/types/world_events.proto b/proto/types/world_events.proto new file mode 100644 index 0000000..327a50e --- /dev/null +++ b/proto/types/world_events.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package df.plugin; + +option go_package = "github.com/secmc/plugin/proto/generated"; + +message WorldCloseEvent {} From 1e105cf37e241f7b1b85b0b71ab66218da377c64 Mon Sep 17 00:00:00 2001 From: HashimTheArab Date: Tue, 11 Nov 2025 09:31:14 +0300 Subject: [PATCH 2/2] generate proto --- .../php/Df/Plugin/BlockBreakEvent.php | 4 +- proto/generated/php/Df/Plugin/ChatEvent.php | 4 +- .../generated/php/Df/Plugin/CommandEvent.php | 4 +- .../generated/php/Df/Plugin/EventEnvelope.php | 16 +- .../php/Df/Plugin/EventSubscribe.php | 14 +- proto/generated/php/Df/Plugin/EventType.php | 294 ++++ .../Df/Plugin/GPBMetadata/PlayerEvents.php | 25 + .../php/Df/Plugin/GPBMetadata/Plugin.php | 4 +- .../php/Df/Plugin/GPBMetadata/WorldEvents.php | 25 + .../php/Df/Plugin/PlayerJoinEvent.php | 4 +- .../php/Df/Plugin/PlayerQuitEvent.php | 4 +- .../php/Df/Plugin/WorldCloseEvent.php | 4 +- .../php/GPBMetadata/PlayerEvents.php | 49 + proto/generated/php/GPBMetadata/Plugin.php | Bin 0 -> 4085 bytes .../generated/php/GPBMetadata/WorldEvents.php | 27 + proto/generated/player_events.pb.go | 524 +++++++ proto/generated/plugin.pb.go | 1377 +++++++---------- proto/generated/ts/player_events.ts | 575 +++++++ proto/generated/ts/plugin.d.ts | 60 +- proto/generated/ts/plugin.js | 370 ++++- proto/generated/ts/plugin.ts | 967 +++++------- proto/generated/ts/world_events.ts | 73 + proto/generated/world_events.pb.go | 140 ++ 23 files changed, 3118 insertions(+), 1446 deletions(-) create mode 100644 proto/generated/php/Df/Plugin/EventType.php create mode 100644 proto/generated/php/Df/Plugin/GPBMetadata/PlayerEvents.php create mode 100644 proto/generated/php/Df/Plugin/GPBMetadata/WorldEvents.php create mode 100644 proto/generated/php/GPBMetadata/PlayerEvents.php create mode 100644 proto/generated/php/GPBMetadata/Plugin.php create mode 100644 proto/generated/php/GPBMetadata/WorldEvents.php create mode 100644 proto/generated/player_events.pb.go create mode 100644 proto/generated/ts/player_events.ts create mode 100644 proto/generated/ts/world_events.ts create mode 100644 proto/generated/world_events.pb.go diff --git a/proto/generated/php/Df/Plugin/BlockBreakEvent.php b/proto/generated/php/Df/Plugin/BlockBreakEvent.php index 576bc29..a7761a0 100644 --- a/proto/generated/php/Df/Plugin/BlockBreakEvent.php +++ b/proto/generated/php/Df/Plugin/BlockBreakEvent.php @@ -1,7 +1,7 @@ string type = 2 [json_name = "type"]; + * Generated from protobuf field .df.plugin.EventType type = 2 [json_name = "type"]; */ - protected $type = ''; + protected $type = 0; protected $payload; /** @@ -31,7 +31,7 @@ class EventEnvelope extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $event_id - * @type string $type + * @type int $type * @type \Df\Plugin\PlayerJoinEvent $player_join * @type \Df\Plugin\PlayerQuitEvent $player_quit * @type \Df\Plugin\ChatEvent $chat @@ -68,8 +68,8 @@ public function setEventId($var) } /** - * Generated from protobuf field string type = 2 [json_name = "type"]; - * @return string + * Generated from protobuf field .df.plugin.EventType type = 2 [json_name = "type"]; + * @return int */ public function getType() { @@ -77,13 +77,13 @@ public function getType() } /** - * Generated from protobuf field string type = 2 [json_name = "type"]; - * @param string $var + * Generated from protobuf field .df.plugin.EventType type = 2 [json_name = "type"]; + * @param int $var * @return $this */ public function setType($var) { - GPBUtil::checkString($var, True); + GPBUtil::checkEnum($var, \Df\Plugin\EventType::class); $this->type = $var; return $this; diff --git a/proto/generated/php/Df/Plugin/EventSubscribe.php b/proto/generated/php/Df/Plugin/EventSubscribe.php index 10c35a5..b3b91af 100644 --- a/proto/generated/php/Df/Plugin/EventSubscribe.php +++ b/proto/generated/php/Df/Plugin/EventSubscribe.php @@ -15,7 +15,7 @@ class EventSubscribe extends \Google\Protobuf\Internal\Message { /** - * Generated from protobuf field repeated string events = 1 [json_name = "events"]; + * Generated from protobuf field repeated .df.plugin.EventType events = 1 [json_name = "events"]; */ private $events; @@ -25,7 +25,7 @@ class EventSubscribe extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type string[] $events + * @type int[] $events * } */ public function __construct($data = NULL) { @@ -34,8 +34,8 @@ public function __construct($data = NULL) { } /** - * Generated from protobuf field repeated string events = 1 [json_name = "events"]; - * @return RepeatedField + * Generated from protobuf field repeated .df.plugin.EventType events = 1 [json_name = "events"]; + * @return RepeatedField */ public function getEvents() { @@ -43,13 +43,13 @@ public function getEvents() } /** - * Generated from protobuf field repeated string events = 1 [json_name = "events"]; - * @param string[] $var + * Generated from protobuf field repeated .df.plugin.EventType events = 1 [json_name = "events"]; + * @param int[] $var * @return $this */ public function setEvents($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Df\Plugin\EventType::class); $this->events = $arr; return $this; diff --git a/proto/generated/php/Df/Plugin/EventType.php b/proto/generated/php/Df/Plugin/EventType.php new file mode 100644 index 0000000..5e34ce6 --- /dev/null +++ b/proto/generated/php/Df/Plugin/EventType.php @@ -0,0 +1,294 @@ +df.plugin.EventType + */ +class EventType +{ + /** + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum EVENT_TYPE_ALL = 1; + */ + const EVENT_TYPE_ALL = 1; + /** + * Generated from protobuf enum PLAYER_JOIN = 10; + */ + const PLAYER_JOIN = 10; + /** + * Generated from protobuf enum PLAYER_QUIT = 11; + */ + const PLAYER_QUIT = 11; + /** + * Generated from protobuf enum PLAYER_MOVE = 12; + */ + const PLAYER_MOVE = 12; + /** + * Generated from protobuf enum PLAYER_JUMP = 13; + */ + const PLAYER_JUMP = 13; + /** + * Generated from protobuf enum PLAYER_TELEPORT = 14; + */ + const PLAYER_TELEPORT = 14; + /** + * Generated from protobuf enum PLAYER_CHANGE_WORLD = 15; + */ + const PLAYER_CHANGE_WORLD = 15; + /** + * Generated from protobuf enum PLAYER_TOGGLE_SPRINT = 16; + */ + const PLAYER_TOGGLE_SPRINT = 16; + /** + * Generated from protobuf enum PLAYER_TOGGLE_SNEAK = 17; + */ + const PLAYER_TOGGLE_SNEAK = 17; + /** + * Generated from protobuf enum CHAT = 18; + */ + const CHAT = 18; + /** + * Generated from protobuf enum PLAYER_FOOD_LOSS = 19; + */ + const PLAYER_FOOD_LOSS = 19; + /** + * Generated from protobuf enum PLAYER_HEAL = 20; + */ + const PLAYER_HEAL = 20; + /** + * Generated from protobuf enum PLAYER_HURT = 21; + */ + const PLAYER_HURT = 21; + /** + * Generated from protobuf enum PLAYER_DEATH = 22; + */ + const PLAYER_DEATH = 22; + /** + * Generated from protobuf enum PLAYER_RESPAWN = 23; + */ + const PLAYER_RESPAWN = 23; + /** + * Generated from protobuf enum PLAYER_SKIN_CHANGE = 24; + */ + const PLAYER_SKIN_CHANGE = 24; + /** + * Generated from protobuf enum PLAYER_FIRE_EXTINGUISH = 25; + */ + const PLAYER_FIRE_EXTINGUISH = 25; + /** + * Generated from protobuf enum PLAYER_START_BREAK = 26; + */ + const PLAYER_START_BREAK = 26; + /** + * Generated from protobuf enum PLAYER_BLOCK_BREAK = 27; + */ + const PLAYER_BLOCK_BREAK = 27; + /** + * Generated from protobuf enum PLAYER_BLOCK_PLACE = 28; + */ + const PLAYER_BLOCK_PLACE = 28; + /** + * Generated from protobuf enum PLAYER_BLOCK_PICK = 29; + */ + const PLAYER_BLOCK_PICK = 29; + /** + * Generated from protobuf enum PLAYER_ITEM_USE = 30; + */ + const PLAYER_ITEM_USE = 30; + /** + * Generated from protobuf enum PLAYER_ITEM_USE_ON_BLOCK = 31; + */ + const PLAYER_ITEM_USE_ON_BLOCK = 31; + /** + * Generated from protobuf enum PLAYER_ITEM_USE_ON_ENTITY = 32; + */ + const PLAYER_ITEM_USE_ON_ENTITY = 32; + /** + * Generated from protobuf enum PLAYER_ITEM_RELEASE = 33; + */ + const PLAYER_ITEM_RELEASE = 33; + /** + * Generated from protobuf enum PLAYER_ITEM_CONSUME = 34; + */ + const PLAYER_ITEM_CONSUME = 34; + /** + * Generated from protobuf enum PLAYER_ATTACK_ENTITY = 35; + */ + const PLAYER_ATTACK_ENTITY = 35; + /** + * Generated from protobuf enum PLAYER_EXPERIENCE_GAIN = 36; + */ + const PLAYER_EXPERIENCE_GAIN = 36; + /** + * Generated from protobuf enum PLAYER_PUNCH_AIR = 37; + */ + const PLAYER_PUNCH_AIR = 37; + /** + * Generated from protobuf enum PLAYER_SIGN_EDIT = 38; + */ + const PLAYER_SIGN_EDIT = 38; + /** + * Generated from protobuf enum PLAYER_LECTERN_PAGE_TURN = 39; + */ + const PLAYER_LECTERN_PAGE_TURN = 39; + /** + * Generated from protobuf enum PLAYER_ITEM_DAMAGE = 40; + */ + const PLAYER_ITEM_DAMAGE = 40; + /** + * Generated from protobuf enum PLAYER_ITEM_PICKUP = 41; + */ + const PLAYER_ITEM_PICKUP = 41; + /** + * Generated from protobuf enum PLAYER_HELD_SLOT_CHANGE = 42; + */ + const PLAYER_HELD_SLOT_CHANGE = 42; + /** + * Generated from protobuf enum PLAYER_ITEM_DROP = 43; + */ + const PLAYER_ITEM_DROP = 43; + /** + * Generated from protobuf enum PLAYER_TRANSFER = 44; + */ + const PLAYER_TRANSFER = 44; + /** + * Generated from protobuf enum COMMAND = 45; + */ + const COMMAND = 45; + /** + * Generated from protobuf enum PLAYER_DIAGNOSTICS = 46; + */ + const PLAYER_DIAGNOSTICS = 46; + /** + * Generated from protobuf enum WORLD_LIQUID_FLOW = 70; + */ + const WORLD_LIQUID_FLOW = 70; + /** + * Generated from protobuf enum WORLD_LIQUID_DECAY = 71; + */ + const WORLD_LIQUID_DECAY = 71; + /** + * Generated from protobuf enum WORLD_LIQUID_HARDEN = 72; + */ + const WORLD_LIQUID_HARDEN = 72; + /** + * Generated from protobuf enum WORLD_SOUND = 73; + */ + const WORLD_SOUND = 73; + /** + * Generated from protobuf enum WORLD_FIRE_SPREAD = 74; + */ + const WORLD_FIRE_SPREAD = 74; + /** + * Generated from protobuf enum WORLD_BLOCK_BURN = 75; + */ + const WORLD_BLOCK_BURN = 75; + /** + * Generated from protobuf enum WORLD_CROP_TRAMPLE = 76; + */ + const WORLD_CROP_TRAMPLE = 76; + /** + * Generated from protobuf enum WORLD_LEAVES_DECAY = 77; + */ + const WORLD_LEAVES_DECAY = 77; + /** + * Generated from protobuf enum WORLD_ENTITY_SPAWN = 78; + */ + const WORLD_ENTITY_SPAWN = 78; + /** + * Generated from protobuf enum WORLD_ENTITY_DESPAWN = 79; + */ + const WORLD_ENTITY_DESPAWN = 79; + /** + * Generated from protobuf enum WORLD_EXPLOSION = 80; + */ + const WORLD_EXPLOSION = 80; + /** + * Generated from protobuf enum WORLD_CLOSE = 81; + */ + const WORLD_CLOSE = 81; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::EVENT_TYPE_ALL => 'EVENT_TYPE_ALL', + self::PLAYER_JOIN => 'PLAYER_JOIN', + self::PLAYER_QUIT => 'PLAYER_QUIT', + self::PLAYER_MOVE => 'PLAYER_MOVE', + self::PLAYER_JUMP => 'PLAYER_JUMP', + self::PLAYER_TELEPORT => 'PLAYER_TELEPORT', + self::PLAYER_CHANGE_WORLD => 'PLAYER_CHANGE_WORLD', + self::PLAYER_TOGGLE_SPRINT => 'PLAYER_TOGGLE_SPRINT', + self::PLAYER_TOGGLE_SNEAK => 'PLAYER_TOGGLE_SNEAK', + self::CHAT => 'CHAT', + self::PLAYER_FOOD_LOSS => 'PLAYER_FOOD_LOSS', + self::PLAYER_HEAL => 'PLAYER_HEAL', + self::PLAYER_HURT => 'PLAYER_HURT', + self::PLAYER_DEATH => 'PLAYER_DEATH', + self::PLAYER_RESPAWN => 'PLAYER_RESPAWN', + self::PLAYER_SKIN_CHANGE => 'PLAYER_SKIN_CHANGE', + self::PLAYER_FIRE_EXTINGUISH => 'PLAYER_FIRE_EXTINGUISH', + self::PLAYER_START_BREAK => 'PLAYER_START_BREAK', + self::PLAYER_BLOCK_BREAK => 'PLAYER_BLOCK_BREAK', + self::PLAYER_BLOCK_PLACE => 'PLAYER_BLOCK_PLACE', + self::PLAYER_BLOCK_PICK => 'PLAYER_BLOCK_PICK', + self::PLAYER_ITEM_USE => 'PLAYER_ITEM_USE', + self::PLAYER_ITEM_USE_ON_BLOCK => 'PLAYER_ITEM_USE_ON_BLOCK', + self::PLAYER_ITEM_USE_ON_ENTITY => 'PLAYER_ITEM_USE_ON_ENTITY', + self::PLAYER_ITEM_RELEASE => 'PLAYER_ITEM_RELEASE', + self::PLAYER_ITEM_CONSUME => 'PLAYER_ITEM_CONSUME', + self::PLAYER_ATTACK_ENTITY => 'PLAYER_ATTACK_ENTITY', + self::PLAYER_EXPERIENCE_GAIN => 'PLAYER_EXPERIENCE_GAIN', + self::PLAYER_PUNCH_AIR => 'PLAYER_PUNCH_AIR', + self::PLAYER_SIGN_EDIT => 'PLAYER_SIGN_EDIT', + self::PLAYER_LECTERN_PAGE_TURN => 'PLAYER_LECTERN_PAGE_TURN', + self::PLAYER_ITEM_DAMAGE => 'PLAYER_ITEM_DAMAGE', + self::PLAYER_ITEM_PICKUP => 'PLAYER_ITEM_PICKUP', + self::PLAYER_HELD_SLOT_CHANGE => 'PLAYER_HELD_SLOT_CHANGE', + self::PLAYER_ITEM_DROP => 'PLAYER_ITEM_DROP', + self::PLAYER_TRANSFER => 'PLAYER_TRANSFER', + self::COMMAND => 'COMMAND', + self::PLAYER_DIAGNOSTICS => 'PLAYER_DIAGNOSTICS', + self::WORLD_LIQUID_FLOW => 'WORLD_LIQUID_FLOW', + self::WORLD_LIQUID_DECAY => 'WORLD_LIQUID_DECAY', + self::WORLD_LIQUID_HARDEN => 'WORLD_LIQUID_HARDEN', + self::WORLD_SOUND => 'WORLD_SOUND', + self::WORLD_FIRE_SPREAD => 'WORLD_FIRE_SPREAD', + self::WORLD_BLOCK_BURN => 'WORLD_BLOCK_BURN', + self::WORLD_CROP_TRAMPLE => 'WORLD_CROP_TRAMPLE', + self::WORLD_LEAVES_DECAY => 'WORLD_LEAVES_DECAY', + self::WORLD_ENTITY_SPAWN => 'WORLD_ENTITY_SPAWN', + self::WORLD_ENTITY_DESPAWN => 'WORLD_ENTITY_DESPAWN', + self::WORLD_EXPLOSION => 'WORLD_EXPLOSION', + self::WORLD_CLOSE => 'WORLD_CLOSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/proto/generated/php/Df/Plugin/GPBMetadata/PlayerEvents.php b/proto/generated/php/Df/Plugin/GPBMetadata/PlayerEvents.php new file mode 100644 index 0000000..c36f0eb --- /dev/null +++ b/proto/generated/php/Df/Plugin/GPBMetadata/PlayerEvents.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xB6\x05\x0A\x13player_events.proto\x12\x09df.plugin\"F\x0A\x0FPlayerJoinEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\"F\x0A\x0FPlayerQuitEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\"Z\x0A\x09ChatEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\x12\x18\x0A\x07message\x18\x03 \x01(\x09R\x07message\"\x83\x01\x0A\x0CCommandEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\x12\x10\x0A\x03raw\x18\x03 \x01(\x09R\x03raw\x12\x18\x0A\x07command\x18\x04 \x01(\x09R\x07command\x12\x12\x0A\x04args\x18\x05 \x03(\x09R\x04args\"\x86\x01\x0A\x0FBlockBreakEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\x12\x14\x0A\x05world\x18\x03 \x01(\x09R\x05world\x12\x0C\x0A\x01x\x18\x04 \x01(\x05R\x01x\x12\x0C\x0A\x01y\x18\x05 \x01(\x05R\x01y\x12\x0C\x0A\x01z\x18\x06 \x01(\x05R\x01zB\x90\x01\x0A\x0Dcom.df.pluginB\x11PlayerEventsProtoP\x01Z'github.com/secmc/plugin/proto/generated\xA2\x02\x03DPX\xAA\x02\x09Df.Plugin\xCA\x02\x09Df\\Plugin\xE2\x02\x15Df\\Plugin\\GPBMetadata\xEA\x02\x0ADf::Pluginb\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php b/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php index 20b6e0e..be89ba8 100644 --- a/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php +++ b/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php @@ -15,8 +15,10 @@ public static function initOnce() { if (static::$is_initialized == true) { return; } + \Df\Plugin\GPBMetadata\PlayerEvents::initOnce(); + \Df\Plugin\GPBMetadata\WorldEvents::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xCF\x1A\x0A\x0Cplugin.proto\x12\x09df.plugin\"\xCD\x01\x0A\x0CHostToPlugin\x12\x1B\x0A\x09plugin_id\x18\x01 \x01(\x09R\x08pluginId\x12,\x0A\x05hello\x18\x0A \x01(\x0B2\x14.df.plugin.HostHelloH\x00R\x05hello\x125\x0A\x08shutdown\x18\x0B \x01(\x0B2\x17.df.plugin.HostShutdownH\x00R\x08shutdown\x120\x0A\x05event\x18\x14 \x01(\x0B2\x18.df.plugin.EventEnvelopeH\x00R\x05eventB\x09\x0A\x07payload\",\x0A\x09HostHello\x12\x1F\x0A\x0Bapi_version\x18\x01 \x01(\x09R\x0AapiVersion\"&\x0A\x0CHostShutdown\x12\x16\x0A\x06reason\x18\x01 \x01(\x09R\x06reason\"\xA6\x03\x0A\x0DEventEnvelope\x12\x19\x0A\x08event_id\x18\x01 \x01(\x09R\x07eventId\x12\x12\x0A\x04type\x18\x02 \x01(\x09R\x04type\x12=\x0A\x0Bplayer_join\x18\x0A \x01(\x0B2\x1A.df.plugin.PlayerJoinEventH\x00R\x0AplayerJoin\x12=\x0A\x0Bplayer_quit\x18\x0B \x01(\x0B2\x1A.df.plugin.PlayerQuitEventH\x00R\x0AplayerQuit\x12*\x0A\x04chat\x18\x0C \x01(\x0B2\x14.df.plugin.ChatEventH\x00R\x04chat\x123\x0A\x07command\x18\x0D \x01(\x0B2\x17.df.plugin.CommandEventH\x00R\x07command\x12=\x0A\x0Bblock_break\x18\x0E \x01(\x0B2\x1A.df.plugin.BlockBreakEventH\x00R\x0AblockBreak\x12=\x0A\x0Bworld_close\x18\x0F \x01(\x0B2\x1A.df.plugin.WorldCloseEventH\x00R\x0AworldCloseB\x09\x0A\x07payload\"F\x0A\x0FPlayerJoinEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\"F\x0A\x0FPlayerQuitEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\"Z\x0A\x09ChatEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\x12\x18\x0A\x07message\x18\x03 \x01(\x09R\x07message\"\x83\x01\x0A\x0CCommandEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\x12\x10\x0A\x03raw\x18\x03 \x01(\x09R\x03raw\x12\x18\x0A\x07command\x18\x04 \x01(\x09R\x07command\x12\x12\x0A\x04args\x18\x05 \x03(\x09R\x04args\"\x86\x01\x0A\x0FBlockBreakEvent\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x12\x0A\x04name\x18\x02 \x01(\x09R\x04name\x12\x14\x0A\x05world\x18\x03 \x01(\x09R\x05world\x12\x0C\x0A\x01x\x18\x04 \x01(\x05R\x01x\x12\x0C\x0A\x01y\x18\x05 \x01(\x05R\x01y\x12\x0C\x0A\x01z\x18\x06 \x01(\x05R\x01z\"\x11\x0A\x0FWorldCloseEvent\"\xBD\x02\x0A\x0CPluginToHost\x12\x1B\x0A\x09plugin_id\x18\x01 \x01(\x09R\x08pluginId\x12.\x0A\x05hello\x18\x0A \x01(\x0B2\x16.df.plugin.PluginHelloH\x00R\x05hello\x129\x0A\x09subscribe\x18\x0B \x01(\x0B2\x19.df.plugin.EventSubscribeH\x00R\x09subscribe\x122\x0A\x07actions\x18\x14 \x01(\x0B2\x16.df.plugin.ActionBatchH\x00R\x07actions\x12)\x0A\x03log\x18\x1E \x01(\x0B2\x15.df.plugin.LogMessageH\x00R\x03log\x12;\x0A\x0Cevent_result\x18( \x01(\x0B2\x16.df.plugin.EventResultH\x00R\x0BeventResultB\x09\x0A\x07payload\"\x90\x01\x0A\x0BPluginHello\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12\x18\x0A\x07version\x18\x02 \x01(\x09R\x07version\x12\x1F\x0A\x0Bapi_version\x18\x03 \x01(\x09R\x0AapiVersion\x122\x0A\x08commands\x18\x04 \x03(\x0B2\x16.df.plugin.CommandSpecR\x08commands\"]\x0A\x0BCommandSpec\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12 \x0A\x0Bdescription\x18\x02 \x01(\x09R\x0Bdescription\x12\x18\x0A\x07aliases\x18\x03 \x03(\x09R\x07aliases\"(\x0A\x0EEventSubscribe\x12\x16\x0A\x06events\x18\x01 \x03(\x09R\x06events\":\x0A\x0BActionBatch\x12+\x0A\x07actions\x18\x01 \x03(\x0B2\x11.df.plugin.ActionR\x07actions\"\xB3\x02\x0A\x06Action\x12*\x0A\x0Ecorrelation_id\x18\x01 \x01(\x09H\x01R\x0DcorrelationId\x88\x01\x01\x128\x0A\x09send_chat\x18\x0A \x01(\x0B2\x19.df.plugin.SendChatActionH\x00R\x08sendChat\x127\x0A\x08teleport\x18\x0B \x01(\x0B2\x19.df.plugin.TeleportActionH\x00R\x08teleport\x12+\x0A\x04kick\x18\x0C \x01(\x0B2\x15.df.plugin.KickActionH\x00R\x04kick\x12B\x0A\x0Dset_game_mode\x18\x0D \x01(\x0B2\x1C.df.plugin.SetGameModeActionH\x00R\x0BsetGameModeB\x06\x0A\x04kindB\x11\x0A\x0F_correlation_id\"K\x0A\x0ESendChatAction\x12\x1F\x0A\x0Btarget_uuid\x18\x01 \x01(\x09R\x0AtargetUuid\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\"\x83\x01\x0A\x0ETeleportAction\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x0C\x0A\x01x\x18\x02 \x01(\x01R\x01x\x12\x0C\x0A\x01y\x18\x03 \x01(\x01R\x01y\x12\x0C\x0A\x01z\x18\x04 \x01(\x01R\x01z\x12\x10\x0A\x03yaw\x18\x05 \x01(\x02R\x03yaw\x12\x14\x0A\x05pitch\x18\x06 \x01(\x02R\x05pitch\"E\x0A\x0AKickAction\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x16\x0A\x06reason\x18\x02 \x01(\x09R\x06reason\"f\x0A\x11SetGameModeAction\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x120\x0A\x09game_mode\x18\x02 \x01(\x0E2\x13.df.plugin.GameModeR\x08gameMode\"<\x0A\x0ALogMessage\x12\x14\x0A\x05level\x18\x01 \x01(\x09R\x05level\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\"\xCB\x01\x0A\x0BEventResult\x12\x19\x0A\x08event_id\x18\x01 \x01(\x09R\x07eventId\x12\x1B\x0A\x06cancel\x18\x02 \x01(\x08H\x01R\x06cancel\x88\x01\x01\x12-\x0A\x04chat\x18\x0A \x01(\x0B2\x17.df.plugin.ChatMutationH\x00R\x04chat\x12@\x0A\x0Bblock_break\x18\x0B \x01(\x0B2\x1D.df.plugin.BlockBreakMutationH\x00R\x0AblockBreakB\x08\x0A\x06updateB\x09\x0A\x07_cancel\"(\x0A\x0CChatMutation\x12\x18\x0A\x07message\x18\x01 \x01(\x09R\x07message\"\\\x0A\x12BlockBreakMutation\x12*\x0A\x05drops\x18\x01 \x03(\x0B2\x14.df.plugin.ItemStackR\x05drops\x12\x13\x0A\x02xp\x18\x02 \x01(\x05H\x00R\x02xp\x88\x01\x01B\x05\x0A\x03_xp\"I\x0A\x09ItemStack\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12\x12\x0A\x04meta\x18\x02 \x01(\x05R\x04meta\x12\x14\x0A\x05count\x18\x03 \x01(\x05R\x05count*D\x0A\x08GameMode\x12\x0C\x0A\x08SURVIVAL\x10\x00\x12\x0C\x0A\x08CREATIVE\x10\x01\x12\x0D\x0A\x09ADVENTURE\x10\x02\x12\x0D\x0A\x09SPECTATOR\x10\x032M\x0A\x06Plugin\x12C\x0A\x0BEventStream\x12\x17.df.plugin.PluginToHost\x1A\x17.df.plugin.HostToPlugin(\x010\x01B\x8A\x01\x0A\x0Dcom.df.pluginB\x0BPluginProtoP\x01Z'github.com/secmc/plugin/proto/generated\xA2\x02\x03DPX\xAA\x02\x09Df.Plugin\xCA\x02\x09Df\\Plugin\xE2\x02\x15Df\\Plugin\\GPBMetadata\xEA\x02\x0ADf::Pluginb\x06proto3" + "\x0A\x8E \x0A\x0Cplugin.proto\x12\x09df.plugin\x1A\x12world_events.proto\"\xCD\x01\x0A\x0CHostToPlugin\x12\x1B\x0A\x09plugin_id\x18\x01 \x01(\x09R\x08pluginId\x12,\x0A\x05hello\x18\x0A \x01(\x0B2\x14.df.plugin.HostHelloH\x00R\x05hello\x125\x0A\x08shutdown\x18\x0B \x01(\x0B2\x17.df.plugin.HostShutdownH\x00R\x08shutdown\x120\x0A\x05event\x18\x14 \x01(\x0B2\x18.df.plugin.EventEnvelopeH\x00R\x05eventB\x09\x0A\x07payload\",\x0A\x09HostHello\x12\x1F\x0A\x0Bapi_version\x18\x01 \x01(\x09R\x0AapiVersion\"&\x0A\x0CHostShutdown\x12\x16\x0A\x06reason\x18\x01 \x01(\x09R\x06reason\"\xBC\x03\x0A\x0DEventEnvelope\x12\x19\x0A\x08event_id\x18\x01 \x01(\x09R\x07eventId\x12(\x0A\x04type\x18\x02 \x01(\x0E2\x14.df.plugin.EventTypeR\x04type\x12=\x0A\x0Bplayer_join\x18\x0A \x01(\x0B2\x1A.df.plugin.PlayerJoinEventH\x00R\x0AplayerJoin\x12=\x0A\x0Bplayer_quit\x18\x0B \x01(\x0B2\x1A.df.plugin.PlayerQuitEventH\x00R\x0AplayerQuit\x12*\x0A\x04chat\x18\x0C \x01(\x0B2\x14.df.plugin.ChatEventH\x00R\x04chat\x123\x0A\x07command\x18\x0D \x01(\x0B2\x17.df.plugin.CommandEventH\x00R\x07command\x12=\x0A\x0Bblock_break\x18\x0E \x01(\x0B2\x1A.df.plugin.BlockBreakEventH\x00R\x0AblockBreak\x12=\x0A\x0Bworld_close\x18\x0F \x01(\x0B2\x1A.df.plugin.WorldCloseEventH\x00R\x0AworldCloseB\x09\x0A\x07payload\"\xBD\x02\x0A\x0CPluginToHost\x12\x1B\x0A\x09plugin_id\x18\x01 \x01(\x09R\x08pluginId\x12.\x0A\x05hello\x18\x0A \x01(\x0B2\x16.df.plugin.PluginHelloH\x00R\x05hello\x129\x0A\x09subscribe\x18\x0B \x01(\x0B2\x19.df.plugin.EventSubscribeH\x00R\x09subscribe\x122\x0A\x07actions\x18\x14 \x01(\x0B2\x16.df.plugin.ActionBatchH\x00R\x07actions\x12)\x0A\x03log\x18\x1E \x01(\x0B2\x15.df.plugin.LogMessageH\x00R\x03log\x12;\x0A\x0Cevent_result\x18( \x01(\x0B2\x16.df.plugin.EventResultH\x00R\x0BeventResultB\x09\x0A\x07payload\"\x90\x01\x0A\x0BPluginHello\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12\x18\x0A\x07version\x18\x02 \x01(\x09R\x07version\x12\x1F\x0A\x0Bapi_version\x18\x03 \x01(\x09R\x0AapiVersion\x122\x0A\x08commands\x18\x04 \x03(\x0B2\x16.df.plugin.CommandSpecR\x08commands\"]\x0A\x0BCommandSpec\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12 \x0A\x0Bdescription\x18\x02 \x01(\x09R\x0Bdescription\x12\x18\x0A\x07aliases\x18\x03 \x03(\x09R\x07aliases\">\x0A\x0EEventSubscribe\x12,\x0A\x06events\x18\x01 \x03(\x0E2\x14.df.plugin.EventTypeR\x06events\":\x0A\x0BActionBatch\x12+\x0A\x07actions\x18\x01 \x03(\x0B2\x11.df.plugin.ActionR\x07actions\"\xB3\x02\x0A\x06Action\x12*\x0A\x0Ecorrelation_id\x18\x01 \x01(\x09H\x01R\x0DcorrelationId\x88\x01\x01\x128\x0A\x09send_chat\x18\x0A \x01(\x0B2\x19.df.plugin.SendChatActionH\x00R\x08sendChat\x127\x0A\x08teleport\x18\x0B \x01(\x0B2\x19.df.plugin.TeleportActionH\x00R\x08teleport\x12+\x0A\x04kick\x18\x0C \x01(\x0B2\x15.df.plugin.KickActionH\x00R\x04kick\x12B\x0A\x0Dset_game_mode\x18\x0D \x01(\x0B2\x1C.df.plugin.SetGameModeActionH\x00R\x0BsetGameModeB\x06\x0A\x04kindB\x11\x0A\x0F_correlation_id\"K\x0A\x0ESendChatAction\x12\x1F\x0A\x0Btarget_uuid\x18\x01 \x01(\x09R\x0AtargetUuid\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\"\x83\x01\x0A\x0ETeleportAction\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x0C\x0A\x01x\x18\x02 \x01(\x01R\x01x\x12\x0C\x0A\x01y\x18\x03 \x01(\x01R\x01y\x12\x0C\x0A\x01z\x18\x04 \x01(\x01R\x01z\x12\x10\x0A\x03yaw\x18\x05 \x01(\x02R\x03yaw\x12\x14\x0A\x05pitch\x18\x06 \x01(\x02R\x05pitch\"E\x0A\x0AKickAction\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x12\x16\x0A\x06reason\x18\x02 \x01(\x09R\x06reason\"f\x0A\x11SetGameModeAction\x12\x1F\x0A\x0Bplayer_uuid\x18\x01 \x01(\x09R\x0AplayerUuid\x120\x0A\x09game_mode\x18\x02 \x01(\x0E2\x13.df.plugin.GameModeR\x08gameMode\"<\x0A\x0ALogMessage\x12\x14\x0A\x05level\x18\x01 \x01(\x09R\x05level\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\"\xCB\x01\x0A\x0BEventResult\x12\x19\x0A\x08event_id\x18\x01 \x01(\x09R\x07eventId\x12\x1B\x0A\x06cancel\x18\x02 \x01(\x08H\x01R\x06cancel\x88\x01\x01\x12-\x0A\x04chat\x18\x0A \x01(\x0B2\x17.df.plugin.ChatMutationH\x00R\x04chat\x12@\x0A\x0Bblock_break\x18\x0B \x01(\x0B2\x1D.df.plugin.BlockBreakMutationH\x00R\x0AblockBreakB\x08\x0A\x06updateB\x09\x0A\x07_cancel\"(\x0A\x0CChatMutation\x12\x18\x0A\x07message\x18\x01 \x01(\x09R\x07message\"\\\x0A\x12BlockBreakMutation\x12*\x0A\x05drops\x18\x01 \x03(\x0B2\x14.df.plugin.ItemStackR\x05drops\x12\x13\x0A\x02xp\x18\x02 \x01(\x05H\x00R\x02xp\x88\x01\x01B\x05\x0A\x03_xp\"I\x0A\x09ItemStack\x12\x12\x0A\x04name\x18\x01 \x01(\x09R\x04name\x12\x12\x0A\x04meta\x18\x02 \x01(\x05R\x04meta\x12\x14\x0A\x05count\x18\x03 \x01(\x05R\x05count*\x8A\x09\x0A\x09EventType\x12\x1A\x0A\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EEVENT_TYPE_ALL\x10\x01\x12\x0F\x0A\x0BPLAYER_JOIN\x10\x0A\x12\x0F\x0A\x0BPLAYER_QUIT\x10\x0B\x12\x0F\x0A\x0BPLAYER_MOVE\x10\x0C\x12\x0F\x0A\x0BPLAYER_JUMP\x10\x0D\x12\x13\x0A\x0FPLAYER_TELEPORT\x10\x0E\x12\x17\x0A\x13PLAYER_CHANGE_WORLD\x10\x0F\x12\x18\x0A\x14PLAYER_TOGGLE_SPRINT\x10\x10\x12\x17\x0A\x13PLAYER_TOGGLE_SNEAK\x10\x11\x12\x08\x0A\x04CHAT\x10\x12\x12\x14\x0A\x10PLAYER_FOOD_LOSS\x10\x13\x12\x0F\x0A\x0BPLAYER_HEAL\x10\x14\x12\x0F\x0A\x0BPLAYER_HURT\x10\x15\x12\x10\x0A\x0CPLAYER_DEATH\x10\x16\x12\x12\x0A\x0EPLAYER_RESPAWN\x10\x17\x12\x16\x0A\x12PLAYER_SKIN_CHANGE\x10\x18\x12\x1A\x0A\x16PLAYER_FIRE_EXTINGUISH\x10\x19\x12\x16\x0A\x12PLAYER_START_BREAK\x10\x1A\x12\x16\x0A\x12PLAYER_BLOCK_BREAK\x10\x1B\x12\x16\x0A\x12PLAYER_BLOCK_PLACE\x10\x1C\x12\x15\x0A\x11PLAYER_BLOCK_PICK\x10\x1D\x12\x13\x0A\x0FPLAYER_ITEM_USE\x10\x1E\x12\x1C\x0A\x18PLAYER_ITEM_USE_ON_BLOCK\x10\x1F\x12\x1D\x0A\x19PLAYER_ITEM_USE_ON_ENTITY\x10 \x12\x17\x0A\x13PLAYER_ITEM_RELEASE\x10!\x12\x17\x0A\x13PLAYER_ITEM_CONSUME\x10\"\x12\x18\x0A\x14PLAYER_ATTACK_ENTITY\x10#\x12\x1A\x0A\x16PLAYER_EXPERIENCE_GAIN\x10\$\x12\x14\x0A\x10PLAYER_PUNCH_AIR\x10%\x12\x14\x0A\x10PLAYER_SIGN_EDIT\x10&\x12\x1C\x0A\x18PLAYER_LECTERN_PAGE_TURN\x10'\x12\x16\x0A\x12PLAYER_ITEM_DAMAGE\x10(\x12\x16\x0A\x12PLAYER_ITEM_PICKUP\x10)\x12\x1B\x0A\x17PLAYER_HELD_SLOT_CHANGE\x10*\x12\x14\x0A\x10PLAYER_ITEM_DROP\x10+\x12\x13\x0A\x0FPLAYER_TRANSFER\x10,\x12\x0B\x0A\x07COMMAND\x10-\x12\x16\x0A\x12PLAYER_DIAGNOSTICS\x10.\x12\x15\x0A\x11WORLD_LIQUID_FLOW\x10F\x12\x16\x0A\x12WORLD_LIQUID_DECAY\x10G\x12\x17\x0A\x13WORLD_LIQUID_HARDEN\x10H\x12\x0F\x0A\x0BWORLD_SOUND\x10I\x12\x15\x0A\x11WORLD_FIRE_SPREAD\x10J\x12\x14\x0A\x10WORLD_BLOCK_BURN\x10K\x12\x16\x0A\x12WORLD_CROP_TRAMPLE\x10L\x12\x16\x0A\x12WORLD_LEAVES_DECAY\x10M\x12\x16\x0A\x12WORLD_ENTITY_SPAWN\x10N\x12\x18\x0A\x14WORLD_ENTITY_DESPAWN\x10O\x12\x13\x0A\x0FWORLD_EXPLOSION\x10P\x12\x0F\x0A\x0BWORLD_CLOSE\x10Q*D\x0A\x08GameMode\x12\x0C\x0A\x08SURVIVAL\x10\x00\x12\x0C\x0A\x08CREATIVE\x10\x01\x12\x0D\x0A\x09ADVENTURE\x10\x02\x12\x0D\x0A\x09SPECTATOR\x10\x032M\x0A\x06Plugin\x12C\x0A\x0BEventStream\x12\x17.df.plugin.PluginToHost\x1A\x17.df.plugin.HostToPlugin(\x010\x01B\x8A\x01\x0A\x0Dcom.df.pluginB\x0BPluginProtoP\x01Z'github.com/secmc/plugin/proto/generated\xA2\x02\x03DPX\xAA\x02\x09Df.Plugin\xCA\x02\x09Df\\Plugin\xE2\x02\x15Df\\Plugin\\GPBMetadata\xEA\x02\x0ADf::Pluginb\x06proto3" , true); static::$is_initialized = true; diff --git a/proto/generated/php/Df/Plugin/GPBMetadata/WorldEvents.php b/proto/generated/php/Df/Plugin/GPBMetadata/WorldEvents.php new file mode 100644 index 0000000..3d598ff --- /dev/null +++ b/proto/generated/php/Df/Plugin/GPBMetadata/WorldEvents.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xCC\x01\x0A\x12world_events.proto\x12\x09df.plugin\"\x11\x0A\x0FWorldCloseEventB\x8F\x01\x0A\x0Dcom.df.pluginB\x10WorldEventsProtoP\x01Z'github.com/secmc/plugin/proto/generated\xA2\x02\x03DPX\xAA\x02\x09Df.Plugin\xCA\x02\x09Df\\Plugin\xE2\x02\x15Df\\Plugin\\GPBMetadata\xEA\x02\x0ADf::Pluginb\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/proto/generated/php/Df/Plugin/PlayerJoinEvent.php b/proto/generated/php/Df/Plugin/PlayerJoinEvent.php index 72c9334..d6c6d34 100644 --- a/proto/generated/php/Df/Plugin/PlayerJoinEvent.php +++ b/proto/generated/php/Df/Plugin/PlayerJoinEvent.php @@ -1,7 +1,7 @@ internalAddGeneratedFile( + ' + +player_events.proto df.plugin"4 +PlayerJoinEvent + player_uuid (  +name ( "4 +PlayerQuitEvent + player_uuid (  +name ( "? + ChatEvent + player_uuid (  +name (  +message ( "] + CommandEvent + player_uuid (  +name (  +raw (  +command (  +args ( "d +BlockBreakEvent + player_uuid (  +name (  +world (  +x ( +y ( +z (B)Z\'github.com/secmc/plugin/proto/generatedbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/proto/generated/php/GPBMetadata/Plugin.php b/proto/generated/php/GPBMetadata/Plugin.php new file mode 100644 index 0000000000000000000000000000000000000000..9e1396885d0b061923b09dc5ba02be74e2b052e8 GIT binary patch literal 4085 zcmaJ^TW{OQ6}EhpMvgtEokVdi%T=7UoK2iIy*zlE7L+uW7)vBWQckikKv2}!)|w_+ zl1kz&@>&%AB?XH9wf=(wJu{@Fk?mc-SUk5m=R4myL;mS6(RqZP$}Jku*iGp`?qA92 zIhCV0OhYg9<^JgOl*Y0bUPeQo#{06|)MZV#WztmbZ^1PQN3ll_Rn`J@$wXFfeKSV>UMi5jFd4qX4F zNfR#~MrjxuV0v(HM$-upOj6s+k7eP8r*bXJ@!;S_l5gZR9#QdhS&nHsii00`-Yme^ z$*&UulM};tuV_p@(I8C@4yKh%9cRqnhp|8SHEUk>%RdkEB9*~lQqv)Hur|qp<+O|b z^AN3yt&>WF)BQ}aEq!K(Ih5y?b+-EN0$Oc{Not2#6QvDQ%FLbNpi+#d^2^eUp2c}Q(-rd;l6gHHM_Do4E2&QIYm$dTC=s>pco7L?oxN}js> zbu>(Kh;F*P1LfFd2Q7N%ZdzHr0el0*W2@(A1?KtE4F;7vH*jxcnz1b;(f32|!s!Dn z7nL<`FD6lE+B#DTE*Wt=KTK$4{e}zYaDypx7qMl3pGT`1wd|1f?lyv*?9MXm-VBax z4~;ptk4nj?&&Iq@a|9m<#{7J1Y`|%@;_{u6iXk^6m;j zJK}WTkNo4^- zm#Tk6YqNL)M9aMR1d?9(rO~JY#RO!fD#XoOz`V+@Hw0`m!|MMEXgT{SJw$6>7{}Cy z>mv*%L)k9;qfh|!O9>4I4j+na8;R|=K*t6n3kBVJiHa%pX%xoec@xd;Ts1L&h88b| z-bFrcA_tB@JTdzNx|7hvmH>aSUPg z1wzv)gamz{p+B9RSy28}KxJVFZ&~o0XxVe&{le#<6ffbcas8>P56Xir}@0vhC<(=U2Z$t733T=rF%~tM8C>Gn(`iEe+x@ z%I0wPMpjdLX{D}r0kP)4M7+YK_8d%4eF-f%Um_q|X=*gPh2ZHDUhXm{z}X8&LCWc} z^!%SCRN}Dm`)?cFBgaIu9s8p}oStSGq@f1Mw2^Pmxr*t~F0Lhe%j`ES1&Rbp8 zFcJjsda8}ff}pD(6TB)2-uAi%z5^6m&tur6Lk!)t@tSlWZRWy8ThUs?d9RzDCSI2+ zXlrb(w^|+ISca);HpYUBooh6r9N`VAh!!D;jU{Od;oSL9*PBj9w=BFVWYi`~2XBdj z9%OSDxVD=6HHl)k@jV7cE-{H^DDO3VU%H2+TxK1qnv*4tD-wV@K2vJw^|1(E=w_`y-YGl)1ABEmI)sx7QU7U9);!f~!Ku6x&vymOR!| z0T}YZAf`&R260*n5NStfmC@50ZAVc}{7jHqYD;t2*A4zoD5ygkHZe8FP=GRa&(!eA zu7DX&xv6wPi)+{A46>eq_u#I&pCiyFou*@TbbH*)=RyWqFjF`1_X5tgsc6NM~nBOOc$QJVNI%RjTrdBrd~njY7HdK{>sYjgm`I|BcQQfXVG(cGan9}A(U%A7%+FLu3=-EbOS^LzkA+9#qsR`FE>T2XCAA^ zFq3oasR1R}DlCzLgi1=2?V_GZFkEdVwx?{x)=j+dx{H?ckDf+;V^}G?_+Col?ib%( zw?&2c)l@6|rcmGe@nrXGn4XXN`|y(XDxuz`_bTF_#;^Ei^sBS+XL)~_3x2md`FeYi WeQ^pOsK5Ae$}O|c$*<@uLjMPgreX{L literal 0 HcmV?d00001 diff --git a/proto/generated/php/GPBMetadata/WorldEvents.php b/proto/generated/php/GPBMetadata/WorldEvents.php new file mode 100644 index 0000000..f6c3d41 --- /dev/null +++ b/proto/generated/php/GPBMetadata/WorldEvents.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + ' +e +world_events.proto df.plugin" +WorldCloseEventB)Z\'github.com/secmc/plugin/proto/generatedbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/proto/generated/player_events.pb.go b/proto/generated/player_events.pb.go new file mode 100644 index 0000000..18d00fd --- /dev/null +++ b/proto/generated/player_events.pb.go @@ -0,0 +1,524 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc (unknown) +// source: player_events.proto + +package generated + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PlayerJoinEvent 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"` +} + +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 *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 protoimpl.UnsafeEnabled && 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 + 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"` +} + +func (x *PlayerQuitEvent) Reset() { + *x = PlayerQuitEvent{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 ChatEvent 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"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ChatEvent) Reset() { + *x = ChatEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_player_events_proto_msgTypes[2] + 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[2] + if protoimpl.UnsafeEnabled && 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{2} +} + +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 CommandEvent 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"` + 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"] +} + +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) + } +} + +func (x *CommandEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandEvent) ProtoMessage() {} + +func (x *CommandEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandEvent.ProtoReflect.Descriptor instead. +func (*CommandEvent) Descriptor() ([]byte, []int) { + return file_player_events_proto_rawDescGZIP(), []int{3} +} + +func (x *CommandEvent) GetPlayerUuid() string { + if x != nil { + return x.PlayerUuid + } + return "" +} + +func (x *CommandEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CommandEvent) GetRaw() string { + if x != nil { + return x.Raw + } + return "" +} + +func (x *CommandEvent) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *CommandEvent) GetArgs() []string { + if x != nil { + return x.Args + } + 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"` +} + +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 *BlockBreakEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockBreakEvent) ProtoMessage() {} + +func (x *BlockBreakEvent) ProtoReflect() protoreflect.Message { + mi := &file_player_events_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && 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{4} +} + +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) GetX() int32 { + if x != nil { + return x.X + } + return 0 +} + +func (x *BlockBreakEvent) GetY() int32 { + if x != nil { + return x.Y + } + return 0 +} + +func (x *BlockBreakEvent) GetZ() int32 { + if x != nil { + return x.Z + } + return 0 +} + +var File_player_events_proto protoreflect.FileDescriptor + +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, +} + +var ( + file_player_events_proto_rawDescOnce sync.Once + file_player_events_proto_rawDescData = file_player_events_proto_rawDesc +) + +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) + }) + 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_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 +} + +func init() { file_player_events_proto_init() } +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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_player_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_player_events_proto_goTypes, + DependencyIndexes: file_player_events_proto_depIdxs, + 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 cda762a..836d942 100644 --- a/proto/generated/plugin.pb.go +++ b/proto/generated/plugin.pb.go @@ -20,6 +20,199 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type EventType int32 + +const ( + EventType_EVENT_TYPE_UNSPECIFIED EventType = 0 + EventType_EVENT_TYPE_ALL EventType = 1 + EventType_PLAYER_JOIN EventType = 10 + EventType_PLAYER_QUIT EventType = 11 + EventType_PLAYER_MOVE EventType = 12 + EventType_PLAYER_JUMP EventType = 13 + EventType_PLAYER_TELEPORT EventType = 14 + EventType_PLAYER_CHANGE_WORLD EventType = 15 + EventType_PLAYER_TOGGLE_SPRINT EventType = 16 + EventType_PLAYER_TOGGLE_SNEAK EventType = 17 + EventType_CHAT EventType = 18 + EventType_PLAYER_FOOD_LOSS EventType = 19 + EventType_PLAYER_HEAL EventType = 20 + EventType_PLAYER_HURT EventType = 21 + EventType_PLAYER_DEATH EventType = 22 + EventType_PLAYER_RESPAWN EventType = 23 + EventType_PLAYER_SKIN_CHANGE EventType = 24 + EventType_PLAYER_FIRE_EXTINGUISH EventType = 25 + EventType_PLAYER_START_BREAK EventType = 26 + EventType_PLAYER_BLOCK_BREAK EventType = 27 + EventType_PLAYER_BLOCK_PLACE EventType = 28 + EventType_PLAYER_BLOCK_PICK EventType = 29 + EventType_PLAYER_ITEM_USE EventType = 30 + EventType_PLAYER_ITEM_USE_ON_BLOCK EventType = 31 + EventType_PLAYER_ITEM_USE_ON_ENTITY EventType = 32 + EventType_PLAYER_ITEM_RELEASE EventType = 33 + EventType_PLAYER_ITEM_CONSUME EventType = 34 + EventType_PLAYER_ATTACK_ENTITY EventType = 35 + EventType_PLAYER_EXPERIENCE_GAIN EventType = 36 + EventType_PLAYER_PUNCH_AIR EventType = 37 + EventType_PLAYER_SIGN_EDIT EventType = 38 + EventType_PLAYER_LECTERN_PAGE_TURN EventType = 39 + EventType_PLAYER_ITEM_DAMAGE EventType = 40 + EventType_PLAYER_ITEM_PICKUP EventType = 41 + EventType_PLAYER_HELD_SLOT_CHANGE EventType = 42 + EventType_PLAYER_ITEM_DROP EventType = 43 + EventType_PLAYER_TRANSFER EventType = 44 + EventType_COMMAND EventType = 45 + EventType_PLAYER_DIAGNOSTICS EventType = 46 + EventType_WORLD_LIQUID_FLOW EventType = 70 + EventType_WORLD_LIQUID_DECAY EventType = 71 + EventType_WORLD_LIQUID_HARDEN EventType = 72 + EventType_WORLD_SOUND EventType = 73 + EventType_WORLD_FIRE_SPREAD EventType = 74 + EventType_WORLD_BLOCK_BURN EventType = 75 + EventType_WORLD_CROP_TRAMPLE EventType = 76 + EventType_WORLD_LEAVES_DECAY EventType = 77 + EventType_WORLD_ENTITY_SPAWN EventType = 78 + EventType_WORLD_ENTITY_DESPAWN EventType = 79 + EventType_WORLD_EXPLOSION EventType = 80 + EventType_WORLD_CLOSE EventType = 81 +) + +// Enum value maps for EventType. +var ( + EventType_name = map[int32]string{ + 0: "EVENT_TYPE_UNSPECIFIED", + 1: "EVENT_TYPE_ALL", + 10: "PLAYER_JOIN", + 11: "PLAYER_QUIT", + 12: "PLAYER_MOVE", + 13: "PLAYER_JUMP", + 14: "PLAYER_TELEPORT", + 15: "PLAYER_CHANGE_WORLD", + 16: "PLAYER_TOGGLE_SPRINT", + 17: "PLAYER_TOGGLE_SNEAK", + 18: "CHAT", + 19: "PLAYER_FOOD_LOSS", + 20: "PLAYER_HEAL", + 21: "PLAYER_HURT", + 22: "PLAYER_DEATH", + 23: "PLAYER_RESPAWN", + 24: "PLAYER_SKIN_CHANGE", + 25: "PLAYER_FIRE_EXTINGUISH", + 26: "PLAYER_START_BREAK", + 27: "PLAYER_BLOCK_BREAK", + 28: "PLAYER_BLOCK_PLACE", + 29: "PLAYER_BLOCK_PICK", + 30: "PLAYER_ITEM_USE", + 31: "PLAYER_ITEM_USE_ON_BLOCK", + 32: "PLAYER_ITEM_USE_ON_ENTITY", + 33: "PLAYER_ITEM_RELEASE", + 34: "PLAYER_ITEM_CONSUME", + 35: "PLAYER_ATTACK_ENTITY", + 36: "PLAYER_EXPERIENCE_GAIN", + 37: "PLAYER_PUNCH_AIR", + 38: "PLAYER_SIGN_EDIT", + 39: "PLAYER_LECTERN_PAGE_TURN", + 40: "PLAYER_ITEM_DAMAGE", + 41: "PLAYER_ITEM_PICKUP", + 42: "PLAYER_HELD_SLOT_CHANGE", + 43: "PLAYER_ITEM_DROP", + 44: "PLAYER_TRANSFER", + 45: "COMMAND", + 46: "PLAYER_DIAGNOSTICS", + 70: "WORLD_LIQUID_FLOW", + 71: "WORLD_LIQUID_DECAY", + 72: "WORLD_LIQUID_HARDEN", + 73: "WORLD_SOUND", + 74: "WORLD_FIRE_SPREAD", + 75: "WORLD_BLOCK_BURN", + 76: "WORLD_CROP_TRAMPLE", + 77: "WORLD_LEAVES_DECAY", + 78: "WORLD_ENTITY_SPAWN", + 79: "WORLD_ENTITY_DESPAWN", + 80: "WORLD_EXPLOSION", + 81: "WORLD_CLOSE", + } + EventType_value = map[string]int32{ + "EVENT_TYPE_UNSPECIFIED": 0, + "EVENT_TYPE_ALL": 1, + "PLAYER_JOIN": 10, + "PLAYER_QUIT": 11, + "PLAYER_MOVE": 12, + "PLAYER_JUMP": 13, + "PLAYER_TELEPORT": 14, + "PLAYER_CHANGE_WORLD": 15, + "PLAYER_TOGGLE_SPRINT": 16, + "PLAYER_TOGGLE_SNEAK": 17, + "CHAT": 18, + "PLAYER_FOOD_LOSS": 19, + "PLAYER_HEAL": 20, + "PLAYER_HURT": 21, + "PLAYER_DEATH": 22, + "PLAYER_RESPAWN": 23, + "PLAYER_SKIN_CHANGE": 24, + "PLAYER_FIRE_EXTINGUISH": 25, + "PLAYER_START_BREAK": 26, + "PLAYER_BLOCK_BREAK": 27, + "PLAYER_BLOCK_PLACE": 28, + "PLAYER_BLOCK_PICK": 29, + "PLAYER_ITEM_USE": 30, + "PLAYER_ITEM_USE_ON_BLOCK": 31, + "PLAYER_ITEM_USE_ON_ENTITY": 32, + "PLAYER_ITEM_RELEASE": 33, + "PLAYER_ITEM_CONSUME": 34, + "PLAYER_ATTACK_ENTITY": 35, + "PLAYER_EXPERIENCE_GAIN": 36, + "PLAYER_PUNCH_AIR": 37, + "PLAYER_SIGN_EDIT": 38, + "PLAYER_LECTERN_PAGE_TURN": 39, + "PLAYER_ITEM_DAMAGE": 40, + "PLAYER_ITEM_PICKUP": 41, + "PLAYER_HELD_SLOT_CHANGE": 42, + "PLAYER_ITEM_DROP": 43, + "PLAYER_TRANSFER": 44, + "COMMAND": 45, + "PLAYER_DIAGNOSTICS": 46, + "WORLD_LIQUID_FLOW": 70, + "WORLD_LIQUID_DECAY": 71, + "WORLD_LIQUID_HARDEN": 72, + "WORLD_SOUND": 73, + "WORLD_FIRE_SPREAD": 74, + "WORLD_BLOCK_BURN": 75, + "WORLD_CROP_TRAMPLE": 76, + "WORLD_LEAVES_DECAY": 77, + "WORLD_ENTITY_SPAWN": 78, + "WORLD_ENTITY_DESPAWN": 79, + "WORLD_EXPLOSION": 80, + "WORLD_CLOSE": 81, + } +) + +func (x EventType) Enum() *EventType { + p := new(EventType) + *p = x + return p +} + +func (x EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventType) Descriptor() protoreflect.EnumDescriptor { + return file_plugin_proto_enumTypes[0].Descriptor() +} + +func (EventType) Type() protoreflect.EnumType { + return &file_plugin_proto_enumTypes[0] +} + +func (x EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EventType.Descriptor instead. +func (EventType) EnumDescriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{0} +} + type GameMode int32 const ( @@ -56,11 +249,11 @@ func (x GameMode) String() string { } func (GameMode) Descriptor() protoreflect.EnumDescriptor { - return file_plugin_proto_enumTypes[0].Descriptor() + return file_plugin_proto_enumTypes[1].Descriptor() } func (GameMode) Type() protoreflect.EnumType { - return &file_plugin_proto_enumTypes[0] + return &file_plugin_proto_enumTypes[1] } func (x GameMode) Number() protoreflect.EnumNumber { @@ -69,7 +262,7 @@ func (x GameMode) Number() protoreflect.EnumNumber { // Deprecated: Use GameMode.Descriptor instead. func (GameMode) EnumDescriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{0} + return file_plugin_proto_rawDescGZIP(), []int{1} } type HostToPlugin struct { @@ -274,8 +467,8 @@ type EventEnvelope struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + 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: // // *EventEnvelope_PlayerJoin @@ -326,11 +519,11 @@ func (x *EventEnvelope) GetEventId() string { return "" } -func (x *EventEnvelope) GetType() string { +func (x *EventEnvelope) GetType() EventType { if x != nil { return x.Type } - return "" + return EventType_EVENT_TYPE_UNSPECIFIED } func (m *EventEnvelope) GetPayload() isEventEnvelope_Payload { @@ -422,383 +615,6 @@ func (*EventEnvelope_BlockBreak) isEventEnvelope_Payload() {} func (*EventEnvelope_WorldClose) isEventEnvelope_Payload() {} -type PlayerJoinEvent 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"` -} - -func (x *PlayerJoinEvent) Reset() { - *x = PlayerJoinEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[4] - 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_plugin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && 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_plugin_proto_rawDescGZIP(), []int{4} -} - -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 - 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"` -} - -func (x *PlayerQuitEvent) Reset() { - *x = PlayerQuitEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[5] - 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_plugin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && 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_plugin_proto_rawDescGZIP(), []int{5} -} - -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 ChatEvent 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"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *ChatEvent) Reset() { - *x = ChatEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[6] - 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_plugin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && 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_plugin_proto_rawDescGZIP(), []int{6} -} - -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 CommandEvent 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"` - 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"] -} - -func (x *CommandEvent) Reset() { - *x = CommandEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommandEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommandEvent) ProtoMessage() {} - -func (x *CommandEvent) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommandEvent.ProtoReflect.Descriptor instead. -func (*CommandEvent) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{7} -} - -func (x *CommandEvent) GetPlayerUuid() string { - if x != nil { - return x.PlayerUuid - } - return "" -} - -func (x *CommandEvent) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CommandEvent) GetRaw() string { - if x != nil { - return x.Raw - } - return "" -} - -func (x *CommandEvent) GetCommand() string { - if x != nil { - return x.Command - } - return "" -} - -func (x *CommandEvent) GetArgs() []string { - if x != nil { - return x.Args - } - 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"` -} - -func (x *BlockBreakEvent) Reset() { - *x = BlockBreakEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[8] - 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_plugin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && 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_plugin_proto_rawDescGZIP(), []int{8} -} - -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) GetX() int32 { - if x != nil { - return x.X - } - return 0 -} - -func (x *BlockBreakEvent) GetY() int32 { - if x != nil { - return x.Y - } - return 0 -} - -func (x *BlockBreakEvent) GetZ() int32 { - if x != nil { - return x.Z - } - return 0 -} - -type WorldCloseEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *WorldCloseEvent) Reset() { - *x = WorldCloseEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorldCloseEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorldCloseEvent) ProtoMessage() {} - -func (x *WorldCloseEvent) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorldCloseEvent.ProtoReflect.Descriptor instead. -func (*WorldCloseEvent) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{9} -} - type PluginToHost struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -818,7 +634,7 @@ type PluginToHost struct { func (x *PluginToHost) Reset() { *x = PluginToHost{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[10] + mi := &file_plugin_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -831,7 +647,7 @@ func (x *PluginToHost) String() string { func (*PluginToHost) ProtoMessage() {} func (x *PluginToHost) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[10] + mi := &file_plugin_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -844,7 +660,7 @@ func (x *PluginToHost) ProtoReflect() protoreflect.Message { // Deprecated: Use PluginToHost.ProtoReflect.Descriptor instead. func (*PluginToHost) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{10} + return file_plugin_proto_rawDescGZIP(), []int{4} } func (x *PluginToHost) GetPluginId() string { @@ -944,7 +760,7 @@ type PluginHello struct { func (x *PluginHello) Reset() { *x = PluginHello{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[11] + mi := &file_plugin_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -957,7 +773,7 @@ func (x *PluginHello) String() string { func (*PluginHello) ProtoMessage() {} func (x *PluginHello) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[11] + mi := &file_plugin_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -970,7 +786,7 @@ func (x *PluginHello) ProtoReflect() protoreflect.Message { // Deprecated: Use PluginHello.ProtoReflect.Descriptor instead. func (*PluginHello) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{11} + return file_plugin_proto_rawDescGZIP(), []int{5} } func (x *PluginHello) GetName() string { @@ -1014,7 +830,7 @@ type CommandSpec struct { func (x *CommandSpec) Reset() { *x = CommandSpec{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[12] + mi := &file_plugin_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1027,7 +843,7 @@ func (x *CommandSpec) String() string { func (*CommandSpec) ProtoMessage() {} func (x *CommandSpec) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[12] + mi := &file_plugin_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1040,7 +856,7 @@ func (x *CommandSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use CommandSpec.ProtoReflect.Descriptor instead. func (*CommandSpec) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{12} + return file_plugin_proto_rawDescGZIP(), []int{6} } func (x *CommandSpec) GetName() string { @@ -1069,13 +885,13 @@ type EventSubscribe struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + Events []EventType `protobuf:"varint,1,rep,packed,name=events,proto3,enum=df.plugin.EventType" json:"events,omitempty"` } func (x *EventSubscribe) Reset() { *x = EventSubscribe{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[13] + mi := &file_plugin_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1088,7 +904,7 @@ func (x *EventSubscribe) String() string { func (*EventSubscribe) ProtoMessage() {} func (x *EventSubscribe) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[13] + mi := &file_plugin_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1101,10 +917,10 @@ func (x *EventSubscribe) ProtoReflect() protoreflect.Message { // Deprecated: Use EventSubscribe.ProtoReflect.Descriptor instead. func (*EventSubscribe) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{13} + return file_plugin_proto_rawDescGZIP(), []int{7} } -func (x *EventSubscribe) GetEvents() []string { +func (x *EventSubscribe) GetEvents() []EventType { if x != nil { return x.Events } @@ -1122,7 +938,7 @@ type ActionBatch struct { func (x *ActionBatch) Reset() { *x = ActionBatch{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[14] + mi := &file_plugin_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1135,7 +951,7 @@ func (x *ActionBatch) String() string { func (*ActionBatch) ProtoMessage() {} func (x *ActionBatch) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[14] + mi := &file_plugin_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1148,7 +964,7 @@ func (x *ActionBatch) ProtoReflect() protoreflect.Message { // Deprecated: Use ActionBatch.ProtoReflect.Descriptor instead. func (*ActionBatch) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{14} + return file_plugin_proto_rawDescGZIP(), []int{8} } func (x *ActionBatch) GetActions() []*Action { @@ -1176,7 +992,7 @@ type Action struct { func (x *Action) Reset() { *x = Action{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[15] + mi := &file_plugin_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1189,7 +1005,7 @@ func (x *Action) String() string { func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[15] + mi := &file_plugin_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1202,7 +1018,7 @@ func (x *Action) ProtoReflect() protoreflect.Message { // Deprecated: Use Action.ProtoReflect.Descriptor instead. func (*Action) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{15} + return file_plugin_proto_rawDescGZIP(), []int{9} } func (x *Action) GetCorrelationId() string { @@ -1287,7 +1103,7 @@ type SendChatAction struct { func (x *SendChatAction) Reset() { *x = SendChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[16] + mi := &file_plugin_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1300,7 +1116,7 @@ func (x *SendChatAction) String() string { func (*SendChatAction) ProtoMessage() {} func (x *SendChatAction) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[16] + mi := &file_plugin_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1313,7 +1129,7 @@ func (x *SendChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use SendChatAction.ProtoReflect.Descriptor instead. func (*SendChatAction) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{16} + return file_plugin_proto_rawDescGZIP(), []int{10} } func (x *SendChatAction) GetTargetUuid() string { @@ -1346,7 +1162,7 @@ type TeleportAction struct { func (x *TeleportAction) Reset() { *x = TeleportAction{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[17] + mi := &file_plugin_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1359,7 +1175,7 @@ func (x *TeleportAction) String() string { func (*TeleportAction) ProtoMessage() {} func (x *TeleportAction) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[17] + mi := &file_plugin_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1372,7 +1188,7 @@ func (x *TeleportAction) ProtoReflect() protoreflect.Message { // Deprecated: Use TeleportAction.ProtoReflect.Descriptor instead. func (*TeleportAction) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{17} + return file_plugin_proto_rawDescGZIP(), []int{11} } func (x *TeleportAction) GetPlayerUuid() string { @@ -1429,7 +1245,7 @@ type KickAction struct { func (x *KickAction) Reset() { *x = KickAction{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[18] + mi := &file_plugin_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1442,7 +1258,7 @@ func (x *KickAction) String() string { func (*KickAction) ProtoMessage() {} func (x *KickAction) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[18] + mi := &file_plugin_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1455,7 +1271,7 @@ func (x *KickAction) ProtoReflect() protoreflect.Message { // Deprecated: Use KickAction.ProtoReflect.Descriptor instead. func (*KickAction) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{18} + return file_plugin_proto_rawDescGZIP(), []int{12} } func (x *KickAction) GetPlayerUuid() string { @@ -1484,7 +1300,7 @@ type SetGameModeAction struct { func (x *SetGameModeAction) Reset() { *x = SetGameModeAction{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[19] + mi := &file_plugin_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1497,7 +1313,7 @@ func (x *SetGameModeAction) String() string { func (*SetGameModeAction) ProtoMessage() {} func (x *SetGameModeAction) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[19] + mi := &file_plugin_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1510,7 +1326,7 @@ func (x *SetGameModeAction) ProtoReflect() protoreflect.Message { // Deprecated: Use SetGameModeAction.ProtoReflect.Descriptor instead. func (*SetGameModeAction) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{19} + return file_plugin_proto_rawDescGZIP(), []int{13} } func (x *SetGameModeAction) GetPlayerUuid() string { @@ -1539,7 +1355,7 @@ type LogMessage struct { func (x *LogMessage) Reset() { *x = LogMessage{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[20] + mi := &file_plugin_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1552,7 +1368,7 @@ func (x *LogMessage) String() string { func (*LogMessage) ProtoMessage() {} func (x *LogMessage) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[20] + mi := &file_plugin_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1565,7 +1381,7 @@ func (x *LogMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use LogMessage.ProtoReflect.Descriptor instead. func (*LogMessage) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{20} + return file_plugin_proto_rawDescGZIP(), []int{14} } func (x *LogMessage) GetLevel() string { @@ -1599,7 +1415,7 @@ type EventResult struct { func (x *EventResult) Reset() { *x = EventResult{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[21] + mi := &file_plugin_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1612,7 +1428,7 @@ func (x *EventResult) String() string { func (*EventResult) ProtoMessage() {} func (x *EventResult) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[21] + mi := &file_plugin_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1625,7 +1441,7 @@ func (x *EventResult) ProtoReflect() protoreflect.Message { // Deprecated: Use EventResult.ProtoReflect.Descriptor instead. func (*EventResult) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{21} + return file_plugin_proto_rawDescGZIP(), []int{15} } func (x *EventResult) GetEventId() string { @@ -1690,7 +1506,7 @@ type ChatMutation struct { func (x *ChatMutation) Reset() { *x = ChatMutation{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[22] + mi := &file_plugin_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1703,7 +1519,7 @@ func (x *ChatMutation) String() string { func (*ChatMutation) ProtoMessage() {} func (x *ChatMutation) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[22] + mi := &file_plugin_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1716,7 +1532,7 @@ func (x *ChatMutation) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatMutation.ProtoReflect.Descriptor instead. func (*ChatMutation) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{22} + return file_plugin_proto_rawDescGZIP(), []int{16} } func (x *ChatMutation) GetMessage() string { @@ -1738,7 +1554,7 @@ type BlockBreakMutation struct { func (x *BlockBreakMutation) Reset() { *x = BlockBreakMutation{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[23] + mi := &file_plugin_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1751,7 +1567,7 @@ func (x *BlockBreakMutation) String() string { func (*BlockBreakMutation) ProtoMessage() {} func (x *BlockBreakMutation) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[23] + mi := &file_plugin_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1764,7 +1580,7 @@ func (x *BlockBreakMutation) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockBreakMutation.ProtoReflect.Descriptor instead. func (*BlockBreakMutation) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{23} + return file_plugin_proto_rawDescGZIP(), []int{17} } func (x *BlockBreakMutation) GetDrops() []*ItemStack { @@ -1794,7 +1610,7 @@ type ItemStack struct { func (x *ItemStack) Reset() { *x = ItemStack{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[24] + mi := &file_plugin_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1807,7 +1623,7 @@ func (x *ItemStack) String() string { func (*ItemStack) ProtoMessage() {} func (x *ItemStack) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[24] + mi := &file_plugin_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1820,7 +1636,7 @@ func (x *ItemStack) ProtoReflect() protoreflect.Message { // Deprecated: Use ItemStack.ProtoReflect.Descriptor instead. func (*ItemStack) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{24} + return file_plugin_proto_rawDescGZIP(), []int{18} } func (x *ItemStack) GetName() string { @@ -1848,218 +1664,264 @@ 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, 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, - 0xa6, 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, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, + 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, 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, 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, + 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, - 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, 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, 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x43, 0x6c, 0x6f, 0x73, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, + 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, 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, 0x28, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 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, 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, 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, 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, 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, + 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, 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, 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, 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, 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, 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, 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, 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, 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, } var ( @@ -2074,68 +1936,71 @@ func file_plugin_proto_rawDescGZIP() []byte { return file_plugin_proto_rawDescData } -var file_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_plugin_proto_goTypes = []interface{}{ - (GameMode)(0), // 0: df.plugin.GameMode - (*HostToPlugin)(nil), // 1: df.plugin.HostToPlugin - (*HostHello)(nil), // 2: df.plugin.HostHello - (*HostShutdown)(nil), // 3: df.plugin.HostShutdown - (*EventEnvelope)(nil), // 4: df.plugin.EventEnvelope - (*PlayerJoinEvent)(nil), // 5: df.plugin.PlayerJoinEvent - (*PlayerQuitEvent)(nil), // 6: df.plugin.PlayerQuitEvent - (*ChatEvent)(nil), // 7: df.plugin.ChatEvent - (*CommandEvent)(nil), // 8: df.plugin.CommandEvent - (*BlockBreakEvent)(nil), // 9: df.plugin.BlockBreakEvent - (*WorldCloseEvent)(nil), // 10: df.plugin.WorldCloseEvent - (*PluginToHost)(nil), // 11: df.plugin.PluginToHost - (*PluginHello)(nil), // 12: df.plugin.PluginHello - (*CommandSpec)(nil), // 13: df.plugin.CommandSpec - (*EventSubscribe)(nil), // 14: df.plugin.EventSubscribe - (*ActionBatch)(nil), // 15: df.plugin.ActionBatch - (*Action)(nil), // 16: df.plugin.Action - (*SendChatAction)(nil), // 17: df.plugin.SendChatAction - (*TeleportAction)(nil), // 18: df.plugin.TeleportAction - (*KickAction)(nil), // 19: df.plugin.KickAction - (*SetGameModeAction)(nil), // 20: df.plugin.SetGameModeAction - (*LogMessage)(nil), // 21: df.plugin.LogMessage - (*EventResult)(nil), // 22: df.plugin.EventResult - (*ChatMutation)(nil), // 23: df.plugin.ChatMutation - (*BlockBreakMutation)(nil), // 24: df.plugin.BlockBreakMutation - (*ItemStack)(nil), // 25: df.plugin.ItemStack + (EventType)(0), // 0: df.plugin.EventType + (GameMode)(0), // 1: df.plugin.GameMode + (*HostToPlugin)(nil), // 2: df.plugin.HostToPlugin + (*HostHello)(nil), // 3: df.plugin.HostHello + (*HostShutdown)(nil), // 4: df.plugin.HostShutdown + (*EventEnvelope)(nil), // 5: df.plugin.EventEnvelope + (*PluginToHost)(nil), // 6: df.plugin.PluginToHost + (*PluginHello)(nil), // 7: df.plugin.PluginHello + (*CommandSpec)(nil), // 8: df.plugin.CommandSpec + (*EventSubscribe)(nil), // 9: df.plugin.EventSubscribe + (*ActionBatch)(nil), // 10: df.plugin.ActionBatch + (*Action)(nil), // 11: df.plugin.Action + (*SendChatAction)(nil), // 12: df.plugin.SendChatAction + (*TeleportAction)(nil), // 13: df.plugin.TeleportAction + (*KickAction)(nil), // 14: df.plugin.KickAction + (*SetGameModeAction)(nil), // 15: df.plugin.SetGameModeAction + (*LogMessage)(nil), // 16: df.plugin.LogMessage + (*EventResult)(nil), // 17: df.plugin.EventResult + (*ChatMutation)(nil), // 18: df.plugin.ChatMutation + (*BlockBreakMutation)(nil), // 19: df.plugin.BlockBreakMutation + (*ItemStack)(nil), // 20: df.plugin.ItemStack + (*PlayerJoinEvent)(nil), // 21: df.plugin.PlayerJoinEvent + (*PlayerQuitEvent)(nil), // 22: df.plugin.PlayerQuitEvent + (*ChatEvent)(nil), // 23: df.plugin.ChatEvent + (*CommandEvent)(nil), // 24: df.plugin.CommandEvent + (*BlockBreakEvent)(nil), // 25: df.plugin.BlockBreakEvent + (*WorldCloseEvent)(nil), // 26: df.plugin.WorldCloseEvent } var file_plugin_proto_depIdxs = []int32{ - 2, // 0: df.plugin.HostToPlugin.hello:type_name -> df.plugin.HostHello - 3, // 1: df.plugin.HostToPlugin.shutdown:type_name -> df.plugin.HostShutdown - 4, // 2: df.plugin.HostToPlugin.event:type_name -> df.plugin.EventEnvelope - 5, // 3: df.plugin.EventEnvelope.player_join:type_name -> df.plugin.PlayerJoinEvent - 6, // 4: df.plugin.EventEnvelope.player_quit:type_name -> df.plugin.PlayerQuitEvent - 7, // 5: df.plugin.EventEnvelope.chat:type_name -> df.plugin.ChatEvent - 8, // 6: df.plugin.EventEnvelope.command:type_name -> df.plugin.CommandEvent - 9, // 7: df.plugin.EventEnvelope.block_break:type_name -> df.plugin.BlockBreakEvent - 10, // 8: df.plugin.EventEnvelope.world_close:type_name -> df.plugin.WorldCloseEvent - 12, // 9: df.plugin.PluginToHost.hello:type_name -> df.plugin.PluginHello - 14, // 10: df.plugin.PluginToHost.subscribe:type_name -> df.plugin.EventSubscribe - 15, // 11: df.plugin.PluginToHost.actions:type_name -> df.plugin.ActionBatch - 21, // 12: df.plugin.PluginToHost.log:type_name -> df.plugin.LogMessage - 22, // 13: df.plugin.PluginToHost.event_result:type_name -> df.plugin.EventResult - 13, // 14: df.plugin.PluginHello.commands:type_name -> df.plugin.CommandSpec - 16, // 15: df.plugin.ActionBatch.actions:type_name -> df.plugin.Action - 17, // 16: df.plugin.Action.send_chat:type_name -> df.plugin.SendChatAction - 18, // 17: df.plugin.Action.teleport:type_name -> df.plugin.TeleportAction - 19, // 18: df.plugin.Action.kick:type_name -> df.plugin.KickAction - 20, // 19: df.plugin.Action.set_game_mode:type_name -> df.plugin.SetGameModeAction - 0, // 20: df.plugin.SetGameModeAction.game_mode:type_name -> df.plugin.GameMode - 23, // 21: df.plugin.EventResult.chat:type_name -> df.plugin.ChatMutation - 24, // 22: df.plugin.EventResult.block_break:type_name -> df.plugin.BlockBreakMutation - 25, // 23: df.plugin.BlockBreakMutation.drops:type_name -> df.plugin.ItemStack - 11, // 24: df.plugin.Plugin.EventStream:input_type -> df.plugin.PluginToHost - 1, // 25: df.plugin.Plugin.EventStream:output_type -> df.plugin.HostToPlugin - 25, // [25:26] is the sub-list for method output_type - 24, // [24:25] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 3, // 0: df.plugin.HostToPlugin.hello:type_name -> df.plugin.HostHello + 4, // 1: df.plugin.HostToPlugin.shutdown:type_name -> df.plugin.HostShutdown + 5, // 2: df.plugin.HostToPlugin.event:type_name -> df.plugin.EventEnvelope + 0, // 3: df.plugin.EventEnvelope.type:type_name -> df.plugin.EventType + 21, // 4: df.plugin.EventEnvelope.player_join:type_name -> df.plugin.PlayerJoinEvent + 22, // 5: df.plugin.EventEnvelope.player_quit:type_name -> df.plugin.PlayerQuitEvent + 23, // 6: df.plugin.EventEnvelope.chat:type_name -> df.plugin.ChatEvent + 24, // 7: df.plugin.EventEnvelope.command:type_name -> df.plugin.CommandEvent + 25, // 8: df.plugin.EventEnvelope.block_break:type_name -> df.plugin.BlockBreakEvent + 26, // 9: df.plugin.EventEnvelope.world_close:type_name -> df.plugin.WorldCloseEvent + 7, // 10: df.plugin.PluginToHost.hello:type_name -> df.plugin.PluginHello + 9, // 11: df.plugin.PluginToHost.subscribe:type_name -> df.plugin.EventSubscribe + 10, // 12: df.plugin.PluginToHost.actions:type_name -> df.plugin.ActionBatch + 16, // 13: df.plugin.PluginToHost.log:type_name -> df.plugin.LogMessage + 17, // 14: df.plugin.PluginToHost.event_result:type_name -> df.plugin.EventResult + 8, // 15: df.plugin.PluginHello.commands:type_name -> df.plugin.CommandSpec + 0, // 16: df.plugin.EventSubscribe.events:type_name -> df.plugin.EventType + 11, // 17: df.plugin.ActionBatch.actions:type_name -> df.plugin.Action + 12, // 18: df.plugin.Action.send_chat:type_name -> df.plugin.SendChatAction + 13, // 19: df.plugin.Action.teleport:type_name -> df.plugin.TeleportAction + 14, // 20: df.plugin.Action.kick:type_name -> df.plugin.KickAction + 15, // 21: df.plugin.Action.set_game_mode:type_name -> df.plugin.SetGameModeAction + 1, // 22: df.plugin.SetGameModeAction.game_mode:type_name -> df.plugin.GameMode + 18, // 23: df.plugin.EventResult.chat:type_name -> df.plugin.ChatMutation + 19, // 24: df.plugin.EventResult.block_break:type_name -> df.plugin.BlockBreakMutation + 20, // 25: df.plugin.BlockBreakMutation.drops:type_name -> df.plugin.ItemStack + 6, // 26: df.plugin.Plugin.EventStream:input_type -> df.plugin.PluginToHost + 2, // 27: df.plugin.Plugin.EventStream:output_type -> df.plugin.HostToPlugin + 27, // [27:28] is the sub-list for method output_type + 26, // [26:27] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_plugin_proto_init() } @@ -2143,6 +2008,8 @@ func file_plugin_proto_init() { if File_plugin_proto != nil { return } + file_player_events_proto_init() + file_world_events_proto_init() if !protoimpl.UnsafeEnabled { file_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HostToPlugin); i { @@ -2193,78 +2060,6 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[4].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_plugin_proto_msgTypes[5].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_plugin_proto_msgTypes[6].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_plugin_proto_msgTypes[7].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_plugin_proto_msgTypes[8].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_plugin_proto_msgTypes[9].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_plugin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PluginToHost); i { case 0: return &v.state @@ -2276,7 +2071,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PluginHello); i { case 0: return &v.state @@ -2288,7 +2083,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommandSpec); i { case 0: return &v.state @@ -2300,7 +2095,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventSubscribe); i { case 0: return &v.state @@ -2312,7 +2107,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionBatch); i { case 0: return &v.state @@ -2324,7 +2119,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Action); i { case 0: return &v.state @@ -2336,7 +2131,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SendChatAction); i { case 0: return &v.state @@ -2348,7 +2143,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TeleportAction); i { case 0: return &v.state @@ -2360,7 +2155,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KickAction); i { case 0: return &v.state @@ -2372,7 +2167,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetGameModeAction); i { case 0: return &v.state @@ -2384,7 +2179,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LogMessage); i { case 0: return &v.state @@ -2396,7 +2191,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventResult); i { case 0: return &v.state @@ -2408,7 +2203,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChatMutation); i { case 0: return &v.state @@ -2420,7 +2215,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockBreakMutation); i { case 0: return &v.state @@ -2432,7 +2227,7 @@ func file_plugin_proto_init() { return nil } } - file_plugin_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_plugin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ItemStack); i { case 0: return &v.state @@ -2458,31 +2253,31 @@ func file_plugin_proto_init() { (*EventEnvelope_BlockBreak)(nil), (*EventEnvelope_WorldClose)(nil), } - file_plugin_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[4].OneofWrappers = []interface{}{ (*PluginToHost_Hello)(nil), (*PluginToHost_Subscribe)(nil), (*PluginToHost_Actions)(nil), (*PluginToHost_Log)(nil), (*PluginToHost_EventResult)(nil), } - file_plugin_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[9].OneofWrappers = []interface{}{ (*Action_SendChat)(nil), (*Action_Teleport)(nil), (*Action_Kick)(nil), (*Action_SetGameMode)(nil), } - file_plugin_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[15].OneofWrappers = []interface{}{ (*EventResult_Chat)(nil), (*EventResult_BlockBreak)(nil), } - file_plugin_proto_msgTypes[23].OneofWrappers = []interface{}{} + file_plugin_proto_msgTypes[17].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_proto_rawDesc, - NumEnums: 1, - NumMessages: 25, + NumEnums: 2, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/generated/ts/player_events.ts b/proto/generated/ts/player_events.ts new file mode 100644 index 0000000..498882a --- /dev/null +++ b/proto/generated/ts/player_events.ts @@ -0,0 +1,575 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc unknown +// source: player_events.proto + +/* eslint-disable */ +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; + +export const protobufPackage = "df.plugin"; + +export interface PlayerJoinEvent { + playerUuid: string; + name: string; +} + +export interface PlayerQuitEvent { + playerUuid: string; + name: string; +} + +export interface ChatEvent { + playerUuid: string; + name: string; + message: string; +} + +export interface CommandEvent { + playerUuid: string; + name: string; + /** Full command string like "/tp 100 64 200" */ + raw: string; + /** Just the command name like "tp" */ + command: string; + /** Parsed arguments like ["100", "64", "200"] */ + args: string[]; +} + +export interface BlockBreakEvent { + playerUuid: string; + name: string; + world: string; + x: number; + y: number; + z: number; +} + +function createBasePlayerJoinEvent(): PlayerJoinEvent { + return { playerUuid: "", name: "" }; +} + +export const PlayerJoinEvent: MessageFns = { + encode(message: PlayerJoinEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.playerUuid !== "") { + writer.uint32(10).string(message.playerUuid); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): PlayerJoinEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePlayerJoinEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.playerUuid = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): PlayerJoinEvent { + return { + playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + }; + }, + + toJSON(message: PlayerJoinEvent): unknown { + const obj: any = {}; + if (message.playerUuid !== "") { + obj.playerUuid = message.playerUuid; + } + if (message.name !== "") { + obj.name = message.name; + } + return obj; + }, + + create(base?: DeepPartial): PlayerJoinEvent { + return PlayerJoinEvent.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): PlayerJoinEvent { + const message = createBasePlayerJoinEvent(); + message.playerUuid = object.playerUuid ?? ""; + message.name = object.name ?? ""; + return message; + }, +}; + +function createBasePlayerQuitEvent(): PlayerQuitEvent { + return { playerUuid: "", name: "" }; +} + +export const PlayerQuitEvent: MessageFns = { + encode(message: PlayerQuitEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.playerUuid !== "") { + writer.uint32(10).string(message.playerUuid); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): PlayerQuitEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePlayerQuitEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.playerUuid = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): PlayerQuitEvent { + return { + playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + }; + }, + + toJSON(message: PlayerQuitEvent): unknown { + const obj: any = {}; + if (message.playerUuid !== "") { + obj.playerUuid = message.playerUuid; + } + if (message.name !== "") { + obj.name = message.name; + } + return obj; + }, + + create(base?: DeepPartial): PlayerQuitEvent { + return PlayerQuitEvent.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): PlayerQuitEvent { + const message = createBasePlayerQuitEvent(); + message.playerUuid = object.playerUuid ?? ""; + message.name = object.name ?? ""; + return message; + }, +}; + +function createBaseChatEvent(): ChatEvent { + return { playerUuid: "", name: "", message: "" }; +} + +export const ChatEvent: MessageFns = { + encode(message: ChatEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.playerUuid !== "") { + writer.uint32(10).string(message.playerUuid); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.message !== "") { + writer.uint32(26).string(message.message); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ChatEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseChatEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.playerUuid = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.message = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ChatEvent { + return { + playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + message: isSet(object.message) ? globalThis.String(object.message) : "", + }; + }, + + toJSON(message: ChatEvent): unknown { + const obj: any = {}; + if (message.playerUuid !== "") { + obj.playerUuid = message.playerUuid; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.message !== "") { + obj.message = message.message; + } + return obj; + }, + + create(base?: DeepPartial): ChatEvent { + return ChatEvent.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ChatEvent { + const message = createBaseChatEvent(); + message.playerUuid = object.playerUuid ?? ""; + message.name = object.name ?? ""; + message.message = object.message ?? ""; + return message; + }, +}; + +function createBaseCommandEvent(): CommandEvent { + return { playerUuid: "", name: "", raw: "", command: "", args: [] }; +} + +export const CommandEvent: MessageFns = { + encode(message: CommandEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.playerUuid !== "") { + writer.uint32(10).string(message.playerUuid); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.raw !== "") { + writer.uint32(26).string(message.raw); + } + if (message.command !== "") { + writer.uint32(34).string(message.command); + } + for (const v of message.args) { + writer.uint32(42).string(v!); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): CommandEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCommandEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.playerUuid = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.raw = reader.string(); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + message.command = reader.string(); + continue; + } + case 5: { + if (tag !== 42) { + break; + } + + message.args.push(reader.string()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): CommandEvent { + return { + playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + raw: isSet(object.raw) ? globalThis.String(object.raw) : "", + command: isSet(object.command) ? globalThis.String(object.command) : "", + args: globalThis.Array.isArray(object?.args) ? object.args.map((e: any) => globalThis.String(e)) : [], + }; + }, + + toJSON(message: CommandEvent): unknown { + const obj: any = {}; + if (message.playerUuid !== "") { + obj.playerUuid = message.playerUuid; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.raw !== "") { + obj.raw = message.raw; + } + if (message.command !== "") { + obj.command = message.command; + } + if (message.args?.length) { + obj.args = message.args; + } + return obj; + }, + + create(base?: DeepPartial): CommandEvent { + return CommandEvent.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CommandEvent { + const message = createBaseCommandEvent(); + message.playerUuid = object.playerUuid ?? ""; + message.name = object.name ?? ""; + message.raw = object.raw ?? ""; + message.command = object.command ?? ""; + message.args = object.args?.map((e) => e) || []; + return message; + }, +}; + +function createBaseBlockBreakEvent(): BlockBreakEvent { + return { playerUuid: "", name: "", world: "", x: 0, y: 0, z: 0 }; +} + +export const BlockBreakEvent: MessageFns = { + encode(message: BlockBreakEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.playerUuid !== "") { + writer.uint32(10).string(message.playerUuid); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.world !== "") { + writer.uint32(26).string(message.world); + } + if (message.x !== 0) { + writer.uint32(32).int32(message.x); + } + if (message.y !== 0) { + writer.uint32(40).int32(message.y); + } + if (message.z !== 0) { + writer.uint32(48).int32(message.z); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): BlockBreakEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBlockBreakEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.playerUuid = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.world = reader.string(); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.x = reader.int32(); + continue; + } + case 5: { + if (tag !== 40) { + break; + } + + message.y = reader.int32(); + continue; + } + case 6: { + if (tag !== 48) { + break; + } + + message.z = reader.int32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): BlockBreakEvent { + return { + playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + world: isSet(object.world) ? globalThis.String(object.world) : "", + x: isSet(object.x) ? globalThis.Number(object.x) : 0, + y: isSet(object.y) ? globalThis.Number(object.y) : 0, + z: isSet(object.z) ? globalThis.Number(object.z) : 0, + }; + }, + + toJSON(message: BlockBreakEvent): unknown { + const obj: any = {}; + if (message.playerUuid !== "") { + obj.playerUuid = message.playerUuid; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.world !== "") { + obj.world = message.world; + } + if (message.x !== 0) { + obj.x = Math.round(message.x); + } + if (message.y !== 0) { + obj.y = Math.round(message.y); + } + if (message.z !== 0) { + obj.z = Math.round(message.z); + } + return obj; + }, + + create(base?: DeepPartial): BlockBreakEvent { + return BlockBreakEvent.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): BlockBreakEvent { + const message = createBaseBlockBreakEvent(); + message.playerUuid = object.playerUuid ?? ""; + message.name = object.name ?? ""; + message.world = object.world ?? ""; + message.x = object.x ?? 0; + message.y = object.y ?? 0; + message.z = object.z ?? 0; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create(base?: DeepPartial): T; + fromPartial(object: DeepPartial): T; +} diff --git a/proto/generated/ts/plugin.d.ts b/proto/generated/ts/plugin.d.ts index 7b42d35..51dad49 100644 --- a/proto/generated/ts/plugin.d.ts +++ b/proto/generated/ts/plugin.d.ts @@ -1,5 +1,61 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export declare const protobufPackage = "df.plugin"; +export declare enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + EVENT_TYPE_ALL = 1, + PLAYER_JOIN = 10, + PLAYER_QUIT = 11, + PLAYER_MOVE = 12, + PLAYER_JUMP = 13, + PLAYER_TELEPORT = 14, + PLAYER_CHANGE_WORLD = 15, + PLAYER_TOGGLE_SPRINT = 16, + PLAYER_TOGGLE_SNEAK = 17, + CHAT = 18, + PLAYER_FOOD_LOSS = 19, + PLAYER_HEAL = 20, + PLAYER_HURT = 21, + PLAYER_DEATH = 22, + PLAYER_RESPAWN = 23, + PLAYER_SKIN_CHANGE = 24, + PLAYER_FIRE_EXTINGUISH = 25, + PLAYER_START_BREAK = 26, + PLAYER_BLOCK_BREAK = 27, + PLAYER_BLOCK_PLACE = 28, + PLAYER_BLOCK_PICK = 29, + PLAYER_ITEM_USE = 30, + PLAYER_ITEM_USE_ON_BLOCK = 31, + PLAYER_ITEM_USE_ON_ENTITY = 32, + PLAYER_ITEM_RELEASE = 33, + PLAYER_ITEM_CONSUME = 34, + PLAYER_ATTACK_ENTITY = 35, + PLAYER_EXPERIENCE_GAIN = 36, + PLAYER_PUNCH_AIR = 37, + PLAYER_SIGN_EDIT = 38, + PLAYER_LECTERN_PAGE_TURN = 39, + PLAYER_ITEM_DAMAGE = 40, + PLAYER_ITEM_PICKUP = 41, + PLAYER_HELD_SLOT_CHANGE = 42, + PLAYER_ITEM_DROP = 43, + PLAYER_TRANSFER = 44, + COMMAND = 45, + PLAYER_DIAGNOSTICS = 46, + WORLD_LIQUID_FLOW = 70, + WORLD_LIQUID_DECAY = 71, + WORLD_LIQUID_HARDEN = 72, + WORLD_SOUND = 73, + WORLD_FIRE_SPREAD = 74, + WORLD_BLOCK_BURN = 75, + WORLD_CROP_TRAMPLE = 76, + WORLD_LEAVES_DECAY = 77, + WORLD_ENTITY_SPAWN = 78, + WORLD_ENTITY_DESPAWN = 79, + WORLD_EXPLOSION = 80, + WORLD_CLOSE = 81, + UNRECOGNIZED = -1 +} +export declare function eventTypeFromJSON(object: any): EventType; +export declare function eventTypeToJSON(object: EventType): string; export declare enum GameMode { SURVIVAL = 0, CREATIVE = 1, @@ -23,7 +79,7 @@ export interface HostShutdown { } export interface EventEnvelope { eventId: string; - type: string; + type: EventType; playerJoin?: PlayerJoinEvent | undefined; playerQuit?: PlayerQuitEvent | undefined; chat?: ChatEvent | undefined; @@ -84,7 +140,7 @@ export interface CommandSpec { aliases: string[]; } export interface EventSubscribe { - events: string[]; + events: EventType[]; } export interface ActionBatch { actions: Action[]; diff --git a/proto/generated/ts/plugin.js b/proto/generated/ts/plugin.js index 2c86b96..d40a46e 100644 --- a/proto/generated/ts/plugin.js +++ b/proto/generated/ts/plugin.js @@ -6,6 +6,331 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "df.plugin"; +export var EventType; +(function (EventType) { + EventType[EventType["EVENT_TYPE_UNSPECIFIED"] = 0] = "EVENT_TYPE_UNSPECIFIED"; + EventType[EventType["EVENT_TYPE_ALL"] = 1] = "EVENT_TYPE_ALL"; + EventType[EventType["PLAYER_JOIN"] = 10] = "PLAYER_JOIN"; + EventType[EventType["PLAYER_QUIT"] = 11] = "PLAYER_QUIT"; + EventType[EventType["PLAYER_MOVE"] = 12] = "PLAYER_MOVE"; + EventType[EventType["PLAYER_JUMP"] = 13] = "PLAYER_JUMP"; + EventType[EventType["PLAYER_TELEPORT"] = 14] = "PLAYER_TELEPORT"; + EventType[EventType["PLAYER_CHANGE_WORLD"] = 15] = "PLAYER_CHANGE_WORLD"; + EventType[EventType["PLAYER_TOGGLE_SPRINT"] = 16] = "PLAYER_TOGGLE_SPRINT"; + EventType[EventType["PLAYER_TOGGLE_SNEAK"] = 17] = "PLAYER_TOGGLE_SNEAK"; + EventType[EventType["CHAT"] = 18] = "CHAT"; + EventType[EventType["PLAYER_FOOD_LOSS"] = 19] = "PLAYER_FOOD_LOSS"; + EventType[EventType["PLAYER_HEAL"] = 20] = "PLAYER_HEAL"; + EventType[EventType["PLAYER_HURT"] = 21] = "PLAYER_HURT"; + EventType[EventType["PLAYER_DEATH"] = 22] = "PLAYER_DEATH"; + EventType[EventType["PLAYER_RESPAWN"] = 23] = "PLAYER_RESPAWN"; + EventType[EventType["PLAYER_SKIN_CHANGE"] = 24] = "PLAYER_SKIN_CHANGE"; + EventType[EventType["PLAYER_FIRE_EXTINGUISH"] = 25] = "PLAYER_FIRE_EXTINGUISH"; + EventType[EventType["PLAYER_START_BREAK"] = 26] = "PLAYER_START_BREAK"; + EventType[EventType["PLAYER_BLOCK_BREAK"] = 27] = "PLAYER_BLOCK_BREAK"; + EventType[EventType["PLAYER_BLOCK_PLACE"] = 28] = "PLAYER_BLOCK_PLACE"; + EventType[EventType["PLAYER_BLOCK_PICK"] = 29] = "PLAYER_BLOCK_PICK"; + EventType[EventType["PLAYER_ITEM_USE"] = 30] = "PLAYER_ITEM_USE"; + EventType[EventType["PLAYER_ITEM_USE_ON_BLOCK"] = 31] = "PLAYER_ITEM_USE_ON_BLOCK"; + EventType[EventType["PLAYER_ITEM_USE_ON_ENTITY"] = 32] = "PLAYER_ITEM_USE_ON_ENTITY"; + EventType[EventType["PLAYER_ITEM_RELEASE"] = 33] = "PLAYER_ITEM_RELEASE"; + EventType[EventType["PLAYER_ITEM_CONSUME"] = 34] = "PLAYER_ITEM_CONSUME"; + EventType[EventType["PLAYER_ATTACK_ENTITY"] = 35] = "PLAYER_ATTACK_ENTITY"; + EventType[EventType["PLAYER_EXPERIENCE_GAIN"] = 36] = "PLAYER_EXPERIENCE_GAIN"; + EventType[EventType["PLAYER_PUNCH_AIR"] = 37] = "PLAYER_PUNCH_AIR"; + EventType[EventType["PLAYER_SIGN_EDIT"] = 38] = "PLAYER_SIGN_EDIT"; + EventType[EventType["PLAYER_LECTERN_PAGE_TURN"] = 39] = "PLAYER_LECTERN_PAGE_TURN"; + EventType[EventType["PLAYER_ITEM_DAMAGE"] = 40] = "PLAYER_ITEM_DAMAGE"; + EventType[EventType["PLAYER_ITEM_PICKUP"] = 41] = "PLAYER_ITEM_PICKUP"; + EventType[EventType["PLAYER_HELD_SLOT_CHANGE"] = 42] = "PLAYER_HELD_SLOT_CHANGE"; + EventType[EventType["PLAYER_ITEM_DROP"] = 43] = "PLAYER_ITEM_DROP"; + EventType[EventType["PLAYER_TRANSFER"] = 44] = "PLAYER_TRANSFER"; + EventType[EventType["COMMAND"] = 45] = "COMMAND"; + EventType[EventType["PLAYER_DIAGNOSTICS"] = 46] = "PLAYER_DIAGNOSTICS"; + EventType[EventType["WORLD_LIQUID_FLOW"] = 70] = "WORLD_LIQUID_FLOW"; + EventType[EventType["WORLD_LIQUID_DECAY"] = 71] = "WORLD_LIQUID_DECAY"; + EventType[EventType["WORLD_LIQUID_HARDEN"] = 72] = "WORLD_LIQUID_HARDEN"; + EventType[EventType["WORLD_SOUND"] = 73] = "WORLD_SOUND"; + EventType[EventType["WORLD_FIRE_SPREAD"] = 74] = "WORLD_FIRE_SPREAD"; + EventType[EventType["WORLD_BLOCK_BURN"] = 75] = "WORLD_BLOCK_BURN"; + EventType[EventType["WORLD_CROP_TRAMPLE"] = 76] = "WORLD_CROP_TRAMPLE"; + EventType[EventType["WORLD_LEAVES_DECAY"] = 77] = "WORLD_LEAVES_DECAY"; + EventType[EventType["WORLD_ENTITY_SPAWN"] = 78] = "WORLD_ENTITY_SPAWN"; + EventType[EventType["WORLD_ENTITY_DESPAWN"] = 79] = "WORLD_ENTITY_DESPAWN"; + EventType[EventType["WORLD_EXPLOSION"] = 80] = "WORLD_EXPLOSION"; + EventType[EventType["WORLD_CLOSE"] = 81] = "WORLD_CLOSE"; + EventType[EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(EventType || (EventType = {})); +export function eventTypeFromJSON(object) { + switch (object) { + case 0: + case "EVENT_TYPE_UNSPECIFIED": + return EventType.EVENT_TYPE_UNSPECIFIED; + case 1: + case "EVENT_TYPE_ALL": + return EventType.EVENT_TYPE_ALL; + case 10: + case "PLAYER_JOIN": + return EventType.PLAYER_JOIN; + case 11: + case "PLAYER_QUIT": + return EventType.PLAYER_QUIT; + case 12: + case "PLAYER_MOVE": + return EventType.PLAYER_MOVE; + case 13: + case "PLAYER_JUMP": + return EventType.PLAYER_JUMP; + case 14: + case "PLAYER_TELEPORT": + return EventType.PLAYER_TELEPORT; + case 15: + case "PLAYER_CHANGE_WORLD": + return EventType.PLAYER_CHANGE_WORLD; + case 16: + case "PLAYER_TOGGLE_SPRINT": + return EventType.PLAYER_TOGGLE_SPRINT; + case 17: + case "PLAYER_TOGGLE_SNEAK": + return EventType.PLAYER_TOGGLE_SNEAK; + case 18: + case "CHAT": + return EventType.CHAT; + case 19: + case "PLAYER_FOOD_LOSS": + return EventType.PLAYER_FOOD_LOSS; + case 20: + case "PLAYER_HEAL": + return EventType.PLAYER_HEAL; + case 21: + case "PLAYER_HURT": + return EventType.PLAYER_HURT; + case 22: + case "PLAYER_DEATH": + return EventType.PLAYER_DEATH; + case 23: + case "PLAYER_RESPAWN": + return EventType.PLAYER_RESPAWN; + case 24: + case "PLAYER_SKIN_CHANGE": + return EventType.PLAYER_SKIN_CHANGE; + case 25: + case "PLAYER_FIRE_EXTINGUISH": + return EventType.PLAYER_FIRE_EXTINGUISH; + case 26: + case "PLAYER_START_BREAK": + return EventType.PLAYER_START_BREAK; + case 27: + case "PLAYER_BLOCK_BREAK": + return EventType.PLAYER_BLOCK_BREAK; + case 28: + case "PLAYER_BLOCK_PLACE": + return EventType.PLAYER_BLOCK_PLACE; + case 29: + case "PLAYER_BLOCK_PICK": + return EventType.PLAYER_BLOCK_PICK; + case 30: + case "PLAYER_ITEM_USE": + return EventType.PLAYER_ITEM_USE; + case 31: + case "PLAYER_ITEM_USE_ON_BLOCK": + return EventType.PLAYER_ITEM_USE_ON_BLOCK; + case 32: + case "PLAYER_ITEM_USE_ON_ENTITY": + return EventType.PLAYER_ITEM_USE_ON_ENTITY; + case 33: + case "PLAYER_ITEM_RELEASE": + return EventType.PLAYER_ITEM_RELEASE; + case 34: + case "PLAYER_ITEM_CONSUME": + return EventType.PLAYER_ITEM_CONSUME; + case 35: + case "PLAYER_ATTACK_ENTITY": + return EventType.PLAYER_ATTACK_ENTITY; + case 36: + case "PLAYER_EXPERIENCE_GAIN": + return EventType.PLAYER_EXPERIENCE_GAIN; + case 37: + case "PLAYER_PUNCH_AIR": + return EventType.PLAYER_PUNCH_AIR; + case 38: + case "PLAYER_SIGN_EDIT": + return EventType.PLAYER_SIGN_EDIT; + case 39: + case "PLAYER_LECTERN_PAGE_TURN": + return EventType.PLAYER_LECTERN_PAGE_TURN; + case 40: + case "PLAYER_ITEM_DAMAGE": + return EventType.PLAYER_ITEM_DAMAGE; + case 41: + case "PLAYER_ITEM_PICKUP": + return EventType.PLAYER_ITEM_PICKUP; + case 42: + case "PLAYER_HELD_SLOT_CHANGE": + return EventType.PLAYER_HELD_SLOT_CHANGE; + case 43: + case "PLAYER_ITEM_DROP": + return EventType.PLAYER_ITEM_DROP; + case 44: + case "PLAYER_TRANSFER": + return EventType.PLAYER_TRANSFER; + case 45: + case "COMMAND": + return EventType.COMMAND; + case 46: + case "PLAYER_DIAGNOSTICS": + return EventType.PLAYER_DIAGNOSTICS; + case 70: + case "WORLD_LIQUID_FLOW": + return EventType.WORLD_LIQUID_FLOW; + case 71: + case "WORLD_LIQUID_DECAY": + return EventType.WORLD_LIQUID_DECAY; + case 72: + case "WORLD_LIQUID_HARDEN": + return EventType.WORLD_LIQUID_HARDEN; + case 73: + case "WORLD_SOUND": + return EventType.WORLD_SOUND; + case 74: + case "WORLD_FIRE_SPREAD": + return EventType.WORLD_FIRE_SPREAD; + case 75: + case "WORLD_BLOCK_BURN": + return EventType.WORLD_BLOCK_BURN; + case 76: + case "WORLD_CROP_TRAMPLE": + return EventType.WORLD_CROP_TRAMPLE; + case 77: + case "WORLD_LEAVES_DECAY": + return EventType.WORLD_LEAVES_DECAY; + case 78: + case "WORLD_ENTITY_SPAWN": + return EventType.WORLD_ENTITY_SPAWN; + case 79: + case "WORLD_ENTITY_DESPAWN": + return EventType.WORLD_ENTITY_DESPAWN; + case 80: + case "WORLD_EXPLOSION": + return EventType.WORLD_EXPLOSION; + case 81: + case "WORLD_CLOSE": + return EventType.WORLD_CLOSE; + case -1: + case "UNRECOGNIZED": + default: + return EventType.UNRECOGNIZED; + } +} +export function eventTypeToJSON(object) { + switch (object) { + case EventType.EVENT_TYPE_UNSPECIFIED: + return "EVENT_TYPE_UNSPECIFIED"; + case EventType.EVENT_TYPE_ALL: + return "EVENT_TYPE_ALL"; + case EventType.PLAYER_JOIN: + return "PLAYER_JOIN"; + case EventType.PLAYER_QUIT: + return "PLAYER_QUIT"; + case EventType.PLAYER_MOVE: + return "PLAYER_MOVE"; + case EventType.PLAYER_JUMP: + return "PLAYER_JUMP"; + case EventType.PLAYER_TELEPORT: + return "PLAYER_TELEPORT"; + case EventType.PLAYER_CHANGE_WORLD: + return "PLAYER_CHANGE_WORLD"; + case EventType.PLAYER_TOGGLE_SPRINT: + return "PLAYER_TOGGLE_SPRINT"; + case EventType.PLAYER_TOGGLE_SNEAK: + return "PLAYER_TOGGLE_SNEAK"; + case EventType.CHAT: + return "CHAT"; + case EventType.PLAYER_FOOD_LOSS: + return "PLAYER_FOOD_LOSS"; + case EventType.PLAYER_HEAL: + return "PLAYER_HEAL"; + case EventType.PLAYER_HURT: + return "PLAYER_HURT"; + case EventType.PLAYER_DEATH: + return "PLAYER_DEATH"; + case EventType.PLAYER_RESPAWN: + return "PLAYER_RESPAWN"; + case EventType.PLAYER_SKIN_CHANGE: + return "PLAYER_SKIN_CHANGE"; + case EventType.PLAYER_FIRE_EXTINGUISH: + return "PLAYER_FIRE_EXTINGUISH"; + case EventType.PLAYER_START_BREAK: + return "PLAYER_START_BREAK"; + case EventType.PLAYER_BLOCK_BREAK: + return "PLAYER_BLOCK_BREAK"; + case EventType.PLAYER_BLOCK_PLACE: + return "PLAYER_BLOCK_PLACE"; + case EventType.PLAYER_BLOCK_PICK: + return "PLAYER_BLOCK_PICK"; + case EventType.PLAYER_ITEM_USE: + return "PLAYER_ITEM_USE"; + case EventType.PLAYER_ITEM_USE_ON_BLOCK: + return "PLAYER_ITEM_USE_ON_BLOCK"; + case EventType.PLAYER_ITEM_USE_ON_ENTITY: + return "PLAYER_ITEM_USE_ON_ENTITY"; + case EventType.PLAYER_ITEM_RELEASE: + return "PLAYER_ITEM_RELEASE"; + case EventType.PLAYER_ITEM_CONSUME: + return "PLAYER_ITEM_CONSUME"; + case EventType.PLAYER_ATTACK_ENTITY: + return "PLAYER_ATTACK_ENTITY"; + case EventType.PLAYER_EXPERIENCE_GAIN: + return "PLAYER_EXPERIENCE_GAIN"; + case EventType.PLAYER_PUNCH_AIR: + return "PLAYER_PUNCH_AIR"; + case EventType.PLAYER_SIGN_EDIT: + return "PLAYER_SIGN_EDIT"; + case EventType.PLAYER_LECTERN_PAGE_TURN: + return "PLAYER_LECTERN_PAGE_TURN"; + case EventType.PLAYER_ITEM_DAMAGE: + return "PLAYER_ITEM_DAMAGE"; + case EventType.PLAYER_ITEM_PICKUP: + return "PLAYER_ITEM_PICKUP"; + case EventType.PLAYER_HELD_SLOT_CHANGE: + return "PLAYER_HELD_SLOT_CHANGE"; + case EventType.PLAYER_ITEM_DROP: + return "PLAYER_ITEM_DROP"; + case EventType.PLAYER_TRANSFER: + return "PLAYER_TRANSFER"; + case EventType.COMMAND: + return "COMMAND"; + case EventType.PLAYER_DIAGNOSTICS: + return "PLAYER_DIAGNOSTICS"; + case EventType.WORLD_LIQUID_FLOW: + return "WORLD_LIQUID_FLOW"; + case EventType.WORLD_LIQUID_DECAY: + return "WORLD_LIQUID_DECAY"; + case EventType.WORLD_LIQUID_HARDEN: + return "WORLD_LIQUID_HARDEN"; + case EventType.WORLD_SOUND: + return "WORLD_SOUND"; + case EventType.WORLD_FIRE_SPREAD: + return "WORLD_FIRE_SPREAD"; + case EventType.WORLD_BLOCK_BURN: + return "WORLD_BLOCK_BURN"; + case EventType.WORLD_CROP_TRAMPLE: + return "WORLD_CROP_TRAMPLE"; + case EventType.WORLD_LEAVES_DECAY: + return "WORLD_LEAVES_DECAY"; + case EventType.WORLD_ENTITY_SPAWN: + return "WORLD_ENTITY_SPAWN"; + case EventType.WORLD_ENTITY_DESPAWN: + return "WORLD_ENTITY_DESPAWN"; + case EventType.WORLD_EXPLOSION: + return "WORLD_EXPLOSION"; + case EventType.WORLD_CLOSE: + return "WORLD_CLOSE"; + case EventType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} export var GameMode; (function (GameMode) { GameMode[GameMode["SURVIVAL"] = 0] = "SURVIVAL"; @@ -258,7 +583,7 @@ export const HostShutdown = { function createBaseEventEnvelope() { return { eventId: "", - type: "", + type: 0, playerJoin: undefined, playerQuit: undefined, chat: undefined, @@ -272,8 +597,8 @@ export const EventEnvelope = { if (message.eventId !== "") { writer.uint32(10).string(message.eventId); } - if (message.type !== "") { - writer.uint32(18).string(message.type); + if (message.type !== 0) { + writer.uint32(16).int32(message.type); } if (message.playerJoin !== undefined) { PlayerJoinEvent.encode(message.playerJoin, writer.uint32(82).fork()).join(); @@ -310,10 +635,10 @@ export const EventEnvelope = { continue; } case 2: { - if (tag !== 18) { + if (tag !== 16) { break; } - message.type = reader.string(); + message.type = reader.int32(); continue; } case 10: { @@ -369,7 +694,7 @@ export const EventEnvelope = { fromJSON(object) { return { eventId: isSet(object.eventId) ? globalThis.String(object.eventId) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", + type: isSet(object.type) ? eventTypeFromJSON(object.type) : 0, playerJoin: isSet(object.playerJoin) ? PlayerJoinEvent.fromJSON(object.playerJoin) : undefined, playerQuit: isSet(object.playerQuit) ? PlayerQuitEvent.fromJSON(object.playerQuit) : undefined, chat: isSet(object.chat) ? ChatEvent.fromJSON(object.chat) : undefined, @@ -383,8 +708,8 @@ export const EventEnvelope = { if (message.eventId !== "") { obj.eventId = message.eventId; } - if (message.type !== "") { - obj.type = message.type; + if (message.type !== 0) { + obj.type = eventTypeToJSON(message.type); } if (message.playerJoin !== undefined) { obj.playerJoin = PlayerJoinEvent.toJSON(message.playerJoin); @@ -412,7 +737,7 @@ export const EventEnvelope = { fromPartial(object) { const message = createBaseEventEnvelope(); message.eventId = object.eventId ?? ""; - message.type = object.type ?? ""; + message.type = object.type ?? 0; message.playerJoin = (object.playerJoin !== undefined && object.playerJoin !== null) ? PlayerJoinEvent.fromPartial(object.playerJoin) : undefined; @@ -1260,8 +1585,12 @@ function createBaseEventSubscribe() { } export const EventSubscribe = { encode(message, writer = new BinaryWriter()) { - for (const v of message.events) { - writer.uint32(10).string(v); + if (message.events.length !== 0) { + writer.uint32(10).fork(); + for (const v of message.events) { + writer.int32(v); + } + writer.join(); } return writer; }, @@ -1273,11 +1602,18 @@ export const EventSubscribe = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (tag !== 10) { - break; + if (tag === 8) { + message.events.push(reader.int32()); + continue; } - message.events.push(reader.string()); - continue; + if (tag === 10) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.events.push(reader.int32()); + } + continue; + } + break; } } if ((tag & 7) === 4 || tag === 0) { @@ -1289,13 +1625,13 @@ export const EventSubscribe = { }, fromJSON(object) { return { - events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => globalThis.String(e)) : [], + events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => eventTypeFromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; if (message.events?.length) { - obj.events = message.events; + obj.events = message.events.map((e) => eventTypeToJSON(e)); } return obj; }, diff --git a/proto/generated/ts/plugin.ts b/proto/generated/ts/plugin.ts index 49812ad..a419573 100644 --- a/proto/generated/ts/plugin.ts +++ b/proto/generated/ts/plugin.ts @@ -6,9 +6,338 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; +import { BlockBreakEvent, ChatEvent, CommandEvent, PlayerJoinEvent, PlayerQuitEvent } from "./player_events"; +import { WorldCloseEvent } from "./world_events"; export const protobufPackage = "df.plugin"; +export enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + EVENT_TYPE_ALL = 1, + PLAYER_JOIN = 10, + PLAYER_QUIT = 11, + PLAYER_MOVE = 12, + PLAYER_JUMP = 13, + PLAYER_TELEPORT = 14, + PLAYER_CHANGE_WORLD = 15, + PLAYER_TOGGLE_SPRINT = 16, + PLAYER_TOGGLE_SNEAK = 17, + CHAT = 18, + PLAYER_FOOD_LOSS = 19, + PLAYER_HEAL = 20, + PLAYER_HURT = 21, + PLAYER_DEATH = 22, + PLAYER_RESPAWN = 23, + PLAYER_SKIN_CHANGE = 24, + PLAYER_FIRE_EXTINGUISH = 25, + PLAYER_START_BREAK = 26, + PLAYER_BLOCK_BREAK = 27, + PLAYER_BLOCK_PLACE = 28, + PLAYER_BLOCK_PICK = 29, + PLAYER_ITEM_USE = 30, + PLAYER_ITEM_USE_ON_BLOCK = 31, + PLAYER_ITEM_USE_ON_ENTITY = 32, + PLAYER_ITEM_RELEASE = 33, + PLAYER_ITEM_CONSUME = 34, + PLAYER_ATTACK_ENTITY = 35, + PLAYER_EXPERIENCE_GAIN = 36, + PLAYER_PUNCH_AIR = 37, + PLAYER_SIGN_EDIT = 38, + PLAYER_LECTERN_PAGE_TURN = 39, + PLAYER_ITEM_DAMAGE = 40, + PLAYER_ITEM_PICKUP = 41, + PLAYER_HELD_SLOT_CHANGE = 42, + PLAYER_ITEM_DROP = 43, + PLAYER_TRANSFER = 44, + COMMAND = 45, + PLAYER_DIAGNOSTICS = 46, + WORLD_LIQUID_FLOW = 70, + WORLD_LIQUID_DECAY = 71, + WORLD_LIQUID_HARDEN = 72, + WORLD_SOUND = 73, + WORLD_FIRE_SPREAD = 74, + WORLD_BLOCK_BURN = 75, + WORLD_CROP_TRAMPLE = 76, + WORLD_LEAVES_DECAY = 77, + WORLD_ENTITY_SPAWN = 78, + WORLD_ENTITY_DESPAWN = 79, + WORLD_EXPLOSION = 80, + WORLD_CLOSE = 81, + UNRECOGNIZED = -1, +} + +export function eventTypeFromJSON(object: any): EventType { + switch (object) { + case 0: + case "EVENT_TYPE_UNSPECIFIED": + return EventType.EVENT_TYPE_UNSPECIFIED; + case 1: + case "EVENT_TYPE_ALL": + return EventType.EVENT_TYPE_ALL; + case 10: + case "PLAYER_JOIN": + return EventType.PLAYER_JOIN; + case 11: + case "PLAYER_QUIT": + return EventType.PLAYER_QUIT; + case 12: + case "PLAYER_MOVE": + return EventType.PLAYER_MOVE; + case 13: + case "PLAYER_JUMP": + return EventType.PLAYER_JUMP; + case 14: + case "PLAYER_TELEPORT": + return EventType.PLAYER_TELEPORT; + case 15: + case "PLAYER_CHANGE_WORLD": + return EventType.PLAYER_CHANGE_WORLD; + case 16: + case "PLAYER_TOGGLE_SPRINT": + return EventType.PLAYER_TOGGLE_SPRINT; + case 17: + case "PLAYER_TOGGLE_SNEAK": + return EventType.PLAYER_TOGGLE_SNEAK; + case 18: + case "CHAT": + return EventType.CHAT; + case 19: + case "PLAYER_FOOD_LOSS": + return EventType.PLAYER_FOOD_LOSS; + case 20: + case "PLAYER_HEAL": + return EventType.PLAYER_HEAL; + case 21: + case "PLAYER_HURT": + return EventType.PLAYER_HURT; + case 22: + case "PLAYER_DEATH": + return EventType.PLAYER_DEATH; + case 23: + case "PLAYER_RESPAWN": + return EventType.PLAYER_RESPAWN; + case 24: + case "PLAYER_SKIN_CHANGE": + return EventType.PLAYER_SKIN_CHANGE; + case 25: + case "PLAYER_FIRE_EXTINGUISH": + return EventType.PLAYER_FIRE_EXTINGUISH; + case 26: + case "PLAYER_START_BREAK": + return EventType.PLAYER_START_BREAK; + case 27: + case "PLAYER_BLOCK_BREAK": + return EventType.PLAYER_BLOCK_BREAK; + case 28: + case "PLAYER_BLOCK_PLACE": + return EventType.PLAYER_BLOCK_PLACE; + case 29: + case "PLAYER_BLOCK_PICK": + return EventType.PLAYER_BLOCK_PICK; + case 30: + case "PLAYER_ITEM_USE": + return EventType.PLAYER_ITEM_USE; + case 31: + case "PLAYER_ITEM_USE_ON_BLOCK": + return EventType.PLAYER_ITEM_USE_ON_BLOCK; + case 32: + case "PLAYER_ITEM_USE_ON_ENTITY": + return EventType.PLAYER_ITEM_USE_ON_ENTITY; + case 33: + case "PLAYER_ITEM_RELEASE": + return EventType.PLAYER_ITEM_RELEASE; + case 34: + case "PLAYER_ITEM_CONSUME": + return EventType.PLAYER_ITEM_CONSUME; + case 35: + case "PLAYER_ATTACK_ENTITY": + return EventType.PLAYER_ATTACK_ENTITY; + case 36: + case "PLAYER_EXPERIENCE_GAIN": + return EventType.PLAYER_EXPERIENCE_GAIN; + case 37: + case "PLAYER_PUNCH_AIR": + return EventType.PLAYER_PUNCH_AIR; + case 38: + case "PLAYER_SIGN_EDIT": + return EventType.PLAYER_SIGN_EDIT; + case 39: + case "PLAYER_LECTERN_PAGE_TURN": + return EventType.PLAYER_LECTERN_PAGE_TURN; + case 40: + case "PLAYER_ITEM_DAMAGE": + return EventType.PLAYER_ITEM_DAMAGE; + case 41: + case "PLAYER_ITEM_PICKUP": + return EventType.PLAYER_ITEM_PICKUP; + case 42: + case "PLAYER_HELD_SLOT_CHANGE": + return EventType.PLAYER_HELD_SLOT_CHANGE; + case 43: + case "PLAYER_ITEM_DROP": + return EventType.PLAYER_ITEM_DROP; + case 44: + case "PLAYER_TRANSFER": + return EventType.PLAYER_TRANSFER; + case 45: + case "COMMAND": + return EventType.COMMAND; + case 46: + case "PLAYER_DIAGNOSTICS": + return EventType.PLAYER_DIAGNOSTICS; + case 70: + case "WORLD_LIQUID_FLOW": + return EventType.WORLD_LIQUID_FLOW; + case 71: + case "WORLD_LIQUID_DECAY": + return EventType.WORLD_LIQUID_DECAY; + case 72: + case "WORLD_LIQUID_HARDEN": + return EventType.WORLD_LIQUID_HARDEN; + case 73: + case "WORLD_SOUND": + return EventType.WORLD_SOUND; + case 74: + case "WORLD_FIRE_SPREAD": + return EventType.WORLD_FIRE_SPREAD; + case 75: + case "WORLD_BLOCK_BURN": + return EventType.WORLD_BLOCK_BURN; + case 76: + case "WORLD_CROP_TRAMPLE": + return EventType.WORLD_CROP_TRAMPLE; + case 77: + case "WORLD_LEAVES_DECAY": + return EventType.WORLD_LEAVES_DECAY; + case 78: + case "WORLD_ENTITY_SPAWN": + return EventType.WORLD_ENTITY_SPAWN; + case 79: + case "WORLD_ENTITY_DESPAWN": + return EventType.WORLD_ENTITY_DESPAWN; + case 80: + case "WORLD_EXPLOSION": + return EventType.WORLD_EXPLOSION; + case 81: + case "WORLD_CLOSE": + return EventType.WORLD_CLOSE; + case -1: + case "UNRECOGNIZED": + default: + return EventType.UNRECOGNIZED; + } +} + +export function eventTypeToJSON(object: EventType): string { + switch (object) { + case EventType.EVENT_TYPE_UNSPECIFIED: + return "EVENT_TYPE_UNSPECIFIED"; + case EventType.EVENT_TYPE_ALL: + return "EVENT_TYPE_ALL"; + case EventType.PLAYER_JOIN: + return "PLAYER_JOIN"; + case EventType.PLAYER_QUIT: + return "PLAYER_QUIT"; + case EventType.PLAYER_MOVE: + return "PLAYER_MOVE"; + case EventType.PLAYER_JUMP: + return "PLAYER_JUMP"; + case EventType.PLAYER_TELEPORT: + return "PLAYER_TELEPORT"; + case EventType.PLAYER_CHANGE_WORLD: + return "PLAYER_CHANGE_WORLD"; + case EventType.PLAYER_TOGGLE_SPRINT: + return "PLAYER_TOGGLE_SPRINT"; + case EventType.PLAYER_TOGGLE_SNEAK: + return "PLAYER_TOGGLE_SNEAK"; + case EventType.CHAT: + return "CHAT"; + case EventType.PLAYER_FOOD_LOSS: + return "PLAYER_FOOD_LOSS"; + case EventType.PLAYER_HEAL: + return "PLAYER_HEAL"; + case EventType.PLAYER_HURT: + return "PLAYER_HURT"; + case EventType.PLAYER_DEATH: + return "PLAYER_DEATH"; + case EventType.PLAYER_RESPAWN: + return "PLAYER_RESPAWN"; + case EventType.PLAYER_SKIN_CHANGE: + return "PLAYER_SKIN_CHANGE"; + case EventType.PLAYER_FIRE_EXTINGUISH: + return "PLAYER_FIRE_EXTINGUISH"; + case EventType.PLAYER_START_BREAK: + return "PLAYER_START_BREAK"; + case EventType.PLAYER_BLOCK_BREAK: + return "PLAYER_BLOCK_BREAK"; + case EventType.PLAYER_BLOCK_PLACE: + return "PLAYER_BLOCK_PLACE"; + case EventType.PLAYER_BLOCK_PICK: + return "PLAYER_BLOCK_PICK"; + case EventType.PLAYER_ITEM_USE: + return "PLAYER_ITEM_USE"; + case EventType.PLAYER_ITEM_USE_ON_BLOCK: + return "PLAYER_ITEM_USE_ON_BLOCK"; + case EventType.PLAYER_ITEM_USE_ON_ENTITY: + return "PLAYER_ITEM_USE_ON_ENTITY"; + case EventType.PLAYER_ITEM_RELEASE: + return "PLAYER_ITEM_RELEASE"; + case EventType.PLAYER_ITEM_CONSUME: + return "PLAYER_ITEM_CONSUME"; + case EventType.PLAYER_ATTACK_ENTITY: + return "PLAYER_ATTACK_ENTITY"; + case EventType.PLAYER_EXPERIENCE_GAIN: + return "PLAYER_EXPERIENCE_GAIN"; + case EventType.PLAYER_PUNCH_AIR: + return "PLAYER_PUNCH_AIR"; + case EventType.PLAYER_SIGN_EDIT: + return "PLAYER_SIGN_EDIT"; + case EventType.PLAYER_LECTERN_PAGE_TURN: + return "PLAYER_LECTERN_PAGE_TURN"; + case EventType.PLAYER_ITEM_DAMAGE: + return "PLAYER_ITEM_DAMAGE"; + case EventType.PLAYER_ITEM_PICKUP: + return "PLAYER_ITEM_PICKUP"; + case EventType.PLAYER_HELD_SLOT_CHANGE: + return "PLAYER_HELD_SLOT_CHANGE"; + case EventType.PLAYER_ITEM_DROP: + return "PLAYER_ITEM_DROP"; + case EventType.PLAYER_TRANSFER: + return "PLAYER_TRANSFER"; + case EventType.COMMAND: + return "COMMAND"; + case EventType.PLAYER_DIAGNOSTICS: + return "PLAYER_DIAGNOSTICS"; + case EventType.WORLD_LIQUID_FLOW: + return "WORLD_LIQUID_FLOW"; + case EventType.WORLD_LIQUID_DECAY: + return "WORLD_LIQUID_DECAY"; + case EventType.WORLD_LIQUID_HARDEN: + return "WORLD_LIQUID_HARDEN"; + case EventType.WORLD_SOUND: + return "WORLD_SOUND"; + case EventType.WORLD_FIRE_SPREAD: + return "WORLD_FIRE_SPREAD"; + case EventType.WORLD_BLOCK_BURN: + return "WORLD_BLOCK_BURN"; + case EventType.WORLD_CROP_TRAMPLE: + return "WORLD_CROP_TRAMPLE"; + case EventType.WORLD_LEAVES_DECAY: + return "WORLD_LEAVES_DECAY"; + case EventType.WORLD_ENTITY_SPAWN: + return "WORLD_ENTITY_SPAWN"; + case EventType.WORLD_ENTITY_DESPAWN: + return "WORLD_ENTITY_DESPAWN"; + case EventType.WORLD_EXPLOSION: + return "WORLD_EXPLOSION"; + case EventType.WORLD_CLOSE: + return "WORLD_CLOSE"; + case EventType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + export enum GameMode { SURVIVAL = 0, CREATIVE = 1, @@ -71,7 +400,7 @@ export interface HostShutdown { export interface EventEnvelope { eventId: string; - type: string; + type: EventType; playerJoin?: PlayerJoinEvent | undefined; playerQuit?: PlayerQuitEvent | undefined; chat?: ChatEvent | undefined; @@ -80,45 +409,6 @@ export interface EventEnvelope { worldClose?: WorldCloseEvent | undefined; } -export interface PlayerJoinEvent { - playerUuid: string; - name: string; -} - -export interface PlayerQuitEvent { - playerUuid: string; - name: string; -} - -export interface ChatEvent { - playerUuid: string; - name: string; - message: string; -} - -export interface CommandEvent { - playerUuid: string; - name: string; - /** Full command string like "/tp 100 64 200" */ - raw: string; - /** Just the command name like "tp" */ - command: string; - /** Parsed arguments like ["100", "64", "200"] */ - args: string[]; -} - -export interface BlockBreakEvent { - playerUuid: string; - name: string; - world: string; - x: number; - y: number; - z: number; -} - -export interface WorldCloseEvent { -} - export interface PluginToHost { pluginId: string; hello?: PluginHello | undefined; @@ -142,7 +432,7 @@ export interface CommandSpec { } export interface EventSubscribe { - events: string[]; + events: EventType[]; } export interface ActionBatch { @@ -441,7 +731,7 @@ export const HostShutdown: MessageFns = { function createBaseEventEnvelope(): EventEnvelope { return { eventId: "", - type: "", + type: 0, playerJoin: undefined, playerQuit: undefined, chat: undefined, @@ -456,8 +746,8 @@ export const EventEnvelope: MessageFns = { if (message.eventId !== "") { writer.uint32(10).string(message.eventId); } - if (message.type !== "") { - writer.uint32(18).string(message.type); + if (message.type !== 0) { + writer.uint32(16).int32(message.type); } if (message.playerJoin !== undefined) { PlayerJoinEvent.encode(message.playerJoin, writer.uint32(82).fork()).join(); @@ -496,11 +786,11 @@ export const EventEnvelope: MessageFns = { continue; } case 2: { - if (tag !== 18) { + if (tag !== 16) { break; } - message.type = reader.string(); + message.type = reader.int32() as any; continue; } case 10: { @@ -563,7 +853,7 @@ export const EventEnvelope: MessageFns = { fromJSON(object: any): EventEnvelope { return { eventId: isSet(object.eventId) ? globalThis.String(object.eventId) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", + type: isSet(object.type) ? eventTypeFromJSON(object.type) : 0, playerJoin: isSet(object.playerJoin) ? PlayerJoinEvent.fromJSON(object.playerJoin) : undefined, playerQuit: isSet(object.playerQuit) ? PlayerQuitEvent.fromJSON(object.playerQuit) : undefined, chat: isSet(object.chat) ? ChatEvent.fromJSON(object.chat) : undefined, @@ -578,8 +868,8 @@ export const EventEnvelope: MessageFns = { if (message.eventId !== "") { obj.eventId = message.eventId; } - if (message.type !== "") { - obj.type = message.type; + if (message.type !== 0) { + obj.type = eventTypeToJSON(message.type); } if (message.playerJoin !== undefined) { obj.playerJoin = PlayerJoinEvent.toJSON(message.playerJoin); @@ -608,7 +898,7 @@ export const EventEnvelope: MessageFns = { fromPartial(object: DeepPartial): EventEnvelope { const message = createBaseEventEnvelope(); message.eventId = object.eventId ?? ""; - message.type = object.type ?? ""; + message.type = object.type ?? 0; message.playerJoin = (object.playerJoin !== undefined && object.playerJoin !== null) ? PlayerJoinEvent.fromPartial(object.playerJoin) : undefined; @@ -629,557 +919,6 @@ export const EventEnvelope: MessageFns = { }, }; -function createBasePlayerJoinEvent(): PlayerJoinEvent { - return { playerUuid: "", name: "" }; -} - -export const PlayerJoinEvent: MessageFns = { - encode(message: PlayerJoinEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.playerUuid !== "") { - writer.uint32(10).string(message.playerUuid); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): PlayerJoinEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlayerJoinEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.playerUuid = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): PlayerJoinEvent { - return { - playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - }; - }, - - toJSON(message: PlayerJoinEvent): unknown { - const obj: any = {}; - if (message.playerUuid !== "") { - obj.playerUuid = message.playerUuid; - } - if (message.name !== "") { - obj.name = message.name; - } - return obj; - }, - - create(base?: DeepPartial): PlayerJoinEvent { - return PlayerJoinEvent.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): PlayerJoinEvent { - const message = createBasePlayerJoinEvent(); - message.playerUuid = object.playerUuid ?? ""; - message.name = object.name ?? ""; - return message; - }, -}; - -function createBasePlayerQuitEvent(): PlayerQuitEvent { - return { playerUuid: "", name: "" }; -} - -export const PlayerQuitEvent: MessageFns = { - encode(message: PlayerQuitEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.playerUuid !== "") { - writer.uint32(10).string(message.playerUuid); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): PlayerQuitEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlayerQuitEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.playerUuid = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): PlayerQuitEvent { - return { - playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - }; - }, - - toJSON(message: PlayerQuitEvent): unknown { - const obj: any = {}; - if (message.playerUuid !== "") { - obj.playerUuid = message.playerUuid; - } - if (message.name !== "") { - obj.name = message.name; - } - return obj; - }, - - create(base?: DeepPartial): PlayerQuitEvent { - return PlayerQuitEvent.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): PlayerQuitEvent { - const message = createBasePlayerQuitEvent(); - message.playerUuid = object.playerUuid ?? ""; - message.name = object.name ?? ""; - return message; - }, -}; - -function createBaseChatEvent(): ChatEvent { - return { playerUuid: "", name: "", message: "" }; -} - -export const ChatEvent: MessageFns = { - encode(message: ChatEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.playerUuid !== "") { - writer.uint32(10).string(message.playerUuid); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.message !== "") { - writer.uint32(26).string(message.message); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChatEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChatEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.playerUuid = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.message = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ChatEvent { - return { - playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - message: isSet(object.message) ? globalThis.String(object.message) : "", - }; - }, - - toJSON(message: ChatEvent): unknown { - const obj: any = {}; - if (message.playerUuid !== "") { - obj.playerUuid = message.playerUuid; - } - if (message.name !== "") { - obj.name = message.name; - } - if (message.message !== "") { - obj.message = message.message; - } - return obj; - }, - - create(base?: DeepPartial): ChatEvent { - return ChatEvent.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ChatEvent { - const message = createBaseChatEvent(); - message.playerUuid = object.playerUuid ?? ""; - message.name = object.name ?? ""; - message.message = object.message ?? ""; - return message; - }, -}; - -function createBaseCommandEvent(): CommandEvent { - return { playerUuid: "", name: "", raw: "", command: "", args: [] }; -} - -export const CommandEvent: MessageFns = { - encode(message: CommandEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.playerUuid !== "") { - writer.uint32(10).string(message.playerUuid); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.raw !== "") { - writer.uint32(26).string(message.raw); - } - if (message.command !== "") { - writer.uint32(34).string(message.command); - } - for (const v of message.args) { - writer.uint32(42).string(v!); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CommandEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCommandEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.playerUuid = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.raw = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.command = reader.string(); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.args.push(reader.string()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CommandEvent { - return { - playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - raw: isSet(object.raw) ? globalThis.String(object.raw) : "", - command: isSet(object.command) ? globalThis.String(object.command) : "", - args: globalThis.Array.isArray(object?.args) ? object.args.map((e: any) => globalThis.String(e)) : [], - }; - }, - - toJSON(message: CommandEvent): unknown { - const obj: any = {}; - if (message.playerUuid !== "") { - obj.playerUuid = message.playerUuid; - } - if (message.name !== "") { - obj.name = message.name; - } - if (message.raw !== "") { - obj.raw = message.raw; - } - if (message.command !== "") { - obj.command = message.command; - } - if (message.args?.length) { - obj.args = message.args; - } - return obj; - }, - - create(base?: DeepPartial): CommandEvent { - return CommandEvent.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): CommandEvent { - const message = createBaseCommandEvent(); - message.playerUuid = object.playerUuid ?? ""; - message.name = object.name ?? ""; - message.raw = object.raw ?? ""; - message.command = object.command ?? ""; - message.args = object.args?.map((e) => e) || []; - return message; - }, -}; - -function createBaseBlockBreakEvent(): BlockBreakEvent { - return { playerUuid: "", name: "", world: "", x: 0, y: 0, z: 0 }; -} - -export const BlockBreakEvent: MessageFns = { - encode(message: BlockBreakEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.playerUuid !== "") { - writer.uint32(10).string(message.playerUuid); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.world !== "") { - writer.uint32(26).string(message.world); - } - if (message.x !== 0) { - writer.uint32(32).int32(message.x); - } - if (message.y !== 0) { - writer.uint32(40).int32(message.y); - } - if (message.z !== 0) { - writer.uint32(48).int32(message.z); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BlockBreakEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBlockBreakEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.playerUuid = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.world = reader.string(); - continue; - } - case 4: { - if (tag !== 32) { - break; - } - - message.x = reader.int32(); - continue; - } - case 5: { - if (tag !== 40) { - break; - } - - message.y = reader.int32(); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.z = reader.int32(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): BlockBreakEvent { - return { - playerUuid: isSet(object.playerUuid) ? globalThis.String(object.playerUuid) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - world: isSet(object.world) ? globalThis.String(object.world) : "", - x: isSet(object.x) ? globalThis.Number(object.x) : 0, - y: isSet(object.y) ? globalThis.Number(object.y) : 0, - z: isSet(object.z) ? globalThis.Number(object.z) : 0, - }; - }, - - toJSON(message: BlockBreakEvent): unknown { - const obj: any = {}; - if (message.playerUuid !== "") { - obj.playerUuid = message.playerUuid; - } - if (message.name !== "") { - obj.name = message.name; - } - if (message.world !== "") { - obj.world = message.world; - } - if (message.x !== 0) { - obj.x = Math.round(message.x); - } - if (message.y !== 0) { - obj.y = Math.round(message.y); - } - if (message.z !== 0) { - obj.z = Math.round(message.z); - } - return obj; - }, - - create(base?: DeepPartial): BlockBreakEvent { - return BlockBreakEvent.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): BlockBreakEvent { - const message = createBaseBlockBreakEvent(); - message.playerUuid = object.playerUuid ?? ""; - message.name = object.name ?? ""; - message.world = object.world ?? ""; - message.x = object.x ?? 0; - message.y = object.y ?? 0; - message.z = object.z ?? 0; - return message; - }, -}; - -function createBaseWorldCloseEvent(): WorldCloseEvent { - return {}; -} - -export const WorldCloseEvent: MessageFns = { - encode(_: WorldCloseEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): WorldCloseEvent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseWorldCloseEvent(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(_: any): WorldCloseEvent { - return {}; - }, - - toJSON(_: WorldCloseEvent): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): WorldCloseEvent { - return WorldCloseEvent.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): WorldCloseEvent { - const message = createBaseWorldCloseEvent(); - return message; - }, -}; - function createBasePluginToHost(): PluginToHost { return { pluginId: "", @@ -1543,9 +1282,11 @@ function createBaseEventSubscribe(): EventSubscribe { export const EventSubscribe: MessageFns = { encode(message: EventSubscribe, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + writer.uint32(10).fork(); for (const v of message.events) { - writer.uint32(10).string(v!); + writer.int32(v); } + writer.join(); return writer; }, @@ -1557,12 +1298,22 @@ export const EventSubscribe: MessageFns = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (tag !== 10) { - break; + if (tag === 8) { + message.events.push(reader.int32() as any); + + continue; } - message.events.push(reader.string()); - continue; + if (tag === 10) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.events.push(reader.int32() as any); + } + + continue; + } + + break; } } if ((tag & 7) === 4 || tag === 0) { @@ -1575,14 +1326,14 @@ export const EventSubscribe: MessageFns = { fromJSON(object: any): EventSubscribe { return { - events: globalThis.Array.isArray(object?.events) ? object.events.map((e: any) => globalThis.String(e)) : [], + events: globalThis.Array.isArray(object?.events) ? object.events.map((e: any) => eventTypeFromJSON(e)) : [], }; }, toJSON(message: EventSubscribe): unknown { const obj: any = {}; if (message.events?.length) { - obj.events = message.events; + obj.events = message.events.map((e) => eventTypeToJSON(e)); } return obj; }, diff --git a/proto/generated/ts/world_events.ts b/proto/generated/ts/world_events.ts new file mode 100644 index 0000000..15c018e --- /dev/null +++ b/proto/generated/ts/world_events.ts @@ -0,0 +1,73 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc unknown +// source: world_events.proto + +/* eslint-disable */ +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; + +export const protobufPackage = "df.plugin"; + +export interface WorldCloseEvent { +} + +function createBaseWorldCloseEvent(): WorldCloseEvent { + return {}; +} + +export const WorldCloseEvent: MessageFns = { + encode(_: WorldCloseEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): WorldCloseEvent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseWorldCloseEvent(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(_: any): WorldCloseEvent { + return {}; + }, + + toJSON(_: WorldCloseEvent): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): WorldCloseEvent { + return WorldCloseEvent.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): WorldCloseEvent { + const message = createBaseWorldCloseEvent(); + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create(base?: DeepPartial): T; + fromPartial(object: DeepPartial): T; +} diff --git a/proto/generated/world_events.pb.go b/proto/generated/world_events.pb.go new file mode 100644 index 0000000..54b2f8c --- /dev/null +++ b/proto/generated/world_events.pb.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc (unknown) +// source: world_events.proto + +package generated + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type WorldCloseEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WorldCloseEvent) Reset() { + *x = WorldCloseEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_world_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldCloseEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldCloseEvent) ProtoMessage() {} + +func (x *WorldCloseEvent) ProtoReflect() protoreflect.Message { + mi := &file_world_events_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldCloseEvent.ProtoReflect.Descriptor instead. +func (*WorldCloseEvent) Descriptor() ([]byte, []int) { + return file_world_events_proto_rawDescGZIP(), []int{0} +} + +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, +} + +var ( + file_world_events_proto_rawDescOnce sync.Once + file_world_events_proto_rawDescData = file_world_events_proto_rawDesc +) + +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) + }) + 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_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 +} + +func init() { file_world_events_proto_init() } +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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_world_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_world_events_proto_goTypes, + DependencyIndexes: file_world_events_proto_depIdxs, + 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 +}