From e063078691c4806f2dd8a94afa2aba4c3646df7d Mon Sep 17 00:00:00 2001 From: RestartFU Date: Sun, 23 Nov 2025 12:42:40 -0500 Subject: [PATCH 1/2] feat: implement server info message --- cmd/plugins/plugins.yaml | 8 +- plugin/adapters/plugin/manager.go | 28 +- plugin/adapters/plugin/process.go | 16 + proto/generated/cpp/plugin.pb.cc | 910 ++++++++++++++---- proto/generated/cpp/plugin.pb.h | 657 ++++++++++++- proto/generated/go/plugin.pb.go | 441 ++++++--- .../php/Df/Plugin/GPBMetadata/Plugin.php | 2 +- .../generated/php/Df/Plugin/HostToPlugin.php | 28 + .../generated/php/Df/Plugin/PluginToHost.php | 28 + .../Df/Plugin/ServerInformationRequest.php | 32 + .../Df/Plugin/ServerInformationResponse.php | 59 ++ proto/generated/python/plugin_pb2.py | 44 +- proto/generated/rust/df.plugin.rs | 18 +- proto/generated/ts/plugin.js | 127 ++- proto/generated/ts/plugin.ts | 151 ++- proto/types/plugin.proto | 9 +- 16 files changed, 2171 insertions(+), 387 deletions(-) create mode 100644 proto/generated/php/Df/Plugin/ServerInformationRequest.php create mode 100644 proto/generated/php/Df/Plugin/ServerInformationResponse.php diff --git a/cmd/plugins/plugins.yaml b/cmd/plugins/plugins.yaml index 4b379e8..f8225de 100644 --- a/cmd/plugins/plugins.yaml +++ b/cmd/plugins/plugins.yaml @@ -49,8 +49,8 @@ plugins: args: ["run", "cmd/main.go"] work_dir: git: - enabled: true - persistent: false # persistent can be set to true if you don't + enabled: false + #persistent: true # persistent can be set to true if you don't # want the plugin to be cloned at every startup - version: tags/v0.0.1 # can also specify commit hashes - path: https://github.com/secmc/plugin-go + #version: tags/v0.0.1 # can also specify commit hashes + path: /home/restart/projects/test/plugin-go diff --git a/plugin/adapters/plugin/manager.go b/plugin/adapters/plugin/manager.go index c4317d5..22fbf50 100644 --- a/plugin/adapters/plugin/manager.go +++ b/plugin/adapters/plugin/manager.go @@ -430,7 +430,10 @@ func (m *Manager) handlePluginMessage(p *pluginProcess, msg *pb.PluginToHost) { if result := msg.GetEventResult(); result != nil { p.deliverEventResult(result) } - if hello := msg.GetHello(); hello != nil { + + switch payload := msg.GetPayload().(type) { + case *pb.PluginToHost_Hello: + hello := payload.Hello cmdNames := mapSlice(hello.Commands, func(cmd *pb.CommandSpec) string { if len(cmd.Aliases) > 0 { return fmt.Sprintf("%s (aliases: %v)", cmd.Name, cmd.Aliases) @@ -441,8 +444,8 @@ func (m *Manager) handlePluginMessage(p *pluginProcess, msg *pb.PluginToHost) { p.setHello(hello) m.registerCommands(p, hello.Commands) m.registerCustomItems(p, hello.CustomItems) - } - if subscribe := msg.GetSubscribe(); subscribe != nil { + case *pb.PluginToHost_Subscribe: + subscribe := payload.Subscribe eventNames := mapSlice(subscribe.Events, func(evt pb.EventType) string { return evt.String() }) @@ -452,11 +455,10 @@ func (m *Manager) handlePluginMessage(p *pluginProcess, msg *pb.PluginToHost) { } m.log.Info(fmt.Sprintf(" %s subscribed to %d events", pluginName, len(eventNames)), "events", eventNames) p.updateSubscriptions(subscribe.Events) - } - if actions := msg.GetActions(); actions != nil { - m.applyActions(p, actions) - } - if logMsg := msg.GetLog(); logMsg != nil { + case *pb.PluginToHost_Actions: + m.applyActions(p, payload.Actions) + case *pb.PluginToHost_Log: + logMsg := payload.Log level := strings.ToLower(logMsg.Level) switch level { case "warn", "warning": @@ -466,6 +468,16 @@ func (m *Manager) handlePluginMessage(p *pluginProcess, msg *pb.PluginToHost) { default: p.log.Info(logMsg.Message) } + case *pb.PluginToHost_ServerInfo: + var pluginNames []string + + for _, pl := range m.plugins { + pluginNames = append(pluginNames, pl.cfg.Name) + } + + p.sendServerInfo(pluginNames) + default: + p.log.Info(fmt.Sprintf("unhandled event: %#v", payload)) } } diff --git a/plugin/adapters/plugin/process.go b/plugin/adapters/plugin/process.go index 783a2e2..23cce6c 100644 --- a/plugin/adapters/plugin/process.go +++ b/plugin/adapters/plugin/process.go @@ -171,6 +171,22 @@ func (p *pluginProcess) consumeOutput(r io.Reader) { } } +func (p *pluginProcess) sendServerInfo(plugins []string) error { + msg := &pb.HostToPlugin{ + PluginId: p.id, + Payload: &pb.HostToPlugin_ServerInfo{ + ServerInfo: &pb.ServerInformationResponse{ + Plugins: plugins, + }, + }, + } + payload, err := proto.Marshal(msg) + if err != nil { + return err + } + return p.stream.Send(payload) +} + func (p *pluginProcess) sendHello() error { msg := &pb.HostToPlugin{ PluginId: p.id, diff --git a/proto/generated/cpp/plugin.pb.cc b/proto/generated/cpp/plugin.pb.cc index 4c77dff..e7b7393 100644 --- a/proto/generated/cpp/plugin.pb.cc +++ b/proto/generated/cpp/plugin.pb.cc @@ -27,6 +27,49 @@ namespace _fl = ::google::protobuf::internal::field_layout; namespace df { namespace plugin { +inline constexpr ServerInformationResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + plugins_{} {} + +template +PROTOBUF_CONSTEXPR ServerInformationResponse::ServerInformationResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(ServerInformationResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ServerInformationResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServerInformationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServerInformationResponseDefaultTypeInternal() {} + union { + ServerInformationResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServerInformationResponseDefaultTypeInternal _ServerInformationResponse_default_instance_; +template +PROTOBUF_CONSTEXPR ServerInformationRequest::ServerInformationRequest(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::internal::ZeroFieldsBase(ServerInformationRequest_class_data_.base()){} +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::internal::ZeroFieldsBase() { +} +#endif // PROTOBUF_CUSTOM_VTABLE +struct ServerInformationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ServerInformationRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ServerInformationRequestDefaultTypeInternal() {} + union { + ServerInformationRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServerInformationRequestDefaultTypeInternal _ServerInformationRequest_default_instance_; + inline constexpr LogMessage::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -272,16 +315,24 @@ const ::uint32_t 0x085, // bitmap PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_._oneof_case_[0]), - 9, // hasbit index offset + 10, // hasbit index offset PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_.plugin_id_), PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_.payload_), PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_.payload_), PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_.payload_), PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::df::plugin::HostToPlugin, _impl_.payload_), 0, ~0u, ~0u, ~0u, + ~0u, + 0x000, // bitmap + 0x081, // bitmap + PROTOBUF_FIELD_OFFSET(::df::plugin::ServerInformationResponse, _impl_._has_bits_), + 4, // hasbit index offset + PROTOBUF_FIELD_OFFSET(::df::plugin::ServerInformationResponse, _impl_.plugins_), + 0, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::df::plugin::HostHello, _impl_._has_bits_), 4, // hasbit index offset @@ -404,7 +455,7 @@ const ::uint32_t 0x085, // bitmap PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_._oneof_case_[0]), - 11, // hasbit index offset + 12, // hasbit index offset PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.plugin_id_), PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.payload_), PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.payload_), @@ -412,12 +463,14 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.payload_), PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.payload_), PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::df::plugin::PluginToHost, _impl_.payload_), 0, ~0u, ~0u, ~0u, ~0u, ~0u, + ~0u, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::df::plugin::PluginHello, _impl_._has_bits_), 8, // hasbit index offset @@ -448,16 +501,20 @@ const ::uint32_t static const ::_pbi::MigrationSchema schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, sizeof(::df::plugin::HostToPlugin)}, - {13, sizeof(::df::plugin::HostHello)}, - {18, sizeof(::df::plugin::HostShutdown)}, - {23, sizeof(::df::plugin::EventEnvelope)}, - {132, sizeof(::df::plugin::PluginToHost)}, - {149, sizeof(::df::plugin::PluginHello)}, - {162, sizeof(::df::plugin::LogMessage)}, - {169, sizeof(::df::plugin::EventSubscribe)}, + {15, sizeof(::df::plugin::ServerInformationRequest)}, + {16, sizeof(::df::plugin::ServerInformationResponse)}, + {21, sizeof(::df::plugin::HostHello)}, + {26, sizeof(::df::plugin::HostShutdown)}, + {31, sizeof(::df::plugin::EventEnvelope)}, + {140, sizeof(::df::plugin::PluginToHost)}, + {159, sizeof(::df::plugin::PluginHello)}, + {172, sizeof(::df::plugin::LogMessage)}, + {179, sizeof(::df::plugin::EventSubscribe)}, }; static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { &::df::plugin::_HostToPlugin_default_instance_._instance, + &::df::plugin::_ServerInformationRequest_default_instance_._instance, + &::df::plugin::_ServerInformationResponse_default_instance_._instance, &::df::plugin::_HostHello_default_instance_._instance, &::df::plugin::_HostShutdown_default_instance_._instance, &::df::plugin::_EventEnvelope_default_instance_._instance, @@ -471,164 +528,170 @@ const char descriptor_table_protodef_plugin_2eproto[] ABSL_ATTRIBUTE_SECTION_VAR "\n\014plugin.proto\022\tdf.plugin\032\023player_events" ".proto\032\022world_events.proto\032\rcommand.prot" "o\032\ractions.proto\032\017mutations.proto\032\014commo" - "n.proto\"\315\001\n\014HostToPlugin\022\033\n\tplugin_id\030\001 " + "n.proto\"\226\002\n\014HostToPlugin\022\033\n\tplugin_id\030\001 " "\001(\tR\010pluginId\022,\n\005hello\030\n \001(\0132\024.df.plugin" ".HostHelloH\000R\005hello\0225\n\010shutdown\030\013 \001(\0132\027." - "df.plugin.HostShutdownH\000R\010shutdown\0220\n\005ev" - "ent\030\024 \001(\0132\030.df.plugin.EventEnvelopeH\000R\005e" - "ventB\t\n\007payload\",\n\tHostHello\022\037\n\013api_vers" - "ion\030\001 \001(\tR\napiVersion\"&\n\014HostShutdown\022\026\n" - "\006reason\030\001 \001(\tR\006reason\"\346\036\n\rEventEnvelope\022" - "\031\n\010event_id\030\001 \001(\tR\007eventId\022(\n\004type\030\002 \001(\016" - "2\024.df.plugin.EventTypeR\004type\022)\n\020expects_" - "response\030\003 \001(\010R\017expectsResponse\022=\n\013playe" - "r_join\030\n \001(\0132\032.df.plugin.PlayerJoinEvent" - "H\000R\nplayerJoin\022=\n\013player_quit\030\013 \001(\0132\032.df" - ".plugin.PlayerQuitEventH\000R\nplayerQuit\022=\n" - "\013player_move\030\014 \001(\0132\032.df.plugin.PlayerMov" - "eEventH\000R\nplayerMove\022=\n\013player_jump\030\r \001(" - "\0132\032.df.plugin.PlayerJumpEventH\000R\nplayerJ" - "ump\022I\n\017player_teleport\030\016 \001(\0132\036.df.plugin" - ".PlayerTeleportEventH\000R\016playerTeleport\022S" - "\n\023player_change_world\030\017 \001(\0132!.df.plugin." - "PlayerChangeWorldEventH\000R\021playerChangeWo" - "rld\022V\n\024player_toggle_sprint\030\020 \001(\0132\".df.p" - "lugin.PlayerToggleSprintEventH\000R\022playerT" - "oggleSprint\022S\n\023player_toggle_sneak\030\021 \001(\013" - "2!.df.plugin.PlayerToggleSneakEventH\000R\021p" - "layerToggleSneak\022*\n\004chat\030\022 \001(\0132\024.df.plug" - "in.ChatEventH\000R\004chat\022J\n\020player_food_loss" - "\030\023 \001(\0132\036.df.plugin.PlayerFoodLossEventH\000" - "R\016playerFoodLoss\022=\n\013player_heal\030\024 \001(\0132\032." - "df.plugin.PlayerHealEventH\000R\nplayerHeal\022" - "=\n\013player_hurt\030\025 \001(\0132\032.df.plugin.PlayerH" - "urtEventH\000R\nplayerHurt\022@\n\014player_death\030\026" - " \001(\0132\033.df.plugin.PlayerDeathEventH\000R\013pla" - "yerDeath\022F\n\016player_respawn\030\027 \001(\0132\035.df.pl" - "ugin.PlayerRespawnEventH\000R\rplayerRespawn" - "\022P\n\022player_skin_change\030\030 \001(\0132 .df.plugin" - ".PlayerSkinChangeEventH\000R\020playerSkinChan" - "ge\022\\\n\026player_fire_extinguish\030\031 \001(\0132$.df." - "plugin.PlayerFireExtinguishEventH\000R\024play" - "erFireExtinguish\022P\n\022player_start_break\030\032" - " \001(\0132 .df.plugin.PlayerStartBreakEventH\000" - "R\020playerStartBreak\022=\n\013block_break\030\033 \001(\0132" - "\032.df.plugin.BlockBreakEventH\000R\nblockBrea" - "k\022P\n\022player_block_place\030\034 \001(\0132 .df.plugi" - "n.PlayerBlockPlaceEventH\000R\020playerBlockPl" - "ace\022M\n\021player_block_pick\030\035 \001(\0132\037.df.plug" - "in.PlayerBlockPickEventH\000R\017playerBlockPi" - "ck\022G\n\017player_item_use\030\036 \001(\0132\035.df.plugin." - "PlayerItemUseEventH\000R\rplayerItemUse\022^\n\030p" - "layer_item_use_on_block\030\037 \001(\0132$.df.plugi" - "n.PlayerItemUseOnBlockEventH\000R\024playerIte" - "mUseOnBlock\022a\n\031player_item_use_on_entity" - "\030 \001(\0132%.df.plugin.PlayerItemUseOnEntity" - "EventH\000R\025playerItemUseOnEntity\022S\n\023player" - "_item_release\030! \001(\0132!.df.plugin.PlayerIt" - "emReleaseEventH\000R\021playerItemRelease\022S\n\023p" - "layer_item_consume\030\" \001(\0132!.df.plugin.Pla" - "yerItemConsumeEventH\000R\021playerItemConsume" - "\022V\n\024player_attack_entity\030# \001(\0132\".df.plug" - "in.PlayerAttackEntityEventH\000R\022playerAtta" - "ckEntity\022\\\n\026player_experience_gain\030$ \001(\013" - "2$.df.plugin.PlayerExperienceGainEventH\000" - "R\024playerExperienceGain\022J\n\020player_punch_a" - "ir\030% \001(\0132\036.df.plugin.PlayerPunchAirEvent" - "H\000R\016playerPunchAir\022J\n\020player_sign_edit\030&" - " \001(\0132\036.df.plugin.PlayerSignEditEventH\000R\016" - "playerSignEdit\022`\n\030player_lectern_page_tu" - "rn\030\' \001(\0132%.df.plugin.PlayerLecternPageTu" - "rnEventH\000R\025playerLecternPageTurn\022P\n\022play" - "er_item_damage\030( \001(\0132 .df.plugin.PlayerI" - "temDamageEventH\000R\020playerItemDamage\022P\n\022pl" - "ayer_item_pickup\030) \001(\0132 .df.plugin.Playe" - "rItemPickupEventH\000R\020playerItemPickup\022]\n\027" - "player_held_slot_change\030* \001(\0132$.df.plugi" - "n.PlayerHeldSlotChangeEventH\000R\024playerHel" - "dSlotChange\022J\n\020player_item_drop\030+ \001(\0132\036." - "df.plugin.PlayerItemDropEventH\000R\016playerI" - "temDrop\022I\n\017player_transfer\030, \001(\0132\036.df.pl" - "ugin.PlayerTransferEventH\000R\016playerTransf" - "er\0223\n\007command\030- \001(\0132\027.df.plugin.CommandE" - "ventH\000R\007command\022R\n\022player_diagnostics\030. " - "\001(\0132!.df.plugin.PlayerDiagnosticsEventH\000" - "R\021playerDiagnostics\022M\n\021world_liquid_flow" - "\030F \001(\0132\037.df.plugin.WorldLiquidFlowEventH" - "\000R\017worldLiquidFlow\022P\n\022world_liquid_decay" - "\030G \001(\0132 .df.plugin.WorldLiquidDecayEvent" - "H\000R\020worldLiquidDecay\022S\n\023world_liquid_har" - "den\030H \001(\0132!.df.plugin.WorldLiquidHardenE" - "ventH\000R\021worldLiquidHarden\022=\n\013world_sound" - "\030I \001(\0132\032.df.plugin.WorldSoundEventH\000R\nwo" - "rldSound\022M\n\021world_fire_spread\030J \001(\0132\037.df" - ".plugin.WorldFireSpreadEventH\000R\017worldFir" - "eSpread\022J\n\020world_block_burn\030K \001(\0132\036.df.p" - "lugin.WorldBlockBurnEventH\000R\016worldBlockB" - "urn\022P\n\022world_crop_trample\030L \001(\0132 .df.plu" - "gin.WorldCropTrampleEventH\000R\020worldCropTr" - "ample\022P\n\022world_leaves_decay\030M \001(\0132 .df.p" - "lugin.WorldLeavesDecayEventH\000R\020worldLeav" - "esDecay\022P\n\022world_entity_spawn\030N \001(\0132 .df" - ".plugin.WorldEntitySpawnEventH\000R\020worldEn" - "titySpawn\022V\n\024world_entity_despawn\030O \001(\0132" - "\".df.plugin.WorldEntityDespawnEventH\000R\022w" - "orldEntityDespawn\022I\n\017world_explosion\030P \001" - "(\0132\036.df.plugin.WorldExplosionEventH\000R\016wo" - "rldExplosion\022=\n\013world_close\030Q \001(\0132\032.df.p" - "lugin.WorldCloseEventH\000R\nworldCloseB\t\n\007p" - "ayload\"\275\002\n\014PluginToHost\022\033\n\tplugin_id\030\001 \001" - "(\tR\010pluginId\022.\n\005hello\030\n \001(\0132\026.df.plugin." - "PluginHelloH\000R\005hello\0229\n\tsubscribe\030\013 \001(\0132" - "\031.df.plugin.EventSubscribeH\000R\tsubscribe\022" - "2\n\007actions\030\024 \001(\0132\026.df.plugin.ActionBatch" - "H\000R\007actions\022)\n\003log\030\036 \001(\0132\025.df.plugin.Log" - "MessageH\000R\003log\022;\n\014event_result\030( \001(\0132\026.d" - "f.plugin.EventResultH\000R\013eventResultB\t\n\007p" - "ayload\"\324\001\n\013PluginHello\022\022\n\004name\030\001 \001(\tR\004na" - "me\022\030\n\007version\030\002 \001(\tR\007version\022\037\n\013api_vers" - "ion\030\003 \001(\tR\napiVersion\0222\n\010commands\030\004 \003(\0132" - "\026.df.plugin.CommandSpecR\010commands\022B\n\014cus" - "tom_items\030\005 \003(\0132\037.df.plugin.CustomItemDe" - "finitionR\013customItems\"<\n\nLogMessage\022\024\n\005l" - "evel\030\001 \001(\tR\005level\022\030\n\007message\030\002 \001(\tR\007mess" - "age\">\n\016EventSubscribe\022,\n\006events\030\001 \003(\0162\024." - "df.plugin.EventTypeR\006events*\212\t\n\tEventTyp" - "e\022\032\n\026EVENT_TYPE_UNSPECIFIED\020\000\022\022\n\016EVENT_T" - "YPE_ALL\020\001\022\017\n\013PLAYER_JOIN\020\n\022\017\n\013PLAYER_QUI" - "T\020\013\022\017\n\013PLAYER_MOVE\020\014\022\017\n\013PLAYER_JUMP\020\r\022\023\n" - "\017PLAYER_TELEPORT\020\016\022\027\n\023PLAYER_CHANGE_WORL" - "D\020\017\022\030\n\024PLAYER_TOGGLE_SPRINT\020\020\022\027\n\023PLAYER_" - "TOGGLE_SNEAK\020\021\022\010\n\004CHAT\020\022\022\024\n\020PLAYER_FOOD_" - "LOSS\020\023\022\017\n\013PLAYER_HEAL\020\024\022\017\n\013PLAYER_HURT\020\025" - "\022\020\n\014PLAYER_DEATH\020\026\022\022\n\016PLAYER_RESPAWN\020\027\022\026" - "\n\022PLAYER_SKIN_CHANGE\020\030\022\032\n\026PLAYER_FIRE_EX" - "TINGUISH\020\031\022\026\n\022PLAYER_START_BREAK\020\032\022\026\n\022PL" - "AYER_BLOCK_BREAK\020\033\022\026\n\022PLAYER_BLOCK_PLACE" - "\020\034\022\025\n\021PLAYER_BLOCK_PICK\020\035\022\023\n\017PLAYER_ITEM" - "_USE\020\036\022\034\n\030PLAYER_ITEM_USE_ON_BLOCK\020\037\022\035\n\031" - "PLAYER_ITEM_USE_ON_ENTITY\020 \022\027\n\023PLAYER_IT" - "EM_RELEASE\020!\022\027\n\023PLAYER_ITEM_CONSUME\020\"\022\030\n" - "\024PLAYER_ATTACK_ENTITY\020#\022\032\n\026PLAYER_EXPERI" - "ENCE_GAIN\020$\022\024\n\020PLAYER_PUNCH_AIR\020%\022\024\n\020PLA" - "YER_SIGN_EDIT\020&\022\034\n\030PLAYER_LECTERN_PAGE_T" - "URN\020\'\022\026\n\022PLAYER_ITEM_DAMAGE\020(\022\026\n\022PLAYER_" - "ITEM_PICKUP\020)\022\033\n\027PLAYER_HELD_SLOT_CHANGE" - "\020*\022\024\n\020PLAYER_ITEM_DROP\020+\022\023\n\017PLAYER_TRANS" - "FER\020,\022\013\n\007COMMAND\020-\022\026\n\022PLAYER_DIAGNOSTICS" - "\020.\022\025\n\021WORLD_LIQUID_FLOW\020F\022\026\n\022WORLD_LIQUI" - "D_DECAY\020G\022\027\n\023WORLD_LIQUID_HARDEN\020H\022\017\n\013WO" - "RLD_SOUND\020I\022\025\n\021WORLD_FIRE_SPREAD\020J\022\024\n\020WO" - "RLD_BLOCK_BURN\020K\022\026\n\022WORLD_CROP_TRAMPLE\020L" - "\022\026\n\022WORLD_LEAVES_DECAY\020M\022\026\n\022WORLD_ENTITY" - "_SPAWN\020N\022\030\n\024WORLD_ENTITY_DESPAWN\020O\022\023\n\017WO" - "RLD_EXPLOSION\020P\022\017\n\013WORLD_CLOSE\020Q2M\n\006Plug" - "in\022C\n\013EventStream\022\027.df.plugin.PluginToHo" - "st\032\027.df.plugin.HostToPlugin(\0010\001B\212\001\n\rcom." - "df.pluginB\013PluginProtoP\001Z\'github.com/sec" - "mc/plugin/proto/generated\242\002\003DPX\252\002\tDf.Plu" - "gin\312\002\tDf\\Plugin\342\002\025Df\\Plugin\\GPBMetadata\352" - "\002\nDf::Pluginb\006proto3" + "df.plugin.HostShutdownH\000R\010shutdown\022G\n\013se" + "rver_info\030\014 \001(\0132$.df.plugin.ServerInform" + "ationResponseH\000R\nserverInfo\0220\n\005event\030\024 \001" + "(\0132\030.df.plugin.EventEnvelopeH\000R\005eventB\t\n" + "\007payload\"\032\n\030ServerInformationRequest\"5\n\031" + "ServerInformationResponse\022\030\n\007plugins\030\001 \003" + "(\tR\007plugins\",\n\tHostHello\022\037\n\013api_version\030" + "\001 \001(\tR\napiVersion\"&\n\014HostShutdown\022\026\n\006rea" + "son\030\001 \001(\tR\006reason\"\346\036\n\rEventEnvelope\022\031\n\010e" + "vent_id\030\001 \001(\tR\007eventId\022(\n\004type\030\002 \001(\0162\024.d" + "f.plugin.EventTypeR\004type\022)\n\020expects_resp" + "onse\030\003 \001(\010R\017expectsResponse\022=\n\013player_jo" + "in\030\n \001(\0132\032.df.plugin.PlayerJoinEventH\000R\n" + "playerJoin\022=\n\013player_quit\030\013 \001(\0132\032.df.plu" + "gin.PlayerQuitEventH\000R\nplayerQuit\022=\n\013pla" + "yer_move\030\014 \001(\0132\032.df.plugin.PlayerMoveEve" + "ntH\000R\nplayerMove\022=\n\013player_jump\030\r \001(\0132\032." + "df.plugin.PlayerJumpEventH\000R\nplayerJump\022" + "I\n\017player_teleport\030\016 \001(\0132\036.df.plugin.Pla" + "yerTeleportEventH\000R\016playerTeleport\022S\n\023pl" + "ayer_change_world\030\017 \001(\0132!.df.plugin.Play" + "erChangeWorldEventH\000R\021playerChangeWorld\022" + "V\n\024player_toggle_sprint\030\020 \001(\0132\".df.plugi" + "n.PlayerToggleSprintEventH\000R\022playerToggl" + "eSprint\022S\n\023player_toggle_sneak\030\021 \001(\0132!.d" + "f.plugin.PlayerToggleSneakEventH\000R\021playe" + "rToggleSneak\022*\n\004chat\030\022 \001(\0132\024.df.plugin.C" + "hatEventH\000R\004chat\022J\n\020player_food_loss\030\023 \001" + "(\0132\036.df.plugin.PlayerFoodLossEventH\000R\016pl" + "ayerFoodLoss\022=\n\013player_heal\030\024 \001(\0132\032.df.p" + "lugin.PlayerHealEventH\000R\nplayerHeal\022=\n\013p" + "layer_hurt\030\025 \001(\0132\032.df.plugin.PlayerHurtE" + "ventH\000R\nplayerHurt\022@\n\014player_death\030\026 \001(\013" + "2\033.df.plugin.PlayerDeathEventH\000R\013playerD" + "eath\022F\n\016player_respawn\030\027 \001(\0132\035.df.plugin" + ".PlayerRespawnEventH\000R\rplayerRespawn\022P\n\022" + "player_skin_change\030\030 \001(\0132 .df.plugin.Pla" + "yerSkinChangeEventH\000R\020playerSkinChange\022\\" + "\n\026player_fire_extinguish\030\031 \001(\0132$.df.plug" + "in.PlayerFireExtinguishEventH\000R\024playerFi" + "reExtinguish\022P\n\022player_start_break\030\032 \001(\013" + "2 .df.plugin.PlayerStartBreakEventH\000R\020pl" + "ayerStartBreak\022=\n\013block_break\030\033 \001(\0132\032.df" + ".plugin.BlockBreakEventH\000R\nblockBreak\022P\n" + "\022player_block_place\030\034 \001(\0132 .df.plugin.Pl" + "ayerBlockPlaceEventH\000R\020playerBlockPlace\022" + "M\n\021player_block_pick\030\035 \001(\0132\037.df.plugin.P" + "layerBlockPickEventH\000R\017playerBlockPick\022G" + "\n\017player_item_use\030\036 \001(\0132\035.df.plugin.Play" + "erItemUseEventH\000R\rplayerItemUse\022^\n\030playe" + "r_item_use_on_block\030\037 \001(\0132$.df.plugin.Pl" + "ayerItemUseOnBlockEventH\000R\024playerItemUse" + "OnBlock\022a\n\031player_item_use_on_entity\030 \001" + "(\0132%.df.plugin.PlayerItemUseOnEntityEven" + "tH\000R\025playerItemUseOnEntity\022S\n\023player_ite" + "m_release\030! \001(\0132!.df.plugin.PlayerItemRe" + "leaseEventH\000R\021playerItemRelease\022S\n\023playe" + "r_item_consume\030\" \001(\0132!.df.plugin.PlayerI" + "temConsumeEventH\000R\021playerItemConsume\022V\n\024" + "player_attack_entity\030# \001(\0132\".df.plugin.P" + "layerAttackEntityEventH\000R\022playerAttackEn" + "tity\022\\\n\026player_experience_gain\030$ \001(\0132$.d" + "f.plugin.PlayerExperienceGainEventH\000R\024pl" + "ayerExperienceGain\022J\n\020player_punch_air\030%" + " \001(\0132\036.df.plugin.PlayerPunchAirEventH\000R\016" + "playerPunchAir\022J\n\020player_sign_edit\030& \001(\013" + "2\036.df.plugin.PlayerSignEditEventH\000R\016play" + "erSignEdit\022`\n\030player_lectern_page_turn\030\'" + " \001(\0132%.df.plugin.PlayerLecternPageTurnEv" + "entH\000R\025playerLecternPageTurn\022P\n\022player_i" + "tem_damage\030( \001(\0132 .df.plugin.PlayerItemD" + "amageEventH\000R\020playerItemDamage\022P\n\022player" + "_item_pickup\030) \001(\0132 .df.plugin.PlayerIte" + "mPickupEventH\000R\020playerItemPickup\022]\n\027play" + "er_held_slot_change\030* \001(\0132$.df.plugin.Pl" + "ayerHeldSlotChangeEventH\000R\024playerHeldSlo" + "tChange\022J\n\020player_item_drop\030+ \001(\0132\036.df.p" + "lugin.PlayerItemDropEventH\000R\016playerItemD" + "rop\022I\n\017player_transfer\030, \001(\0132\036.df.plugin" + ".PlayerTransferEventH\000R\016playerTransfer\0223" + "\n\007command\030- \001(\0132\027.df.plugin.CommandEvent" + "H\000R\007command\022R\n\022player_diagnostics\030. \001(\0132" + "!.df.plugin.PlayerDiagnosticsEventH\000R\021pl" + "ayerDiagnostics\022M\n\021world_liquid_flow\030F \001" + "(\0132\037.df.plugin.WorldLiquidFlowEventH\000R\017w" + "orldLiquidFlow\022P\n\022world_liquid_decay\030G \001" + "(\0132 .df.plugin.WorldLiquidDecayEventH\000R\020" + "worldLiquidDecay\022S\n\023world_liquid_harden\030" + "H \001(\0132!.df.plugin.WorldLiquidHardenEvent" + "H\000R\021worldLiquidHarden\022=\n\013world_sound\030I \001" + "(\0132\032.df.plugin.WorldSoundEventH\000R\nworldS" + "ound\022M\n\021world_fire_spread\030J \001(\0132\037.df.plu" + "gin.WorldFireSpreadEventH\000R\017worldFireSpr" + "ead\022J\n\020world_block_burn\030K \001(\0132\036.df.plugi" + "n.WorldBlockBurnEventH\000R\016worldBlockBurn\022" + "P\n\022world_crop_trample\030L \001(\0132 .df.plugin." + "WorldCropTrampleEventH\000R\020worldCropTrampl" + "e\022P\n\022world_leaves_decay\030M \001(\0132 .df.plugi" + "n.WorldLeavesDecayEventH\000R\020worldLeavesDe" + "cay\022P\n\022world_entity_spawn\030N \001(\0132 .df.plu" + "gin.WorldEntitySpawnEventH\000R\020worldEntity" + "Spawn\022V\n\024world_entity_despawn\030O \001(\0132\".df" + ".plugin.WorldEntityDespawnEventH\000R\022world" + "EntityDespawn\022I\n\017world_explosion\030P \001(\0132\036" + ".df.plugin.WorldExplosionEventH\000R\016worldE" + "xplosion\022=\n\013world_close\030Q \001(\0132\032.df.plugi" + "n.WorldCloseEventH\000R\nworldCloseB\t\n\007paylo" + "ad\"\205\003\n\014PluginToHost\022\033\n\tplugin_id\030\001 \001(\tR\010" + "pluginId\022.\n\005hello\030\n \001(\0132\026.df.plugin.Plug" + "inHelloH\000R\005hello\0229\n\tsubscribe\030\013 \001(\0132\031.df" + ".plugin.EventSubscribeH\000R\tsubscribe\022F\n\013s" + "erver_info\030\014 \001(\0132#.df.plugin.ServerInfor" + "mationRequestH\000R\nserverInfo\0222\n\007actions\030\024" + " \001(\0132\026.df.plugin.ActionBatchH\000R\007actions\022" + ")\n\003log\030\036 \001(\0132\025.df.plugin.LogMessageH\000R\003l" + "og\022;\n\014event_result\030( \001(\0132\026.df.plugin.Eve" + "ntResultH\000R\013eventResultB\t\n\007payload\"\324\001\n\013P" + "luginHello\022\022\n\004name\030\001 \001(\tR\004name\022\030\n\007versio" + "n\030\002 \001(\tR\007version\022\037\n\013api_version\030\003 \001(\tR\na" + "piVersion\0222\n\010commands\030\004 \003(\0132\026.df.plugin." + "CommandSpecR\010commands\022B\n\014custom_items\030\005 " + "\003(\0132\037.df.plugin.CustomItemDefinitionR\013cu" + "stomItems\"<\n\nLogMessage\022\024\n\005level\030\001 \001(\tR\005" + "level\022\030\n\007message\030\002 \001(\tR\007message\">\n\016Event" + "Subscribe\022,\n\006events\030\001 \003(\0162\024.df.plugin.Ev" + "entTypeR\006events*\212\t\n\tEventType\022\032\n\026EVENT_T" + "YPE_UNSPECIFIED\020\000\022\022\n\016EVENT_TYPE_ALL\020\001\022\017\n" + "\013PLAYER_JOIN\020\n\022\017\n\013PLAYER_QUIT\020\013\022\017\n\013PLAYE" + "R_MOVE\020\014\022\017\n\013PLAYER_JUMP\020\r\022\023\n\017PLAYER_TELE" + "PORT\020\016\022\027\n\023PLAYER_CHANGE_WORLD\020\017\022\030\n\024PLAYE" + "R_TOGGLE_SPRINT\020\020\022\027\n\023PLAYER_TOGGLE_SNEAK" + "\020\021\022\010\n\004CHAT\020\022\022\024\n\020PLAYER_FOOD_LOSS\020\023\022\017\n\013PL" + "AYER_HEAL\020\024\022\017\n\013PLAYER_HURT\020\025\022\020\n\014PLAYER_D" + "EATH\020\026\022\022\n\016PLAYER_RESPAWN\020\027\022\026\n\022PLAYER_SKI" + "N_CHANGE\020\030\022\032\n\026PLAYER_FIRE_EXTINGUISH\020\031\022\026" + "\n\022PLAYER_START_BREAK\020\032\022\026\n\022PLAYER_BLOCK_B" + "REAK\020\033\022\026\n\022PLAYER_BLOCK_PLACE\020\034\022\025\n\021PLAYER" + "_BLOCK_PICK\020\035\022\023\n\017PLAYER_ITEM_USE\020\036\022\034\n\030PL" + "AYER_ITEM_USE_ON_BLOCK\020\037\022\035\n\031PLAYER_ITEM_" + "USE_ON_ENTITY\020 \022\027\n\023PLAYER_ITEM_RELEASE\020!" + "\022\027\n\023PLAYER_ITEM_CONSUME\020\"\022\030\n\024PLAYER_ATTA" + "CK_ENTITY\020#\022\032\n\026PLAYER_EXPERIENCE_GAIN\020$\022" + "\024\n\020PLAYER_PUNCH_AIR\020%\022\024\n\020PLAYER_SIGN_EDI" + "T\020&\022\034\n\030PLAYER_LECTERN_PAGE_TURN\020\'\022\026\n\022PLA" + "YER_ITEM_DAMAGE\020(\022\026\n\022PLAYER_ITEM_PICKUP\020" + ")\022\033\n\027PLAYER_HELD_SLOT_CHANGE\020*\022\024\n\020PLAYER" + "_ITEM_DROP\020+\022\023\n\017PLAYER_TRANSFER\020,\022\013\n\007COM" + "MAND\020-\022\026\n\022PLAYER_DIAGNOSTICS\020.\022\025\n\021WORLD_" + "LIQUID_FLOW\020F\022\026\n\022WORLD_LIQUID_DECAY\020G\022\027\n" + "\023WORLD_LIQUID_HARDEN\020H\022\017\n\013WORLD_SOUND\020I\022" + "\025\n\021WORLD_FIRE_SPREAD\020J\022\024\n\020WORLD_BLOCK_BU" + "RN\020K\022\026\n\022WORLD_CROP_TRAMPLE\020L\022\026\n\022WORLD_LE" + "AVES_DECAY\020M\022\026\n\022WORLD_ENTITY_SPAWN\020N\022\030\n\024" + "WORLD_ENTITY_DESPAWN\020O\022\023\n\017WORLD_EXPLOSIO" + "N\020P\022\017\n\013WORLD_CLOSE\020Q2M\n\006Plugin\022C\n\013EventS" + "tream\022\027.df.plugin.PluginToHost\032\027.df.plug" + "in.HostToPlugin(\0010\001B\212\001\n\rcom.df.pluginB\013P" + "luginProtoP\001Z\'github.com/secmc/plugin/pr" + "oto/generated\242\002\003DPX\252\002\tDf.Plugin\312\002\tDf\\Plu" + "gin\342\002\025Df\\Plugin\\GPBMetadata\352\002\nDf::Plugin" + "b\006proto3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_plugin_2eproto_deps[6] = { @@ -643,13 +706,13 @@ static ::absl::once_flag descriptor_table_plugin_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_plugin_2eproto = { false, false, - 6420, + 6648, descriptor_table_protodef_plugin_2eproto, "plugin.proto", &descriptor_table_plugin_2eproto_once, descriptor_table_plugin_2eproto_deps, 6, - 8, + 10, schemas, file_default_instances, TableStruct_plugin_2eproto::offsets, @@ -702,6 +765,19 @@ void HostToPlugin::set_allocated_shutdown(::df::plugin::HostShutdown* PROTOBUF_N } // @@protoc_insertion_point(field_set_allocated:df.plugin.HostToPlugin.shutdown) } +void HostToPlugin::set_allocated_server_info(::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE server_info) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_payload(); + if (server_info) { + ::google::protobuf::Arena* submessage_arena = server_info->GetArena(); + if (message_arena != submessage_arena) { + server_info = ::google::protobuf::internal::GetOwnedMessage(message_arena, server_info, submessage_arena); + } + set_has_server_info(); + _impl_.payload_.server_info_ = server_info; + } + // @@protoc_insertion_point(field_set_allocated:df.plugin.HostToPlugin.server_info) +} void HostToPlugin::set_allocated_event(::df::plugin::EventEnvelope* PROTOBUF_NULLABLE event) { ::google::protobuf::Arena* message_arena = GetArena(); clear_payload(); @@ -756,6 +832,9 @@ HostToPlugin::HostToPlugin( case kShutdown: _impl_.payload_.shutdown_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.shutdown_); break; + case kServerInfo: + _impl_.payload_.server_info_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.server_info_); + break; case kEvent: _impl_.payload_.event_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.event_); break; @@ -812,6 +891,14 @@ void HostToPlugin::clear_payload() { } break; } + case kServerInfo: { + if (GetArena() == nullptr) { + delete _impl_.payload_.server_info_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.payload_.server_info_); + } + break; + } case kEvent: { if (GetArena() == nullptr) { delete _impl_.payload_.event_; @@ -871,17 +958,17 @@ HostToPlugin::GetClassData() const { return HostToPlugin_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 4, 3, 40, 2> +const ::_pbi::TcParseTable<0, 5, 4, 40, 2> HostToPlugin::_table_ = { { PROTOBUF_FIELD_OFFSET(HostToPlugin, _impl_._has_bits_), 0, // no _extensions_ 20, 0, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294441470, // skipmap + 4294439422, // skipmap offsetof(decltype(_table_), field_entries), - 4, // num_field_entries - 3, // num_aux_entries + 5, // num_field_entries + 4, // num_aux_entries offsetof(decltype(_table_), aux_entries), HostToPlugin_class_data_.base(), nullptr, // post_loop_handler @@ -903,12 +990,15 @@ HostToPlugin::_table_ = { {PROTOBUF_FIELD_OFFSET(HostToPlugin, _impl_.payload_.hello_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .df.plugin.HostShutdown shutdown = 11 [json_name = "shutdown"]; {PROTOBUF_FIELD_OFFSET(HostToPlugin, _impl_.payload_.shutdown_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .df.plugin.ServerInformationResponse server_info = 12 [json_name = "serverInfo"]; + {PROTOBUF_FIELD_OFFSET(HostToPlugin, _impl_.payload_.server_info_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .df.plugin.EventEnvelope event = 20 [json_name = "event"]; - {PROTOBUF_FIELD_OFFSET(HostToPlugin, _impl_.payload_.event_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(HostToPlugin, _impl_.payload_.event_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::df::plugin::HostHello>()}, {::_pbi::TcParser::GetTable<::df::plugin::HostShutdown>()}, + {::_pbi::TcParser::GetTable<::df::plugin::ServerInformationResponse>()}, {::_pbi::TcParser::GetTable<::df::plugin::EventEnvelope>()}, }}, {{ @@ -975,6 +1065,12 @@ ::uint8_t* PROTOBUF_NONNULL HostToPlugin::_InternalSerialize( stream); break; } + case kServerInfo: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 12, *this_._impl_.payload_.server_info_, this_._impl_.payload_.server_info_->GetCachedSize(), target, + stream); + break; + } case kEvent: { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 20, *this_._impl_.payload_.event_, this_._impl_.payload_.event_->GetCachedSize(), target, @@ -1030,6 +1126,12 @@ ::size_t HostToPlugin::ByteSizeLong() const { ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.payload_.shutdown_); break; } + // .df.plugin.ServerInformationResponse server_info = 12 [json_name = "serverInfo"]; + case kServerInfo: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.payload_.server_info_); + break; + } // .df.plugin.EventEnvelope event = 20 [json_name = "event"]; case kEvent: { total_size += 2 + @@ -1097,6 +1199,14 @@ void HostToPlugin::MergeImpl(::google::protobuf::MessageLite& to_msg, } break; } + case kServerInfo: { + if (oneof_needs_init) { + _this->_impl_.payload_.server_info_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.server_info_); + } else { + _this->_impl_.payload_.server_info_->MergeFrom(*from._impl_.payload_.server_info_); + } + break; + } case kEvent: { if (oneof_needs_init) { _this->_impl_.payload_.event_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.event_); @@ -1137,6 +1247,399 @@ ::google::protobuf::Metadata HostToPlugin::GetMetadata() const { } // =================================================================== +class ServerInformationRequest::_Internal { + public: +}; + +ServerInformationRequest::ServerInformationRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::internal::ZeroFieldsBase(arena, ServerInformationRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::internal::ZeroFieldsBase(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(arena_constructor:df.plugin.ServerInformationRequest) +} +ServerInformationRequest::ServerInformationRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ServerInformationRequest& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::internal::ZeroFieldsBase(arena, ServerInformationRequest_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::internal::ZeroFieldsBase(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ServerInformationRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:df.plugin.ServerInformationRequest) +} + +inline void* PROTOBUF_NONNULL ServerInformationRequest::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ServerInformationRequest(arena); +} +constexpr auto ServerInformationRequest::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ServerInformationRequest), + alignof(ServerInformationRequest)); +} +constexpr auto ServerInformationRequest::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_ServerInformationRequest_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ServerInformationRequest::MergeImpl, + ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ServerInformationRequest::SharedDtor, + ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &ServerInformationRequest::ByteSizeLong, + &ServerInformationRequest::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ServerInformationRequest, _impl_._cached_size_), + false, + }, + &ServerInformationRequest::kDescriptorMethods, + &descriptor_table_plugin_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull ServerInformationRequest_class_data_ = + ServerInformationRequest::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ServerInformationRequest::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&ServerInformationRequest_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(ServerInformationRequest_class_data_.tc_table); + return ServerInformationRequest_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 0, 0, 0, 2> +ServerInformationRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 0, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967295, // skipmap + offsetof(decltype(_table_), field_names), // no field_entries + 0, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ServerInformationRequest_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::df::plugin::ServerInformationRequest>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, // no field_entries, or aux_entries + {{ + }}, +}; + + + + + + + +::google::protobuf::Metadata ServerInformationRequest::GetMetadata() const { + return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class ServerInformationResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ServerInformationResponse, _impl_._has_bits_); +}; + +ServerInformationResponse::ServerInformationResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServerInformationResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:df.plugin.ServerInformationResponse) +} +PROTOBUF_NDEBUG_INLINE ServerInformationResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::df::plugin::ServerInformationResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + plugins_{visibility, arena, from.plugins_} {} + +ServerInformationResponse::ServerInformationResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const ServerInformationResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::Message(arena, ServerInformationResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::Message(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ServerInformationResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:df.plugin.ServerInformationResponse) +} +PROTOBUF_NDEBUG_INLINE ServerInformationResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0}, + plugins_{visibility, arena} {} + +inline void ServerInformationResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +ServerInformationResponse::~ServerInformationResponse() { + // @@protoc_insertion_point(destructor:df.plugin.ServerInformationResponse) + SharedDtor(*this); +} +inline void ServerInformationResponse::SharedDtor(MessageLite& self) { + ServerInformationResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL ServerInformationResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) ServerInformationResponse(arena); +} +constexpr auto ServerInformationResponse::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(ServerInformationResponse, _impl_.plugins_) + + decltype(ServerInformationResponse::_impl_.plugins_):: + InternalGetArenaOffset( + ::google::protobuf::Message::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(ServerInformationResponse), alignof(ServerInformationResponse), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&ServerInformationResponse::PlacementNew_, + sizeof(ServerInformationResponse), + alignof(ServerInformationResponse)); + } +} +constexpr auto ServerInformationResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataFull{ + ::google::protobuf::internal::ClassData{ + &_ServerInformationResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ServerInformationResponse::MergeImpl, + ::google::protobuf::Message::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ServerInformationResponse::SharedDtor, + ::google::protobuf::Message::GetClearImpl(), &ServerInformationResponse::ByteSizeLong, + &ServerInformationResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ServerInformationResponse, _impl_._cached_size_), + false, + }, + &ServerInformationResponse::kDescriptorMethods, + &descriptor_table_plugin_2eproto, + nullptr, // tracker + }; +} + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const + ::google::protobuf::internal::ClassDataFull ServerInformationResponse_class_data_ = + ServerInformationResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +ServerInformationResponse::GetClassData() const { + ::google::protobuf::internal::PrefetchToLocalCache(&ServerInformationResponse_class_data_); + ::google::protobuf::internal::PrefetchToLocalCache(ServerInformationResponse_class_data_.tc_table); + return ServerInformationResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 51, 2> +ServerInformationResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ServerInformationResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + ServerInformationResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::df::plugin::ServerInformationResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated string plugins = 1 [json_name = "plugins"]; + {::_pbi::TcParser::FastUR1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(ServerInformationResponse, _impl_.plugins_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated string plugins = 1 [json_name = "plugins"]; + {PROTOBUF_FIELD_OFFSET(ServerInformationResponse, _impl_.plugins_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + }}, + // no aux_entries + {{ + "\43\7\0\0\0\0\0\0" + "df.plugin.ServerInformationResponse" + "plugins" + }}, +}; +PROTOBUF_NOINLINE void ServerInformationResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:df.plugin.ServerInformationResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _impl_.plugins_.Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL ServerInformationResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const ServerInformationResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL ServerInformationResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const ServerInformationResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:df.plugin.ServerInformationResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // repeated string plugins = 1 [json_name = "plugins"]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + for (int i = 0, n = this_._internal_plugins_size(); i < n; ++i) { + const auto& s = this_._internal_plugins().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "df.plugin.ServerInformationResponse.plugins"); + target = stream->WriteString(1, s, target); + } + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:df.plugin.ServerInformationResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t ServerInformationResponse::ByteSizeLong(const MessageLite& base) { + const ServerInformationResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t ServerInformationResponse::ByteSizeLong() const { + const ServerInformationResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:df.plugin.ServerInformationResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated string plugins = 1 [json_name = "plugins"]; + cached_has_bits = this_._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_plugins().size()); + for (int i = 0, n = this_._internal_plugins().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_plugins().Get(i)); + } + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); +} + +void ServerInformationResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:df.plugin.ServerInformationResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { + _this->_internal_mutable_plugins()->InternalMergeFromWithArena( + ::google::protobuf::MessageLite::internal_visibility(), arena, + from._internal_plugins()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); +} + +void ServerInformationResponse::CopyFrom(const ServerInformationResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:df.plugin.ServerInformationResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ServerInformationResponse::InternalSwap(ServerInformationResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.plugins_.InternalSwap(&other->_impl_.plugins_); +} + +::google::protobuf::Metadata ServerInformationResponse::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + class HostHello::_Internal { public: using HasBits = @@ -4981,6 +5484,19 @@ void PluginToHost::set_allocated_subscribe(::df::plugin::EventSubscribe* PROTOBU } // @@protoc_insertion_point(field_set_allocated:df.plugin.PluginToHost.subscribe) } +void PluginToHost::set_allocated_server_info(::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE server_info) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_payload(); + if (server_info) { + ::google::protobuf::Arena* submessage_arena = server_info->GetArena(); + if (message_arena != submessage_arena) { + server_info = ::google::protobuf::internal::GetOwnedMessage(message_arena, server_info, submessage_arena); + } + set_has_server_info(); + _impl_.payload_.server_info_ = server_info; + } + // @@protoc_insertion_point(field_set_allocated:df.plugin.PluginToHost.server_info) +} void PluginToHost::set_allocated_actions(::df::plugin::ActionBatch* PROTOBUF_NULLABLE actions) { ::google::protobuf::Arena* message_arena = GetArena(); clear_payload(); @@ -5083,6 +5599,9 @@ PluginToHost::PluginToHost( case kSubscribe: _impl_.payload_.subscribe_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.subscribe_); break; + case kServerInfo: + _impl_.payload_.server_info_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.server_info_); + break; case kActions: _impl_.payload_.actions_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.actions_); break; @@ -5145,6 +5664,14 @@ void PluginToHost::clear_payload() { } break; } + case kServerInfo: { + if (GetArena() == nullptr) { + delete _impl_.payload_.server_info_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.payload_.server_info_); + } + break; + } case kActions: { if (GetArena() == nullptr) { delete _impl_.payload_.actions_; @@ -5220,17 +5747,17 @@ PluginToHost::GetClassData() const { return PluginToHost_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 6, 5, 40, 7> +const ::_pbi::TcParseTable<0, 7, 6, 40, 7> PluginToHost::_table_ = { { PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_._has_bits_), 0, // no _extensions_ 40, 0, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 3757570558, // skipmap + 3757568510, // skipmap offsetof(decltype(_table_), field_entries), - 6, // num_field_entries - 5, // num_aux_entries + 7, // num_field_entries + 6, // num_aux_entries offsetof(decltype(_table_), aux_entries), PluginToHost_class_data_.base(), nullptr, // post_loop_handler @@ -5245,7 +5772,7 @@ PluginToHost::_table_ = { PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.plugin_id_)}}, }}, {{ 40, 0, 1, - 65534, 5, + 65534, 6, 65535, 65535 }}, {{ // string plugin_id = 1 [json_name = "pluginId"]; @@ -5254,16 +5781,19 @@ PluginToHost::_table_ = { {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.hello_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .df.plugin.EventSubscribe subscribe = 11 [json_name = "subscribe"]; {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.subscribe_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .df.plugin.ServerInformationRequest server_info = 12 [json_name = "serverInfo"]; + {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.server_info_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .df.plugin.ActionBatch actions = 20 [json_name = "actions"]; - {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.actions_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.actions_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .df.plugin.LogMessage log = 30 [json_name = "log"]; - {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.log_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.log_), _Internal::kOneofCaseOffset + 0, 4, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .df.plugin.EventResult event_result = 40 [json_name = "eventResult"]; - {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.event_result_), _Internal::kOneofCaseOffset + 0, 4, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(PluginToHost, _impl_.payload_.event_result_), _Internal::kOneofCaseOffset + 0, 5, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::df::plugin::PluginHello>()}, {::_pbi::TcParser::GetTable<::df::plugin::EventSubscribe>()}, + {::_pbi::TcParser::GetTable<::df::plugin::ServerInformationRequest>()}, {::_pbi::TcParser::GetTable<::df::plugin::ActionBatch>()}, {::_pbi::TcParser::GetTable<::df::plugin::LogMessage>()}, {::_pbi::TcParser::GetTable<::df::plugin::EventResult>()}, @@ -5332,6 +5862,12 @@ ::uint8_t* PROTOBUF_NONNULL PluginToHost::_InternalSerialize( stream); break; } + case kServerInfo: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 12, *this_._impl_.payload_.server_info_, this_._impl_.payload_.server_info_->GetCachedSize(), target, + stream); + break; + } case kActions: { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 20, *this_._impl_.payload_.actions_, this_._impl_.payload_.actions_->GetCachedSize(), target, @@ -5399,6 +5935,12 @@ ::size_t PluginToHost::ByteSizeLong() const { ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.payload_.subscribe_); break; } + // .df.plugin.ServerInformationRequest server_info = 12 [json_name = "serverInfo"]; + case kServerInfo: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.payload_.server_info_); + break; + } // .df.plugin.ActionBatch actions = 20 [json_name = "actions"]; case kActions: { total_size += 2 + @@ -5478,6 +6020,14 @@ void PluginToHost::MergeImpl(::google::protobuf::MessageLite& to_msg, } break; } + case kServerInfo: { + if (oneof_needs_init) { + _this->_impl_.payload_.server_info_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.server_info_); + } else { + _this->_impl_.payload_.server_info_->MergeFrom(*from._impl_.payload_.server_info_); + } + break; + } case kActions: { if (oneof_needs_init) { _this->_impl_.payload_.actions_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.payload_.actions_); diff --git a/proto/generated/cpp/plugin.pb.h b/proto/generated/cpp/plugin.pb.h index 75964a4..e1dd6b1 100644 --- a/proto/generated/cpp/plugin.pb.h +++ b/proto/generated/cpp/plugin.pb.h @@ -20,6 +20,7 @@ #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_bases.h" #include "google/protobuf/generated_message_tctable_decl.h" #include "google/protobuf/generated_message_util.h" #include "google/protobuf/metadata_lite.h" @@ -95,6 +96,14 @@ class PluginToHost; struct PluginToHostDefaultTypeInternal; extern PluginToHostDefaultTypeInternal _PluginToHost_default_instance_; extern const ::google::protobuf::internal::ClassDataFull PluginToHost_class_data_; +class ServerInformationRequest; +struct ServerInformationRequestDefaultTypeInternal; +extern ServerInformationRequestDefaultTypeInternal _ServerInformationRequest_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull ServerInformationRequest_class_data_; +class ServerInformationResponse; +struct ServerInformationResponseDefaultTypeInternal; +extern ServerInformationResponseDefaultTypeInternal _ServerInformationResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataFull ServerInformationResponse_class_data_; } // namespace plugin } // namespace df namespace google { @@ -198,6 +207,342 @@ inline bool EventType_Parse( // ------------------------------------------------------------------- +class ServerInformationResponse final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:df.plugin.ServerInformationResponse) */ { + public: + inline ServerInformationResponse() : ServerInformationResponse(nullptr) {} + ~ServerInformationResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ServerInformationResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServerInformationResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ServerInformationResponse(::google::protobuf::internal::ConstantInitialized); + + inline ServerInformationResponse(const ServerInformationResponse& from) : ServerInformationResponse(nullptr, from) {} + inline ServerInformationResponse(ServerInformationResponse&& from) noexcept + : ServerInformationResponse(nullptr, ::std::move(from)) {} + inline ServerInformationResponse& operator=(const ServerInformationResponse& from) { + CopyFrom(from); + return *this; + } + inline ServerInformationResponse& operator=(ServerInformationResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ServerInformationResponse& default_instance() { + return *reinterpret_cast( + &_ServerInformationResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(ServerInformationResponse& a, ServerInformationResponse& b) { a.Swap(&b); } + inline void Swap(ServerInformationResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServerInformationResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ServerInformationResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ServerInformationResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const ServerInformationResponse& from) { ServerInformationResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ServerInformationResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "df.plugin.ServerInformationResponse"; } + + explicit ServerInformationResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServerInformationResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServerInformationResponse& from); + ServerInformationResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServerInformationResponse&& from) noexcept + : ServerInformationResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kPluginsFieldNumber = 1, + }; + // repeated string plugins = 1 [json_name = "plugins"]; + int plugins_size() const; + private: + int _internal_plugins_size() const; + + public: + void clear_plugins() ; + const ::std::string& plugins(int index) const; + ::std::string* PROTOBUF_NONNULL mutable_plugins(int index); + template + void set_plugins(int index, Arg_&& value, Args_... args); + ::std::string* PROTOBUF_NONNULL add_plugins(); + template + void add_plugins(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField<::std::string>& plugins() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL mutable_plugins(); + + private: + const ::google::protobuf::RepeatedPtrField<::std::string>& _internal_plugins() const; + ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL _internal_mutable_plugins(); + + public: + // @@protoc_insertion_point(class_scope:df.plugin.ServerInformationResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, + 0, 51, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const ServerInformationResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField<::std::string> plugins_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_plugin_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataFull ServerInformationResponse_class_data_; +// ------------------------------------------------------------------- + +class ServerInformationRequest final : public ::google::protobuf::internal::ZeroFieldsBase +/* @@protoc_insertion_point(class_definition:df.plugin.ServerInformationRequest) */ { + public: + inline ServerInformationRequest() : ServerInformationRequest(nullptr) {} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ServerInformationRequest* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ServerInformationRequest)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ServerInformationRequest(::google::protobuf::internal::ConstantInitialized); + + inline ServerInformationRequest(const ServerInformationRequest& from) : ServerInformationRequest(nullptr, from) {} + inline ServerInformationRequest(ServerInformationRequest&& from) noexcept + : ServerInformationRequest(nullptr, ::std::move(from)) {} + inline ServerInformationRequest& operator=(const ServerInformationRequest& from) { + CopyFrom(from); + return *this; + } + inline ServerInformationRequest& operator=(ServerInformationRequest&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ServerInformationRequest& default_instance() { + return *reinterpret_cast( + &_ServerInformationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(ServerInformationRequest& a, ServerInformationRequest& b) { a.Swap(&b); } + inline void Swap(ServerInformationRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServerInformationRequest* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ServerInformationRequest* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const ServerInformationRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const ServerInformationRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + + public: + bool IsInitialized() const { + return true; + } + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "df.plugin.ServerInformationRequest"; } + + explicit ServerInformationRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + ServerInformationRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ServerInformationRequest& from); + ServerInformationRequest( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ServerInformationRequest&& from) noexcept + : ServerInformationRequest(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + // @@protoc_insertion_point(class_scope:df.plugin.ServerInformationRequest) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 0, + 0, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + friend struct ::TableStruct_plugin_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataFull ServerInformationRequest_class_data_; +// ------------------------------------------------------------------- + class LogMessage final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:df.plugin.LogMessage) */ { public: @@ -253,7 +598,7 @@ class LogMessage final : public ::google::protobuf::Message return *reinterpret_cast( &_LogMessage_default_instance_); } - static constexpr int kIndexInFileMessages = 6; + static constexpr int kIndexInFileMessages = 8; friend void swap(LogMessage& a, LogMessage& b) { a.Swap(&b); } inline void Swap(LogMessage* PROTOBUF_NONNULL other) { if (other == this) return; @@ -465,7 +810,7 @@ class HostShutdown final : public ::google::protobuf::Message return *reinterpret_cast( &_HostShutdown_default_instance_); } - static constexpr int kIndexInFileMessages = 2; + static constexpr int kIndexInFileMessages = 4; friend void swap(HostShutdown& a, HostShutdown& b) { a.Swap(&b); } inline void Swap(HostShutdown* PROTOBUF_NONNULL other) { if (other == this) return; @@ -660,7 +1005,7 @@ class HostHello final : public ::google::protobuf::Message return *reinterpret_cast( &_HostHello_default_instance_); } - static constexpr int kIndexInFileMessages = 1; + static constexpr int kIndexInFileMessages = 3; friend void swap(HostHello& a, HostHello& b) { a.Swap(&b); } inline void Swap(HostHello* PROTOBUF_NONNULL other) { if (other == this) return; @@ -855,7 +1200,7 @@ class EventSubscribe final : public ::google::protobuf::Message return *reinterpret_cast( &_EventSubscribe_default_instance_); } - static constexpr int kIndexInFileMessages = 7; + static constexpr int kIndexInFileMessages = 9; friend void swap(EventSubscribe& a, EventSubscribe& b) { a.Swap(&b); } inline void Swap(EventSubscribe* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1055,7 +1400,7 @@ class PluginHello final : public ::google::protobuf::Message return *reinterpret_cast( &_PluginHello_default_instance_); } - static constexpr int kIndexInFileMessages = 5; + static constexpr int kIndexInFileMessages = 7; friend void swap(PluginHello& a, PluginHello& b) { a.Swap(&b); } inline void Swap(PluginHello* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1325,12 +1670,13 @@ class PluginToHost final : public ::google::protobuf::Message enum PayloadCase { kHello = 10, kSubscribe = 11, + kServerInfo = 12, kActions = 20, kLog = 30, kEventResult = 40, PAYLOAD_NOT_SET = 0, }; - static constexpr int kIndexInFileMessages = 4; + static constexpr int kIndexInFileMessages = 6; friend void swap(PluginToHost& a, PluginToHost& b) { a.Swap(&b); } inline void Swap(PluginToHost* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1420,6 +1766,7 @@ class PluginToHost final : public ::google::protobuf::Message kPluginIdFieldNumber = 1, kHelloFieldNumber = 10, kSubscribeFieldNumber = 11, + kServerInfoFieldNumber = 12, kActionsFieldNumber = 20, kLogFieldNumber = 30, kEventResultFieldNumber = 40, @@ -1476,6 +1823,25 @@ class PluginToHost final : public ::google::protobuf::Message const ::df::plugin::EventSubscribe& _internal_subscribe() const; ::df::plugin::EventSubscribe* PROTOBUF_NONNULL _internal_mutable_subscribe(); + public: + // .df.plugin.ServerInformationRequest server_info = 12 [json_name = "serverInfo"]; + bool has_server_info() const; + private: + bool _internal_has_server_info() const; + + public: + void clear_server_info() ; + const ::df::plugin::ServerInformationRequest& server_info() const; + [[nodiscard]] ::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE release_server_info(); + ::df::plugin::ServerInformationRequest* PROTOBUF_NONNULL mutable_server_info(); + void set_allocated_server_info(::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_server_info(::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE value); + ::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE unsafe_arena_release_server_info(); + + private: + const ::df::plugin::ServerInformationRequest& _internal_server_info() const; + ::df::plugin::ServerInformationRequest* PROTOBUF_NONNULL _internal_mutable_server_info(); + public: // .df.plugin.ActionBatch actions = 20 [json_name = "actions"]; bool has_actions() const; @@ -1541,14 +1907,15 @@ class PluginToHost final : public ::google::protobuf::Message class _Internal; void set_has_hello(); void set_has_subscribe(); + void set_has_server_info(); void set_has_actions(); void set_has_log(); void set_has_event_result(); inline bool has_payload() const; inline void clear_has_payload(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 6, - 5, 40, + static const ::google::protobuf::internal::TcParseTable<0, 7, + 6, 40, 7> _table_; @@ -1575,6 +1942,7 @@ class PluginToHost final : public ::google::protobuf::Message ::google::protobuf::internal::ConstantInitialized _constinit_; ::google::protobuf::Message* PROTOBUF_NULLABLE hello_; ::google::protobuf::Message* PROTOBUF_NULLABLE subscribe_; + ::google::protobuf::Message* PROTOBUF_NULLABLE server_info_; ::google::protobuf::Message* PROTOBUF_NULLABLE actions_; ::google::protobuf::Message* PROTOBUF_NULLABLE log_; ::google::protobuf::Message* PROTOBUF_NULLABLE event_result_; @@ -1696,7 +2064,7 @@ class EventEnvelope final : public ::google::protobuf::Message kWorldClose = 81, PAYLOAD_NOT_SET = 0, }; - static constexpr int kIndexInFileMessages = 3; + static constexpr int kIndexInFileMessages = 5; friend void swap(EventEnvelope& a, EventEnvelope& b) { a.Swap(&b); } inline void Swap(EventEnvelope* PROTOBUF_NONNULL other) { if (other == this) return; @@ -3005,6 +3373,7 @@ class HostToPlugin final : public ::google::protobuf::Message enum PayloadCase { kHello = 10, kShutdown = 11, + kServerInfo = 12, kEvent = 20, PAYLOAD_NOT_SET = 0, }; @@ -3098,6 +3467,7 @@ class HostToPlugin final : public ::google::protobuf::Message kPluginIdFieldNumber = 1, kHelloFieldNumber = 10, kShutdownFieldNumber = 11, + kServerInfoFieldNumber = 12, kEventFieldNumber = 20, }; // string plugin_id = 1 [json_name = "pluginId"]; @@ -3152,6 +3522,25 @@ class HostToPlugin final : public ::google::protobuf::Message const ::df::plugin::HostShutdown& _internal_shutdown() const; ::df::plugin::HostShutdown* PROTOBUF_NONNULL _internal_mutable_shutdown(); + public: + // .df.plugin.ServerInformationResponse server_info = 12 [json_name = "serverInfo"]; + bool has_server_info() const; + private: + bool _internal_has_server_info() const; + + public: + void clear_server_info() ; + const ::df::plugin::ServerInformationResponse& server_info() const; + [[nodiscard]] ::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE release_server_info(); + ::df::plugin::ServerInformationResponse* PROTOBUF_NONNULL mutable_server_info(); + void set_allocated_server_info(::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_server_info(::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE value); + ::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE unsafe_arena_release_server_info(); + + private: + const ::df::plugin::ServerInformationResponse& _internal_server_info() const; + ::df::plugin::ServerInformationResponse* PROTOBUF_NONNULL _internal_mutable_server_info(); + public: // .df.plugin.EventEnvelope event = 20 [json_name = "event"]; bool has_event() const; @@ -3179,12 +3568,13 @@ class HostToPlugin final : public ::google::protobuf::Message class _Internal; void set_has_hello(); void set_has_shutdown(); + void set_has_server_info(); void set_has_event(); inline bool has_payload() const; inline void clear_has_payload(); friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 4, - 3, 40, + static const ::google::protobuf::internal::TcParseTable<0, 5, + 4, 40, 2> _table_; @@ -3211,6 +3601,7 @@ class HostToPlugin final : public ::google::protobuf::Message ::google::protobuf::internal::ConstantInitialized _constinit_; ::google::protobuf::Message* PROTOBUF_NULLABLE hello_; ::google::protobuf::Message* PROTOBUF_NULLABLE shutdown_; + ::google::protobuf::Message* PROTOBUF_NULLABLE server_info_; ::google::protobuf::Message* PROTOBUF_NULLABLE event_; } payload_; ::uint32_t _oneof_case_[1]; @@ -3467,6 +3858,88 @@ inline ::df::plugin::HostShutdown* PROTOBUF_NONNULL HostToPlugin::mutable_shutdo return _msg; } +// .df.plugin.ServerInformationResponse server_info = 12 [json_name = "serverInfo"]; +inline bool HostToPlugin::has_server_info() const { + return payload_case() == kServerInfo; +} +inline bool HostToPlugin::_internal_has_server_info() const { + return payload_case() == kServerInfo; +} +inline void HostToPlugin::set_has_server_info() { + _impl_._oneof_case_[0] = kServerInfo; +} +inline void HostToPlugin::clear_server_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (payload_case() == kServerInfo) { + if (GetArena() == nullptr) { + delete _impl_.payload_.server_info_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.payload_.server_info_); + } + clear_has_payload(); + } +} +inline ::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE HostToPlugin::release_server_info() { + // @@protoc_insertion_point(field_release:df.plugin.HostToPlugin.server_info) + if (payload_case() == kServerInfo) { + clear_has_payload(); + auto* temp = reinterpret_cast<::df::plugin::ServerInformationResponse*>(_impl_.payload_.server_info_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.payload_.server_info_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::df::plugin::ServerInformationResponse& HostToPlugin::_internal_server_info() const { + return payload_case() == kServerInfo ? static_cast(*reinterpret_cast<::df::plugin::ServerInformationResponse*>(_impl_.payload_.server_info_)) + : reinterpret_cast(::df::plugin::_ServerInformationResponse_default_instance_); +} +inline const ::df::plugin::ServerInformationResponse& HostToPlugin::server_info() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:df.plugin.HostToPlugin.server_info) + return _internal_server_info(); +} +inline ::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE HostToPlugin::unsafe_arena_release_server_info() { + // @@protoc_insertion_point(field_unsafe_arena_release:df.plugin.HostToPlugin.server_info) + if (payload_case() == kServerInfo) { + clear_has_payload(); + auto* temp = reinterpret_cast<::df::plugin::ServerInformationResponse*>(_impl_.payload_.server_info_); + _impl_.payload_.server_info_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void HostToPlugin::unsafe_arena_set_allocated_server_info( + ::df::plugin::ServerInformationResponse* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_payload(); + if (value) { + set_has_server_info(); + _impl_.payload_.server_info_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:df.plugin.HostToPlugin.server_info) +} +inline ::df::plugin::ServerInformationResponse* PROTOBUF_NONNULL HostToPlugin::_internal_mutable_server_info() { + if (payload_case() != kServerInfo) { + clear_payload(); + set_has_server_info(); + _impl_.payload_.server_info_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::df::plugin::ServerInformationResponse>(GetArena())); + } + return reinterpret_cast<::df::plugin::ServerInformationResponse*>(_impl_.payload_.server_info_); +} +inline ::df::plugin::ServerInformationResponse* PROTOBUF_NONNULL HostToPlugin::mutable_server_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::df::plugin::ServerInformationResponse* _msg = _internal_mutable_server_info(); + // @@protoc_insertion_point(field_mutable:df.plugin.HostToPlugin.server_info) + return _msg; +} + // .df.plugin.EventEnvelope event = 20 [json_name = "event"]; inline bool HostToPlugin::has_event() const { return payload_case() == kEvent; @@ -3560,6 +4033,86 @@ inline HostToPlugin::PayloadCase HostToPlugin::payload_case() const { } // ------------------------------------------------------------------- +// ServerInformationRequest + +// ------------------------------------------------------------------- + +// ServerInformationResponse + +// repeated string plugins = 1 [json_name = "plugins"]; +inline int ServerInformationResponse::_internal_plugins_size() const { + return _internal_plugins().size(); +} +inline int ServerInformationResponse::plugins_size() const { + return _internal_plugins_size(); +} +inline void ServerInformationResponse::clear_plugins() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.plugins_.Clear(); + ClearHasBitForRepeated(_impl_._has_bits_[0], + 0x00000001U); +} +inline ::std::string* PROTOBUF_NONNULL ServerInformationResponse::add_plugins() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::std::string* _s = + _internal_mutable_plugins()->InternalAddWithArena( + ::google::protobuf::MessageLite::internal_visibility(), GetArena()); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add_mutable:df.plugin.ServerInformationResponse.plugins) + return _s; +} +inline const ::std::string& ServerInformationResponse::plugins(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:df.plugin.ServerInformationResponse.plugins) + return _internal_plugins().Get(index); +} +inline ::std::string* PROTOBUF_NONNULL ServerInformationResponse::mutable_plugins(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:df.plugin.ServerInformationResponse.plugins) + return _internal_mutable_plugins()->Mutable(index); +} +template +inline void ServerInformationResponse::set_plugins(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString(*_internal_mutable_plugins()->Mutable(index), ::std::forward(value), + args... ); + // @@protoc_insertion_point(field_set:df.plugin.ServerInformationResponse.plugins) +} +template +inline void ServerInformationResponse::add_plugins(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField( + ::google::protobuf::MessageLite::internal_visibility(), GetArena(), + *_internal_mutable_plugins(), ::std::forward(value), + args... ); + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_add:df.plugin.ServerInformationResponse.plugins) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& ServerInformationResponse::plugins() + const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:df.plugin.ServerInformationResponse.plugins) + return _internal_plugins(); +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +ServerInformationResponse::mutable_plugins() ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBitForRepeated(_impl_._has_bits_[0], 0x00000001U); + // @@protoc_insertion_point(field_mutable_list:df.plugin.ServerInformationResponse.plugins) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_plugins(); +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +ServerInformationResponse::_internal_plugins() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.plugins_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* PROTOBUF_NONNULL +ServerInformationResponse::_internal_mutable_plugins() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.plugins_; +} + +// ------------------------------------------------------------------- + // HostHello // string api_version = 1 [json_name = "apiVersion"]; @@ -7536,6 +8089,88 @@ inline ::df::plugin::EventSubscribe* PROTOBUF_NONNULL PluginToHost::mutable_subs return _msg; } +// .df.plugin.ServerInformationRequest server_info = 12 [json_name = "serverInfo"]; +inline bool PluginToHost::has_server_info() const { + return payload_case() == kServerInfo; +} +inline bool PluginToHost::_internal_has_server_info() const { + return payload_case() == kServerInfo; +} +inline void PluginToHost::set_has_server_info() { + _impl_._oneof_case_[0] = kServerInfo; +} +inline void PluginToHost::clear_server_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (payload_case() == kServerInfo) { + if (GetArena() == nullptr) { + delete _impl_.payload_.server_info_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.payload_.server_info_); + } + clear_has_payload(); + } +} +inline ::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE PluginToHost::release_server_info() { + // @@protoc_insertion_point(field_release:df.plugin.PluginToHost.server_info) + if (payload_case() == kServerInfo) { + clear_has_payload(); + auto* temp = reinterpret_cast<::df::plugin::ServerInformationRequest*>(_impl_.payload_.server_info_); + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.payload_.server_info_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::df::plugin::ServerInformationRequest& PluginToHost::_internal_server_info() const { + return payload_case() == kServerInfo ? static_cast(*reinterpret_cast<::df::plugin::ServerInformationRequest*>(_impl_.payload_.server_info_)) + : reinterpret_cast(::df::plugin::_ServerInformationRequest_default_instance_); +} +inline const ::df::plugin::ServerInformationRequest& PluginToHost::server_info() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:df.plugin.PluginToHost.server_info) + return _internal_server_info(); +} +inline ::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE PluginToHost::unsafe_arena_release_server_info() { + // @@protoc_insertion_point(field_unsafe_arena_release:df.plugin.PluginToHost.server_info) + if (payload_case() == kServerInfo) { + clear_has_payload(); + auto* temp = reinterpret_cast<::df::plugin::ServerInformationRequest*>(_impl_.payload_.server_info_); + _impl_.payload_.server_info_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void PluginToHost::unsafe_arena_set_allocated_server_info( + ::df::plugin::ServerInformationRequest* PROTOBUF_NULLABLE value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_payload(); + if (value) { + set_has_server_info(); + _impl_.payload_.server_info_ = reinterpret_cast<::google::protobuf::Message*>(value); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:df.plugin.PluginToHost.server_info) +} +inline ::df::plugin::ServerInformationRequest* PROTOBUF_NONNULL PluginToHost::_internal_mutable_server_info() { + if (payload_case() != kServerInfo) { + clear_payload(); + set_has_server_info(); + _impl_.payload_.server_info_ = reinterpret_cast<::google::protobuf::Message*>( + ::google::protobuf::Message::DefaultConstruct<::df::plugin::ServerInformationRequest>(GetArena())); + } + return reinterpret_cast<::df::plugin::ServerInformationRequest*>(_impl_.payload_.server_info_); +} +inline ::df::plugin::ServerInformationRequest* PROTOBUF_NONNULL PluginToHost::mutable_server_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::df::plugin::ServerInformationRequest* _msg = _internal_mutable_server_info(); + // @@protoc_insertion_point(field_mutable:df.plugin.PluginToHost.server_info) + return _msg; +} + // .df.plugin.ActionBatch actions = 20 [json_name = "actions"]; inline bool PluginToHost::has_actions() const { return payload_case() == kActions; diff --git a/proto/generated/go/plugin.pb.go b/proto/generated/go/plugin.pb.go index 56bba10..b770bde 100644 --- a/proto/generated/go/plugin.pb.go +++ b/proto/generated/go/plugin.pb.go @@ -221,6 +221,7 @@ type HostToPlugin struct { // // *HostToPlugin_Hello // *HostToPlugin_Shutdown + // *HostToPlugin_ServerInfo // *HostToPlugin_Event Payload isHostToPlugin_Payload `protobuf_oneof:"payload"` unknownFields protoimpl.UnknownFields @@ -289,6 +290,15 @@ func (x *HostToPlugin) GetShutdown() *HostShutdown { return nil } +func (x *HostToPlugin) GetServerInfo() *ServerInformationResponse { + if x != nil { + if x, ok := x.Payload.(*HostToPlugin_ServerInfo); ok { + return x.ServerInfo + } + } + return nil +} + func (x *HostToPlugin) GetEvent() *EventEnvelope { if x != nil { if x, ok := x.Payload.(*HostToPlugin_Event); ok { @@ -310,6 +320,10 @@ type HostToPlugin_Shutdown struct { Shutdown *HostShutdown `protobuf:"bytes,11,opt,name=shutdown,proto3,oneof"` } +type HostToPlugin_ServerInfo struct { + ServerInfo *ServerInformationResponse `protobuf:"bytes,12,opt,name=server_info,json=serverInfo,proto3,oneof"` +} + type HostToPlugin_Event struct { Event *EventEnvelope `protobuf:"bytes,20,opt,name=event,proto3,oneof"` } @@ -318,8 +332,90 @@ func (*HostToPlugin_Hello) isHostToPlugin_Payload() {} func (*HostToPlugin_Shutdown) isHostToPlugin_Payload() {} +func (*HostToPlugin_ServerInfo) isHostToPlugin_Payload() {} + func (*HostToPlugin_Event) isHostToPlugin_Payload() {} +type ServerInformationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServerInformationRequest) Reset() { + *x = ServerInformationRequest{} + mi := &file_plugin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServerInformationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerInformationRequest) ProtoMessage() {} + +func (x *ServerInformationRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerInformationRequest.ProtoReflect.Descriptor instead. +func (*ServerInformationRequest) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{1} +} + +type ServerInformationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Plugins []string `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServerInformationResponse) Reset() { + *x = ServerInformationResponse{} + mi := &file_plugin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServerInformationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerInformationResponse) ProtoMessage() {} + +func (x *ServerInformationResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerInformationResponse.ProtoReflect.Descriptor instead. +func (*ServerInformationResponse) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{2} +} + +func (x *ServerInformationResponse) GetPlugins() []string { + if x != nil { + return x.Plugins + } + return nil +} + type HostHello struct { state protoimpl.MessageState `protogen:"open.v1"` ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` @@ -329,7 +425,7 @@ type HostHello struct { func (x *HostHello) Reset() { *x = HostHello{} - mi := &file_plugin_proto_msgTypes[1] + mi := &file_plugin_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -341,7 +437,7 @@ func (x *HostHello) String() string { func (*HostHello) ProtoMessage() {} func (x *HostHello) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[1] + mi := &file_plugin_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -354,7 +450,7 @@ func (x *HostHello) ProtoReflect() protoreflect.Message { // Deprecated: Use HostHello.ProtoReflect.Descriptor instead. func (*HostHello) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{1} + return file_plugin_proto_rawDescGZIP(), []int{3} } func (x *HostHello) GetApiVersion() string { @@ -373,7 +469,7 @@ type HostShutdown struct { func (x *HostShutdown) Reset() { *x = HostShutdown{} - mi := &file_plugin_proto_msgTypes[2] + mi := &file_plugin_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -385,7 +481,7 @@ func (x *HostShutdown) String() string { func (*HostShutdown) ProtoMessage() {} func (x *HostShutdown) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[2] + mi := &file_plugin_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -398,7 +494,7 @@ func (x *HostShutdown) ProtoReflect() protoreflect.Message { // Deprecated: Use HostShutdown.ProtoReflect.Descriptor instead. func (*HostShutdown) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{2} + return file_plugin_proto_rawDescGZIP(), []int{4} } func (x *HostShutdown) GetReason() string { @@ -471,7 +567,7 @@ type EventEnvelope struct { func (x *EventEnvelope) Reset() { *x = EventEnvelope{} - mi := &file_plugin_proto_msgTypes[3] + mi := &file_plugin_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -483,7 +579,7 @@ func (x *EventEnvelope) String() string { func (*EventEnvelope) ProtoMessage() {} func (x *EventEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[3] + mi := &file_plugin_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -496,7 +592,7 @@ func (x *EventEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use EventEnvelope.ProtoReflect.Descriptor instead. func (*EventEnvelope) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{3} + return file_plugin_proto_rawDescGZIP(), []int{5} } func (x *EventEnvelope) GetEventId() string { @@ -1273,6 +1369,7 @@ type PluginToHost struct { // // *PluginToHost_Hello // *PluginToHost_Subscribe + // *PluginToHost_ServerInfo // *PluginToHost_Actions // *PluginToHost_Log // *PluginToHost_EventResult @@ -1283,7 +1380,7 @@ type PluginToHost struct { func (x *PluginToHost) Reset() { *x = PluginToHost{} - mi := &file_plugin_proto_msgTypes[4] + mi := &file_plugin_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1295,7 +1392,7 @@ func (x *PluginToHost) String() string { func (*PluginToHost) ProtoMessage() {} func (x *PluginToHost) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[4] + mi := &file_plugin_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1308,7 +1405,7 @@ func (x *PluginToHost) ProtoReflect() protoreflect.Message { // Deprecated: Use PluginToHost.ProtoReflect.Descriptor instead. func (*PluginToHost) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{4} + return file_plugin_proto_rawDescGZIP(), []int{6} } func (x *PluginToHost) GetPluginId() string { @@ -1343,6 +1440,15 @@ func (x *PluginToHost) GetSubscribe() *EventSubscribe { return nil } +func (x *PluginToHost) GetServerInfo() *ServerInformationRequest { + if x != nil { + if x, ok := x.Payload.(*PluginToHost_ServerInfo); ok { + return x.ServerInfo + } + } + return nil +} + func (x *PluginToHost) GetActions() *ActionBatch { if x != nil { if x, ok := x.Payload.(*PluginToHost_Actions); ok { @@ -1382,6 +1488,10 @@ type PluginToHost_Subscribe struct { Subscribe *EventSubscribe `protobuf:"bytes,11,opt,name=subscribe,proto3,oneof"` } +type PluginToHost_ServerInfo struct { + ServerInfo *ServerInformationRequest `protobuf:"bytes,12,opt,name=server_info,json=serverInfo,proto3,oneof"` +} + type PluginToHost_Actions struct { Actions *ActionBatch `protobuf:"bytes,20,opt,name=actions,proto3,oneof"` } @@ -1398,6 +1508,8 @@ func (*PluginToHost_Hello) isPluginToHost_Payload() {} func (*PluginToHost_Subscribe) isPluginToHost_Payload() {} +func (*PluginToHost_ServerInfo) isPluginToHost_Payload() {} + func (*PluginToHost_Actions) isPluginToHost_Payload() {} func (*PluginToHost_Log) isPluginToHost_Payload() {} @@ -1417,7 +1529,7 @@ type PluginHello struct { func (x *PluginHello) Reset() { *x = PluginHello{} - mi := &file_plugin_proto_msgTypes[5] + mi := &file_plugin_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1429,7 +1541,7 @@ func (x *PluginHello) String() string { func (*PluginHello) ProtoMessage() {} func (x *PluginHello) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[5] + mi := &file_plugin_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1442,7 +1554,7 @@ func (x *PluginHello) ProtoReflect() protoreflect.Message { // Deprecated: Use PluginHello.ProtoReflect.Descriptor instead. func (*PluginHello) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{5} + return file_plugin_proto_rawDescGZIP(), []int{7} } func (x *PluginHello) GetName() string { @@ -1490,7 +1602,7 @@ type LogMessage struct { func (x *LogMessage) Reset() { *x = LogMessage{} - mi := &file_plugin_proto_msgTypes[6] + mi := &file_plugin_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1502,7 +1614,7 @@ func (x *LogMessage) String() string { func (*LogMessage) ProtoMessage() {} func (x *LogMessage) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[6] + mi := &file_plugin_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1515,7 +1627,7 @@ func (x *LogMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use LogMessage.ProtoReflect.Descriptor instead. func (*LogMessage) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{6} + return file_plugin_proto_rawDescGZIP(), []int{8} } func (x *LogMessage) GetLevel() string { @@ -1541,7 +1653,7 @@ type EventSubscribe struct { func (x *EventSubscribe) Reset() { *x = EventSubscribe{} - mi := &file_plugin_proto_msgTypes[7] + mi := &file_plugin_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1553,7 +1665,7 @@ func (x *EventSubscribe) String() string { func (*EventSubscribe) ProtoMessage() {} func (x *EventSubscribe) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[7] + mi := &file_plugin_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1566,7 +1678,7 @@ func (x *EventSubscribe) ProtoReflect() protoreflect.Message { // Deprecated: Use EventSubscribe.ProtoReflect.Descriptor instead. func (*EventSubscribe) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{7} + return file_plugin_proto_rawDescGZIP(), []int{9} } func (x *EventSubscribe) GetEvents() []EventType { @@ -1580,14 +1692,19 @@ var File_plugin_proto protoreflect.FileDescriptor const file_plugin_proto_rawDesc = "" + "\n" + - "\fplugin.proto\x12\tdf.plugin\x1a\x13player_events.proto\x1a\x12world_events.proto\x1a\rcommand.proto\x1a\ractions.proto\x1a\x0fmutations.proto\x1a\fcommon.proto\"\xcd\x01\n" + + "\fplugin.proto\x12\tdf.plugin\x1a\x13player_events.proto\x1a\x12world_events.proto\x1a\rcommand.proto\x1a\ractions.proto\x1a\x0fmutations.proto\x1a\fcommon.proto\"\x96\x02\n" + "\fHostToPlugin\x12\x1b\n" + "\tplugin_id\x18\x01 \x01(\tR\bpluginId\x12,\n" + "\x05hello\x18\n" + " \x01(\v2\x14.df.plugin.HostHelloH\x00R\x05hello\x125\n" + - "\bshutdown\x18\v \x01(\v2\x17.df.plugin.HostShutdownH\x00R\bshutdown\x120\n" + + "\bshutdown\x18\v \x01(\v2\x17.df.plugin.HostShutdownH\x00R\bshutdown\x12G\n" + + "\vserver_info\x18\f \x01(\v2$.df.plugin.ServerInformationResponseH\x00R\n" + + "serverInfo\x120\n" + "\x05event\x18\x14 \x01(\v2\x18.df.plugin.EventEnvelopeH\x00R\x05eventB\t\n" + - "\apayload\",\n" + + "\apayload\"\x1a\n" + + "\x18ServerInformationRequest\"5\n" + + "\x19ServerInformationResponse\x12\x18\n" + + "\aplugins\x18\x01 \x03(\tR\aplugins\",\n" + "\tHostHello\x12\x1f\n" + "\vapi_version\x18\x01 \x01(\tR\n" + "apiVersion\"&\n" + @@ -1656,12 +1773,14 @@ const file_plugin_proto_rawDesc = "" + "\x0fworld_explosion\x18P \x01(\v2\x1e.df.plugin.WorldExplosionEventH\x00R\x0eworldExplosion\x12=\n" + "\vworld_close\x18Q \x01(\v2\x1a.df.plugin.WorldCloseEventH\x00R\n" + "worldCloseB\t\n" + - "\apayload\"\xbd\x02\n" + + "\apayload\"\x85\x03\n" + "\fPluginToHost\x12\x1b\n" + "\tplugin_id\x18\x01 \x01(\tR\bpluginId\x12.\n" + "\x05hello\x18\n" + " \x01(\v2\x16.df.plugin.PluginHelloH\x00R\x05hello\x129\n" + - "\tsubscribe\x18\v \x01(\v2\x19.df.plugin.EventSubscribeH\x00R\tsubscribe\x122\n" + + "\tsubscribe\x18\v \x01(\v2\x19.df.plugin.EventSubscribeH\x00R\tsubscribe\x12F\n" + + "\vserver_info\x18\f \x01(\v2#.df.plugin.ServerInformationRequestH\x00R\n" + + "serverInfo\x122\n" + "\aactions\x18\x14 \x01(\v2\x16.df.plugin.ActionBatchH\x00R\aactions\x12)\n" + "\x03log\x18\x1e \x01(\v2\x15.df.plugin.LogMessageH\x00R\x03log\x12;\n" + "\fevent_result\x18( \x01(\v2\x16.df.plugin.EventResultH\x00R\veventResultB\t\n" + @@ -1750,140 +1869,144 @@ func file_plugin_proto_rawDescGZIP() []byte { } var file_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_plugin_proto_goTypes = []any{ (EventType)(0), // 0: df.plugin.EventType (*HostToPlugin)(nil), // 1: df.plugin.HostToPlugin - (*HostHello)(nil), // 2: df.plugin.HostHello - (*HostShutdown)(nil), // 3: df.plugin.HostShutdown - (*EventEnvelope)(nil), // 4: df.plugin.EventEnvelope - (*PluginToHost)(nil), // 5: df.plugin.PluginToHost - (*PluginHello)(nil), // 6: df.plugin.PluginHello - (*LogMessage)(nil), // 7: df.plugin.LogMessage - (*EventSubscribe)(nil), // 8: df.plugin.EventSubscribe - (*PlayerJoinEvent)(nil), // 9: df.plugin.PlayerJoinEvent - (*PlayerQuitEvent)(nil), // 10: df.plugin.PlayerQuitEvent - (*PlayerMoveEvent)(nil), // 11: df.plugin.PlayerMoveEvent - (*PlayerJumpEvent)(nil), // 12: df.plugin.PlayerJumpEvent - (*PlayerTeleportEvent)(nil), // 13: df.plugin.PlayerTeleportEvent - (*PlayerChangeWorldEvent)(nil), // 14: df.plugin.PlayerChangeWorldEvent - (*PlayerToggleSprintEvent)(nil), // 15: df.plugin.PlayerToggleSprintEvent - (*PlayerToggleSneakEvent)(nil), // 16: df.plugin.PlayerToggleSneakEvent - (*ChatEvent)(nil), // 17: df.plugin.ChatEvent - (*PlayerFoodLossEvent)(nil), // 18: df.plugin.PlayerFoodLossEvent - (*PlayerHealEvent)(nil), // 19: df.plugin.PlayerHealEvent - (*PlayerHurtEvent)(nil), // 20: df.plugin.PlayerHurtEvent - (*PlayerDeathEvent)(nil), // 21: df.plugin.PlayerDeathEvent - (*PlayerRespawnEvent)(nil), // 22: df.plugin.PlayerRespawnEvent - (*PlayerSkinChangeEvent)(nil), // 23: df.plugin.PlayerSkinChangeEvent - (*PlayerFireExtinguishEvent)(nil), // 24: df.plugin.PlayerFireExtinguishEvent - (*PlayerStartBreakEvent)(nil), // 25: df.plugin.PlayerStartBreakEvent - (*BlockBreakEvent)(nil), // 26: df.plugin.BlockBreakEvent - (*PlayerBlockPlaceEvent)(nil), // 27: df.plugin.PlayerBlockPlaceEvent - (*PlayerBlockPickEvent)(nil), // 28: df.plugin.PlayerBlockPickEvent - (*PlayerItemUseEvent)(nil), // 29: df.plugin.PlayerItemUseEvent - (*PlayerItemUseOnBlockEvent)(nil), // 30: df.plugin.PlayerItemUseOnBlockEvent - (*PlayerItemUseOnEntityEvent)(nil), // 31: df.plugin.PlayerItemUseOnEntityEvent - (*PlayerItemReleaseEvent)(nil), // 32: df.plugin.PlayerItemReleaseEvent - (*PlayerItemConsumeEvent)(nil), // 33: df.plugin.PlayerItemConsumeEvent - (*PlayerAttackEntityEvent)(nil), // 34: df.plugin.PlayerAttackEntityEvent - (*PlayerExperienceGainEvent)(nil), // 35: df.plugin.PlayerExperienceGainEvent - (*PlayerPunchAirEvent)(nil), // 36: df.plugin.PlayerPunchAirEvent - (*PlayerSignEditEvent)(nil), // 37: df.plugin.PlayerSignEditEvent - (*PlayerLecternPageTurnEvent)(nil), // 38: df.plugin.PlayerLecternPageTurnEvent - (*PlayerItemDamageEvent)(nil), // 39: df.plugin.PlayerItemDamageEvent - (*PlayerItemPickupEvent)(nil), // 40: df.plugin.PlayerItemPickupEvent - (*PlayerHeldSlotChangeEvent)(nil), // 41: df.plugin.PlayerHeldSlotChangeEvent - (*PlayerItemDropEvent)(nil), // 42: df.plugin.PlayerItemDropEvent - (*PlayerTransferEvent)(nil), // 43: df.plugin.PlayerTransferEvent - (*CommandEvent)(nil), // 44: df.plugin.CommandEvent - (*PlayerDiagnosticsEvent)(nil), // 45: df.plugin.PlayerDiagnosticsEvent - (*WorldLiquidFlowEvent)(nil), // 46: df.plugin.WorldLiquidFlowEvent - (*WorldLiquidDecayEvent)(nil), // 47: df.plugin.WorldLiquidDecayEvent - (*WorldLiquidHardenEvent)(nil), // 48: df.plugin.WorldLiquidHardenEvent - (*WorldSoundEvent)(nil), // 49: df.plugin.WorldSoundEvent - (*WorldFireSpreadEvent)(nil), // 50: df.plugin.WorldFireSpreadEvent - (*WorldBlockBurnEvent)(nil), // 51: df.plugin.WorldBlockBurnEvent - (*WorldCropTrampleEvent)(nil), // 52: df.plugin.WorldCropTrampleEvent - (*WorldLeavesDecayEvent)(nil), // 53: df.plugin.WorldLeavesDecayEvent - (*WorldEntitySpawnEvent)(nil), // 54: df.plugin.WorldEntitySpawnEvent - (*WorldEntityDespawnEvent)(nil), // 55: df.plugin.WorldEntityDespawnEvent - (*WorldExplosionEvent)(nil), // 56: df.plugin.WorldExplosionEvent - (*WorldCloseEvent)(nil), // 57: df.plugin.WorldCloseEvent - (*ActionBatch)(nil), // 58: df.plugin.ActionBatch - (*EventResult)(nil), // 59: df.plugin.EventResult - (*CommandSpec)(nil), // 60: df.plugin.CommandSpec - (*CustomItemDefinition)(nil), // 61: df.plugin.CustomItemDefinition + (*ServerInformationRequest)(nil), // 2: df.plugin.ServerInformationRequest + (*ServerInformationResponse)(nil), // 3: df.plugin.ServerInformationResponse + (*HostHello)(nil), // 4: df.plugin.HostHello + (*HostShutdown)(nil), // 5: df.plugin.HostShutdown + (*EventEnvelope)(nil), // 6: df.plugin.EventEnvelope + (*PluginToHost)(nil), // 7: df.plugin.PluginToHost + (*PluginHello)(nil), // 8: df.plugin.PluginHello + (*LogMessage)(nil), // 9: df.plugin.LogMessage + (*EventSubscribe)(nil), // 10: df.plugin.EventSubscribe + (*PlayerJoinEvent)(nil), // 11: df.plugin.PlayerJoinEvent + (*PlayerQuitEvent)(nil), // 12: df.plugin.PlayerQuitEvent + (*PlayerMoveEvent)(nil), // 13: df.plugin.PlayerMoveEvent + (*PlayerJumpEvent)(nil), // 14: df.plugin.PlayerJumpEvent + (*PlayerTeleportEvent)(nil), // 15: df.plugin.PlayerTeleportEvent + (*PlayerChangeWorldEvent)(nil), // 16: df.plugin.PlayerChangeWorldEvent + (*PlayerToggleSprintEvent)(nil), // 17: df.plugin.PlayerToggleSprintEvent + (*PlayerToggleSneakEvent)(nil), // 18: df.plugin.PlayerToggleSneakEvent + (*ChatEvent)(nil), // 19: df.plugin.ChatEvent + (*PlayerFoodLossEvent)(nil), // 20: df.plugin.PlayerFoodLossEvent + (*PlayerHealEvent)(nil), // 21: df.plugin.PlayerHealEvent + (*PlayerHurtEvent)(nil), // 22: df.plugin.PlayerHurtEvent + (*PlayerDeathEvent)(nil), // 23: df.plugin.PlayerDeathEvent + (*PlayerRespawnEvent)(nil), // 24: df.plugin.PlayerRespawnEvent + (*PlayerSkinChangeEvent)(nil), // 25: df.plugin.PlayerSkinChangeEvent + (*PlayerFireExtinguishEvent)(nil), // 26: df.plugin.PlayerFireExtinguishEvent + (*PlayerStartBreakEvent)(nil), // 27: df.plugin.PlayerStartBreakEvent + (*BlockBreakEvent)(nil), // 28: df.plugin.BlockBreakEvent + (*PlayerBlockPlaceEvent)(nil), // 29: df.plugin.PlayerBlockPlaceEvent + (*PlayerBlockPickEvent)(nil), // 30: df.plugin.PlayerBlockPickEvent + (*PlayerItemUseEvent)(nil), // 31: df.plugin.PlayerItemUseEvent + (*PlayerItemUseOnBlockEvent)(nil), // 32: df.plugin.PlayerItemUseOnBlockEvent + (*PlayerItemUseOnEntityEvent)(nil), // 33: df.plugin.PlayerItemUseOnEntityEvent + (*PlayerItemReleaseEvent)(nil), // 34: df.plugin.PlayerItemReleaseEvent + (*PlayerItemConsumeEvent)(nil), // 35: df.plugin.PlayerItemConsumeEvent + (*PlayerAttackEntityEvent)(nil), // 36: df.plugin.PlayerAttackEntityEvent + (*PlayerExperienceGainEvent)(nil), // 37: df.plugin.PlayerExperienceGainEvent + (*PlayerPunchAirEvent)(nil), // 38: df.plugin.PlayerPunchAirEvent + (*PlayerSignEditEvent)(nil), // 39: df.plugin.PlayerSignEditEvent + (*PlayerLecternPageTurnEvent)(nil), // 40: df.plugin.PlayerLecternPageTurnEvent + (*PlayerItemDamageEvent)(nil), // 41: df.plugin.PlayerItemDamageEvent + (*PlayerItemPickupEvent)(nil), // 42: df.plugin.PlayerItemPickupEvent + (*PlayerHeldSlotChangeEvent)(nil), // 43: df.plugin.PlayerHeldSlotChangeEvent + (*PlayerItemDropEvent)(nil), // 44: df.plugin.PlayerItemDropEvent + (*PlayerTransferEvent)(nil), // 45: df.plugin.PlayerTransferEvent + (*CommandEvent)(nil), // 46: df.plugin.CommandEvent + (*PlayerDiagnosticsEvent)(nil), // 47: df.plugin.PlayerDiagnosticsEvent + (*WorldLiquidFlowEvent)(nil), // 48: df.plugin.WorldLiquidFlowEvent + (*WorldLiquidDecayEvent)(nil), // 49: df.plugin.WorldLiquidDecayEvent + (*WorldLiquidHardenEvent)(nil), // 50: df.plugin.WorldLiquidHardenEvent + (*WorldSoundEvent)(nil), // 51: df.plugin.WorldSoundEvent + (*WorldFireSpreadEvent)(nil), // 52: df.plugin.WorldFireSpreadEvent + (*WorldBlockBurnEvent)(nil), // 53: df.plugin.WorldBlockBurnEvent + (*WorldCropTrampleEvent)(nil), // 54: df.plugin.WorldCropTrampleEvent + (*WorldLeavesDecayEvent)(nil), // 55: df.plugin.WorldLeavesDecayEvent + (*WorldEntitySpawnEvent)(nil), // 56: df.plugin.WorldEntitySpawnEvent + (*WorldEntityDespawnEvent)(nil), // 57: df.plugin.WorldEntityDespawnEvent + (*WorldExplosionEvent)(nil), // 58: df.plugin.WorldExplosionEvent + (*WorldCloseEvent)(nil), // 59: df.plugin.WorldCloseEvent + (*ActionBatch)(nil), // 60: df.plugin.ActionBatch + (*EventResult)(nil), // 61: df.plugin.EventResult + (*CommandSpec)(nil), // 62: df.plugin.CommandSpec + (*CustomItemDefinition)(nil), // 63: df.plugin.CustomItemDefinition } 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 - 0, // 3: df.plugin.EventEnvelope.type:type_name -> df.plugin.EventType - 9, // 4: df.plugin.EventEnvelope.player_join:type_name -> df.plugin.PlayerJoinEvent - 10, // 5: df.plugin.EventEnvelope.player_quit:type_name -> df.plugin.PlayerQuitEvent - 11, // 6: df.plugin.EventEnvelope.player_move:type_name -> df.plugin.PlayerMoveEvent - 12, // 7: df.plugin.EventEnvelope.player_jump:type_name -> df.plugin.PlayerJumpEvent - 13, // 8: df.plugin.EventEnvelope.player_teleport:type_name -> df.plugin.PlayerTeleportEvent - 14, // 9: df.plugin.EventEnvelope.player_change_world:type_name -> df.plugin.PlayerChangeWorldEvent - 15, // 10: df.plugin.EventEnvelope.player_toggle_sprint:type_name -> df.plugin.PlayerToggleSprintEvent - 16, // 11: df.plugin.EventEnvelope.player_toggle_sneak:type_name -> df.plugin.PlayerToggleSneakEvent - 17, // 12: df.plugin.EventEnvelope.chat:type_name -> df.plugin.ChatEvent - 18, // 13: df.plugin.EventEnvelope.player_food_loss:type_name -> df.plugin.PlayerFoodLossEvent - 19, // 14: df.plugin.EventEnvelope.player_heal:type_name -> df.plugin.PlayerHealEvent - 20, // 15: df.plugin.EventEnvelope.player_hurt:type_name -> df.plugin.PlayerHurtEvent - 21, // 16: df.plugin.EventEnvelope.player_death:type_name -> df.plugin.PlayerDeathEvent - 22, // 17: df.plugin.EventEnvelope.player_respawn:type_name -> df.plugin.PlayerRespawnEvent - 23, // 18: df.plugin.EventEnvelope.player_skin_change:type_name -> df.plugin.PlayerSkinChangeEvent - 24, // 19: df.plugin.EventEnvelope.player_fire_extinguish:type_name -> df.plugin.PlayerFireExtinguishEvent - 25, // 20: df.plugin.EventEnvelope.player_start_break:type_name -> df.plugin.PlayerStartBreakEvent - 26, // 21: df.plugin.EventEnvelope.block_break:type_name -> df.plugin.BlockBreakEvent - 27, // 22: df.plugin.EventEnvelope.player_block_place:type_name -> df.plugin.PlayerBlockPlaceEvent - 28, // 23: df.plugin.EventEnvelope.player_block_pick:type_name -> df.plugin.PlayerBlockPickEvent - 29, // 24: df.plugin.EventEnvelope.player_item_use:type_name -> df.plugin.PlayerItemUseEvent - 30, // 25: df.plugin.EventEnvelope.player_item_use_on_block:type_name -> df.plugin.PlayerItemUseOnBlockEvent - 31, // 26: df.plugin.EventEnvelope.player_item_use_on_entity:type_name -> df.plugin.PlayerItemUseOnEntityEvent - 32, // 27: df.plugin.EventEnvelope.player_item_release:type_name -> df.plugin.PlayerItemReleaseEvent - 33, // 28: df.plugin.EventEnvelope.player_item_consume:type_name -> df.plugin.PlayerItemConsumeEvent - 34, // 29: df.plugin.EventEnvelope.player_attack_entity:type_name -> df.plugin.PlayerAttackEntityEvent - 35, // 30: df.plugin.EventEnvelope.player_experience_gain:type_name -> df.plugin.PlayerExperienceGainEvent - 36, // 31: df.plugin.EventEnvelope.player_punch_air:type_name -> df.plugin.PlayerPunchAirEvent - 37, // 32: df.plugin.EventEnvelope.player_sign_edit:type_name -> df.plugin.PlayerSignEditEvent - 38, // 33: df.plugin.EventEnvelope.player_lectern_page_turn:type_name -> df.plugin.PlayerLecternPageTurnEvent - 39, // 34: df.plugin.EventEnvelope.player_item_damage:type_name -> df.plugin.PlayerItemDamageEvent - 40, // 35: df.plugin.EventEnvelope.player_item_pickup:type_name -> df.plugin.PlayerItemPickupEvent - 41, // 36: df.plugin.EventEnvelope.player_held_slot_change:type_name -> df.plugin.PlayerHeldSlotChangeEvent - 42, // 37: df.plugin.EventEnvelope.player_item_drop:type_name -> df.plugin.PlayerItemDropEvent - 43, // 38: df.plugin.EventEnvelope.player_transfer:type_name -> df.plugin.PlayerTransferEvent - 44, // 39: df.plugin.EventEnvelope.command:type_name -> df.plugin.CommandEvent - 45, // 40: df.plugin.EventEnvelope.player_diagnostics:type_name -> df.plugin.PlayerDiagnosticsEvent - 46, // 41: df.plugin.EventEnvelope.world_liquid_flow:type_name -> df.plugin.WorldLiquidFlowEvent - 47, // 42: df.plugin.EventEnvelope.world_liquid_decay:type_name -> df.plugin.WorldLiquidDecayEvent - 48, // 43: df.plugin.EventEnvelope.world_liquid_harden:type_name -> df.plugin.WorldLiquidHardenEvent - 49, // 44: df.plugin.EventEnvelope.world_sound:type_name -> df.plugin.WorldSoundEvent - 50, // 45: df.plugin.EventEnvelope.world_fire_spread:type_name -> df.plugin.WorldFireSpreadEvent - 51, // 46: df.plugin.EventEnvelope.world_block_burn:type_name -> df.plugin.WorldBlockBurnEvent - 52, // 47: df.plugin.EventEnvelope.world_crop_trample:type_name -> df.plugin.WorldCropTrampleEvent - 53, // 48: df.plugin.EventEnvelope.world_leaves_decay:type_name -> df.plugin.WorldLeavesDecayEvent - 54, // 49: df.plugin.EventEnvelope.world_entity_spawn:type_name -> df.plugin.WorldEntitySpawnEvent - 55, // 50: df.plugin.EventEnvelope.world_entity_despawn:type_name -> df.plugin.WorldEntityDespawnEvent - 56, // 51: df.plugin.EventEnvelope.world_explosion:type_name -> df.plugin.WorldExplosionEvent - 57, // 52: df.plugin.EventEnvelope.world_close:type_name -> df.plugin.WorldCloseEvent - 6, // 53: df.plugin.PluginToHost.hello:type_name -> df.plugin.PluginHello - 8, // 54: df.plugin.PluginToHost.subscribe:type_name -> df.plugin.EventSubscribe - 58, // 55: df.plugin.PluginToHost.actions:type_name -> df.plugin.ActionBatch - 7, // 56: df.plugin.PluginToHost.log:type_name -> df.plugin.LogMessage - 59, // 57: df.plugin.PluginToHost.event_result:type_name -> df.plugin.EventResult - 60, // 58: df.plugin.PluginHello.commands:type_name -> df.plugin.CommandSpec - 61, // 59: df.plugin.PluginHello.custom_items:type_name -> df.plugin.CustomItemDefinition - 0, // 60: df.plugin.EventSubscribe.events:type_name -> df.plugin.EventType - 5, // 61: df.plugin.Plugin.EventStream:input_type -> df.plugin.PluginToHost - 1, // 62: df.plugin.Plugin.EventStream:output_type -> df.plugin.HostToPlugin - 62, // [62:63] is the sub-list for method output_type - 61, // [61:62] is the sub-list for method input_type - 61, // [61:61] is the sub-list for extension type_name - 61, // [61:61] is the sub-list for extension extendee - 0, // [0:61] is the sub-list for field type_name + 4, // 0: df.plugin.HostToPlugin.hello:type_name -> df.plugin.HostHello + 5, // 1: df.plugin.HostToPlugin.shutdown:type_name -> df.plugin.HostShutdown + 3, // 2: df.plugin.HostToPlugin.server_info:type_name -> df.plugin.ServerInformationResponse + 6, // 3: df.plugin.HostToPlugin.event:type_name -> df.plugin.EventEnvelope + 0, // 4: df.plugin.EventEnvelope.type:type_name -> df.plugin.EventType + 11, // 5: df.plugin.EventEnvelope.player_join:type_name -> df.plugin.PlayerJoinEvent + 12, // 6: df.plugin.EventEnvelope.player_quit:type_name -> df.plugin.PlayerQuitEvent + 13, // 7: df.plugin.EventEnvelope.player_move:type_name -> df.plugin.PlayerMoveEvent + 14, // 8: df.plugin.EventEnvelope.player_jump:type_name -> df.plugin.PlayerJumpEvent + 15, // 9: df.plugin.EventEnvelope.player_teleport:type_name -> df.plugin.PlayerTeleportEvent + 16, // 10: df.plugin.EventEnvelope.player_change_world:type_name -> df.plugin.PlayerChangeWorldEvent + 17, // 11: df.plugin.EventEnvelope.player_toggle_sprint:type_name -> df.plugin.PlayerToggleSprintEvent + 18, // 12: df.plugin.EventEnvelope.player_toggle_sneak:type_name -> df.plugin.PlayerToggleSneakEvent + 19, // 13: df.plugin.EventEnvelope.chat:type_name -> df.plugin.ChatEvent + 20, // 14: df.plugin.EventEnvelope.player_food_loss:type_name -> df.plugin.PlayerFoodLossEvent + 21, // 15: df.plugin.EventEnvelope.player_heal:type_name -> df.plugin.PlayerHealEvent + 22, // 16: df.plugin.EventEnvelope.player_hurt:type_name -> df.plugin.PlayerHurtEvent + 23, // 17: df.plugin.EventEnvelope.player_death:type_name -> df.plugin.PlayerDeathEvent + 24, // 18: df.plugin.EventEnvelope.player_respawn:type_name -> df.plugin.PlayerRespawnEvent + 25, // 19: df.plugin.EventEnvelope.player_skin_change:type_name -> df.plugin.PlayerSkinChangeEvent + 26, // 20: df.plugin.EventEnvelope.player_fire_extinguish:type_name -> df.plugin.PlayerFireExtinguishEvent + 27, // 21: df.plugin.EventEnvelope.player_start_break:type_name -> df.plugin.PlayerStartBreakEvent + 28, // 22: df.plugin.EventEnvelope.block_break:type_name -> df.plugin.BlockBreakEvent + 29, // 23: df.plugin.EventEnvelope.player_block_place:type_name -> df.plugin.PlayerBlockPlaceEvent + 30, // 24: df.plugin.EventEnvelope.player_block_pick:type_name -> df.plugin.PlayerBlockPickEvent + 31, // 25: df.plugin.EventEnvelope.player_item_use:type_name -> df.plugin.PlayerItemUseEvent + 32, // 26: df.plugin.EventEnvelope.player_item_use_on_block:type_name -> df.plugin.PlayerItemUseOnBlockEvent + 33, // 27: df.plugin.EventEnvelope.player_item_use_on_entity:type_name -> df.plugin.PlayerItemUseOnEntityEvent + 34, // 28: df.plugin.EventEnvelope.player_item_release:type_name -> df.plugin.PlayerItemReleaseEvent + 35, // 29: df.plugin.EventEnvelope.player_item_consume:type_name -> df.plugin.PlayerItemConsumeEvent + 36, // 30: df.plugin.EventEnvelope.player_attack_entity:type_name -> df.plugin.PlayerAttackEntityEvent + 37, // 31: df.plugin.EventEnvelope.player_experience_gain:type_name -> df.plugin.PlayerExperienceGainEvent + 38, // 32: df.plugin.EventEnvelope.player_punch_air:type_name -> df.plugin.PlayerPunchAirEvent + 39, // 33: df.plugin.EventEnvelope.player_sign_edit:type_name -> df.plugin.PlayerSignEditEvent + 40, // 34: df.plugin.EventEnvelope.player_lectern_page_turn:type_name -> df.plugin.PlayerLecternPageTurnEvent + 41, // 35: df.plugin.EventEnvelope.player_item_damage:type_name -> df.plugin.PlayerItemDamageEvent + 42, // 36: df.plugin.EventEnvelope.player_item_pickup:type_name -> df.plugin.PlayerItemPickupEvent + 43, // 37: df.plugin.EventEnvelope.player_held_slot_change:type_name -> df.plugin.PlayerHeldSlotChangeEvent + 44, // 38: df.plugin.EventEnvelope.player_item_drop:type_name -> df.plugin.PlayerItemDropEvent + 45, // 39: df.plugin.EventEnvelope.player_transfer:type_name -> df.plugin.PlayerTransferEvent + 46, // 40: df.plugin.EventEnvelope.command:type_name -> df.plugin.CommandEvent + 47, // 41: df.plugin.EventEnvelope.player_diagnostics:type_name -> df.plugin.PlayerDiagnosticsEvent + 48, // 42: df.plugin.EventEnvelope.world_liquid_flow:type_name -> df.plugin.WorldLiquidFlowEvent + 49, // 43: df.plugin.EventEnvelope.world_liquid_decay:type_name -> df.plugin.WorldLiquidDecayEvent + 50, // 44: df.plugin.EventEnvelope.world_liquid_harden:type_name -> df.plugin.WorldLiquidHardenEvent + 51, // 45: df.plugin.EventEnvelope.world_sound:type_name -> df.plugin.WorldSoundEvent + 52, // 46: df.plugin.EventEnvelope.world_fire_spread:type_name -> df.plugin.WorldFireSpreadEvent + 53, // 47: df.plugin.EventEnvelope.world_block_burn:type_name -> df.plugin.WorldBlockBurnEvent + 54, // 48: df.plugin.EventEnvelope.world_crop_trample:type_name -> df.plugin.WorldCropTrampleEvent + 55, // 49: df.plugin.EventEnvelope.world_leaves_decay:type_name -> df.plugin.WorldLeavesDecayEvent + 56, // 50: df.plugin.EventEnvelope.world_entity_spawn:type_name -> df.plugin.WorldEntitySpawnEvent + 57, // 51: df.plugin.EventEnvelope.world_entity_despawn:type_name -> df.plugin.WorldEntityDespawnEvent + 58, // 52: df.plugin.EventEnvelope.world_explosion:type_name -> df.plugin.WorldExplosionEvent + 59, // 53: df.plugin.EventEnvelope.world_close:type_name -> df.plugin.WorldCloseEvent + 8, // 54: df.plugin.PluginToHost.hello:type_name -> df.plugin.PluginHello + 10, // 55: df.plugin.PluginToHost.subscribe:type_name -> df.plugin.EventSubscribe + 2, // 56: df.plugin.PluginToHost.server_info:type_name -> df.plugin.ServerInformationRequest + 60, // 57: df.plugin.PluginToHost.actions:type_name -> df.plugin.ActionBatch + 9, // 58: df.plugin.PluginToHost.log:type_name -> df.plugin.LogMessage + 61, // 59: df.plugin.PluginToHost.event_result:type_name -> df.plugin.EventResult + 62, // 60: df.plugin.PluginHello.commands:type_name -> df.plugin.CommandSpec + 63, // 61: df.plugin.PluginHello.custom_items:type_name -> df.plugin.CustomItemDefinition + 0, // 62: df.plugin.EventSubscribe.events:type_name -> df.plugin.EventType + 7, // 63: df.plugin.Plugin.EventStream:input_type -> df.plugin.PluginToHost + 1, // 64: df.plugin.Plugin.EventStream:output_type -> df.plugin.HostToPlugin + 64, // [64:65] is the sub-list for method output_type + 63, // [63:64] is the sub-list for method input_type + 63, // [63:63] is the sub-list for extension type_name + 63, // [63:63] is the sub-list for extension extendee + 0, // [0:63] is the sub-list for field type_name } func init() { file_plugin_proto_init() } @@ -1900,9 +2023,10 @@ func file_plugin_proto_init() { file_plugin_proto_msgTypes[0].OneofWrappers = []any{ (*HostToPlugin_Hello)(nil), (*HostToPlugin_Shutdown)(nil), + (*HostToPlugin_ServerInfo)(nil), (*HostToPlugin_Event)(nil), } - file_plugin_proto_msgTypes[3].OneofWrappers = []any{ + file_plugin_proto_msgTypes[5].OneofWrappers = []any{ (*EventEnvelope_PlayerJoin)(nil), (*EventEnvelope_PlayerQuit)(nil), (*EventEnvelope_PlayerMove)(nil), @@ -1953,9 +2077,10 @@ func file_plugin_proto_init() { (*EventEnvelope_WorldExplosion)(nil), (*EventEnvelope_WorldClose)(nil), } - file_plugin_proto_msgTypes[4].OneofWrappers = []any{ + file_plugin_proto_msgTypes[6].OneofWrappers = []any{ (*PluginToHost_Hello)(nil), (*PluginToHost_Subscribe)(nil), + (*PluginToHost_ServerInfo)(nil), (*PluginToHost_Actions)(nil), (*PluginToHost_Log)(nil), (*PluginToHost_EventResult)(nil), @@ -1966,7 +2091,7 @@ func file_plugin_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_plugin_proto_rawDesc), len(file_plugin_proto_rawDesc)), NumEnums: 1, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php b/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php index 22b358d..54385f6 100644 --- a/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php +++ b/proto/generated/php/Df/Plugin/GPBMetadata/Plugin.php @@ -22,7 +22,7 @@ public static function initOnce() { \Df\Plugin\GPBMetadata\Mutations::initOnce(); \Df\Plugin\GPBMetadata\Common::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xFF1\x0A\x0Cplugin.proto\x12\x09df.plugin\x1A\x12world_events.proto\x1A\x0Dcommand.proto\x1A\x0Dactions.proto\x1A\x0Fmutations.proto\x1A\x0Ccommon.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\"\xE6\x1E\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\x10expects_response\x18\x03 \x01(\x08R\x0FexpectsResponse\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\x0Bplayer_move\x18\x0C \x01(\x0B2\x1A.df.plugin.PlayerMoveEventH\x00R\x0AplayerMove\x12=\x0A\x0Bplayer_jump\x18\x0D \x01(\x0B2\x1A.df.plugin.PlayerJumpEventH\x00R\x0AplayerJump\x12I\x0A\x0Fplayer_teleport\x18\x0E \x01(\x0B2\x1E.df.plugin.PlayerTeleportEventH\x00R\x0EplayerTeleport\x12S\x0A\x13player_change_world\x18\x0F \x01(\x0B2!.df.plugin.PlayerChangeWorldEventH\x00R\x11playerChangeWorld\x12V\x0A\x14player_toggle_sprint\x18\x10 \x01(\x0B2\".df.plugin.PlayerToggleSprintEventH\x00R\x12playerToggleSprint\x12S\x0A\x13player_toggle_sneak\x18\x11 \x01(\x0B2!.df.plugin.PlayerToggleSneakEventH\x00R\x11playerToggleSneak\x12*\x0A\x04chat\x18\x12 \x01(\x0B2\x14.df.plugin.ChatEventH\x00R\x04chat\x12J\x0A\x10player_food_loss\x18\x13 \x01(\x0B2\x1E.df.plugin.PlayerFoodLossEventH\x00R\x0EplayerFoodLoss\x12=\x0A\x0Bplayer_heal\x18\x14 \x01(\x0B2\x1A.df.plugin.PlayerHealEventH\x00R\x0AplayerHeal\x12=\x0A\x0Bplayer_hurt\x18\x15 \x01(\x0B2\x1A.df.plugin.PlayerHurtEventH\x00R\x0AplayerHurt\x12@\x0A\x0Cplayer_death\x18\x16 \x01(\x0B2\x1B.df.plugin.PlayerDeathEventH\x00R\x0BplayerDeath\x12F\x0A\x0Eplayer_respawn\x18\x17 \x01(\x0B2\x1D.df.plugin.PlayerRespawnEventH\x00R\x0DplayerRespawn\x12P\x0A\x12player_skin_change\x18\x18 \x01(\x0B2 .df.plugin.PlayerSkinChangeEventH\x00R\x10playerSkinChange\x12\\\x0A\x16player_fire_extinguish\x18\x19 \x01(\x0B2\$.df.plugin.PlayerFireExtinguishEventH\x00R\x14playerFireExtinguish\x12P\x0A\x12player_start_break\x18\x1A \x01(\x0B2 .df.plugin.PlayerStartBreakEventH\x00R\x10playerStartBreak\x12=\x0A\x0Bblock_break\x18\x1B \x01(\x0B2\x1A.df.plugin.BlockBreakEventH\x00R\x0AblockBreak\x12P\x0A\x12player_block_place\x18\x1C \x01(\x0B2 .df.plugin.PlayerBlockPlaceEventH\x00R\x10playerBlockPlace\x12M\x0A\x11player_block_pick\x18\x1D \x01(\x0B2\x1F.df.plugin.PlayerBlockPickEventH\x00R\x0FplayerBlockPick\x12G\x0A\x0Fplayer_item_use\x18\x1E \x01(\x0B2\x1D.df.plugin.PlayerItemUseEventH\x00R\x0DplayerItemUse\x12^\x0A\x18player_item_use_on_block\x18\x1F \x01(\x0B2\$.df.plugin.PlayerItemUseOnBlockEventH\x00R\x14playerItemUseOnBlock\x12a\x0A\x19player_item_use_on_entity\x18 \x01(\x0B2%.df.plugin.PlayerItemUseOnEntityEventH\x00R\x15playerItemUseOnEntity\x12S\x0A\x13player_item_release\x18! \x01(\x0B2!.df.plugin.PlayerItemReleaseEventH\x00R\x11playerItemRelease\x12S\x0A\x13player_item_consume\x18\" \x01(\x0B2!.df.plugin.PlayerItemConsumeEventH\x00R\x11playerItemConsume\x12V\x0A\x14player_attack_entity\x18# \x01(\x0B2\".df.plugin.PlayerAttackEntityEventH\x00R\x12playerAttackEntity\x12\\\x0A\x16player_experience_gain\x18\$ \x01(\x0B2\$.df.plugin.PlayerExperienceGainEventH\x00R\x14playerExperienceGain\x12J\x0A\x10player_punch_air\x18% \x01(\x0B2\x1E.df.plugin.PlayerPunchAirEventH\x00R\x0EplayerPunchAir\x12J\x0A\x10player_sign_edit\x18& \x01(\x0B2\x1E.df.plugin.PlayerSignEditEventH\x00R\x0EplayerSignEdit\x12`\x0A\x18player_lectern_page_turn\x18' \x01(\x0B2%.df.plugin.PlayerLecternPageTurnEventH\x00R\x15playerLecternPageTurn\x12P\x0A\x12player_item_damage\x18( \x01(\x0B2 .df.plugin.PlayerItemDamageEventH\x00R\x10playerItemDamage\x12P\x0A\x12player_item_pickup\x18) \x01(\x0B2 .df.plugin.PlayerItemPickupEventH\x00R\x10playerItemPickup\x12]\x0A\x17player_held_slot_change\x18* \x01(\x0B2\$.df.plugin.PlayerHeldSlotChangeEventH\x00R\x14playerHeldSlotChange\x12J\x0A\x10player_item_drop\x18+ \x01(\x0B2\x1E.df.plugin.PlayerItemDropEventH\x00R\x0EplayerItemDrop\x12I\x0A\x0Fplayer_transfer\x18, \x01(\x0B2\x1E.df.plugin.PlayerTransferEventH\x00R\x0EplayerTransfer\x123\x0A\x07command\x18- \x01(\x0B2\x17.df.plugin.CommandEventH\x00R\x07command\x12R\x0A\x12player_diagnostics\x18. \x01(\x0B2!.df.plugin.PlayerDiagnosticsEventH\x00R\x11playerDiagnostics\x12M\x0A\x11world_liquid_flow\x18F \x01(\x0B2\x1F.df.plugin.WorldLiquidFlowEventH\x00R\x0FworldLiquidFlow\x12P\x0A\x12world_liquid_decay\x18G \x01(\x0B2 .df.plugin.WorldLiquidDecayEventH\x00R\x10worldLiquidDecay\x12S\x0A\x13world_liquid_harden\x18H \x01(\x0B2!.df.plugin.WorldLiquidHardenEventH\x00R\x11worldLiquidHarden\x12=\x0A\x0Bworld_sound\x18I \x01(\x0B2\x1A.df.plugin.WorldSoundEventH\x00R\x0AworldSound\x12M\x0A\x11world_fire_spread\x18J \x01(\x0B2\x1F.df.plugin.WorldFireSpreadEventH\x00R\x0FworldFireSpread\x12J\x0A\x10world_block_burn\x18K \x01(\x0B2\x1E.df.plugin.WorldBlockBurnEventH\x00R\x0EworldBlockBurn\x12P\x0A\x12world_crop_trample\x18L \x01(\x0B2 .df.plugin.WorldCropTrampleEventH\x00R\x10worldCropTrample\x12P\x0A\x12world_leaves_decay\x18M \x01(\x0B2 .df.plugin.WorldLeavesDecayEventH\x00R\x10worldLeavesDecay\x12P\x0A\x12world_entity_spawn\x18N \x01(\x0B2 .df.plugin.WorldEntitySpawnEventH\x00R\x10worldEntitySpawn\x12V\x0A\x14world_entity_despawn\x18O \x01(\x0B2\".df.plugin.WorldEntityDespawnEventH\x00R\x12worldEntityDespawn\x12I\x0A\x0Fworld_explosion\x18P \x01(\x0B2\x1E.df.plugin.WorldExplosionEventH\x00R\x0EworldExplosion\x12=\x0A\x0Bworld_close\x18Q \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\"\xD4\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\x12B\x0A\x0Ccustom_items\x18\x05 \x03(\x0B2\x1F.df.plugin.CustomItemDefinitionR\x0BcustomItems\"<\x0A\x0ALogMessage\x12\x14\x0A\x05level\x18\x01 \x01(\x09R\x05level\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\">\x0A\x0EEventSubscribe\x12,\x0A\x06events\x18\x01 \x03(\x0E2\x14.df.plugin.EventTypeR\x06events*\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\x10Q2M\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\xE33\x0A\x0Cplugin.proto\x12\x09df.plugin\x1A\x12world_events.proto\x1A\x0Dcommand.proto\x1A\x0Dactions.proto\x1A\x0Fmutations.proto\x1A\x0Ccommon.proto\"\x96\x02\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\x12G\x0A\x0Bserver_info\x18\x0C \x01(\x0B2\$.df.plugin.ServerInformationResponseH\x00R\x0AserverInfo\x120\x0A\x05event\x18\x14 \x01(\x0B2\x18.df.plugin.EventEnvelopeH\x00R\x05eventB\x09\x0A\x07payload\"\x1A\x0A\x18ServerInformationRequest\"5\x0A\x19ServerInformationResponse\x12\x18\x0A\x07plugins\x18\x01 \x03(\x09R\x07plugins\",\x0A\x09HostHello\x12\x1F\x0A\x0Bapi_version\x18\x01 \x01(\x09R\x0AapiVersion\"&\x0A\x0CHostShutdown\x12\x16\x0A\x06reason\x18\x01 \x01(\x09R\x06reason\"\xE6\x1E\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\x10expects_response\x18\x03 \x01(\x08R\x0FexpectsResponse\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\x0Bplayer_move\x18\x0C \x01(\x0B2\x1A.df.plugin.PlayerMoveEventH\x00R\x0AplayerMove\x12=\x0A\x0Bplayer_jump\x18\x0D \x01(\x0B2\x1A.df.plugin.PlayerJumpEventH\x00R\x0AplayerJump\x12I\x0A\x0Fplayer_teleport\x18\x0E \x01(\x0B2\x1E.df.plugin.PlayerTeleportEventH\x00R\x0EplayerTeleport\x12S\x0A\x13player_change_world\x18\x0F \x01(\x0B2!.df.plugin.PlayerChangeWorldEventH\x00R\x11playerChangeWorld\x12V\x0A\x14player_toggle_sprint\x18\x10 \x01(\x0B2\".df.plugin.PlayerToggleSprintEventH\x00R\x12playerToggleSprint\x12S\x0A\x13player_toggle_sneak\x18\x11 \x01(\x0B2!.df.plugin.PlayerToggleSneakEventH\x00R\x11playerToggleSneak\x12*\x0A\x04chat\x18\x12 \x01(\x0B2\x14.df.plugin.ChatEventH\x00R\x04chat\x12J\x0A\x10player_food_loss\x18\x13 \x01(\x0B2\x1E.df.plugin.PlayerFoodLossEventH\x00R\x0EplayerFoodLoss\x12=\x0A\x0Bplayer_heal\x18\x14 \x01(\x0B2\x1A.df.plugin.PlayerHealEventH\x00R\x0AplayerHeal\x12=\x0A\x0Bplayer_hurt\x18\x15 \x01(\x0B2\x1A.df.plugin.PlayerHurtEventH\x00R\x0AplayerHurt\x12@\x0A\x0Cplayer_death\x18\x16 \x01(\x0B2\x1B.df.plugin.PlayerDeathEventH\x00R\x0BplayerDeath\x12F\x0A\x0Eplayer_respawn\x18\x17 \x01(\x0B2\x1D.df.plugin.PlayerRespawnEventH\x00R\x0DplayerRespawn\x12P\x0A\x12player_skin_change\x18\x18 \x01(\x0B2 .df.plugin.PlayerSkinChangeEventH\x00R\x10playerSkinChange\x12\\\x0A\x16player_fire_extinguish\x18\x19 \x01(\x0B2\$.df.plugin.PlayerFireExtinguishEventH\x00R\x14playerFireExtinguish\x12P\x0A\x12player_start_break\x18\x1A \x01(\x0B2 .df.plugin.PlayerStartBreakEventH\x00R\x10playerStartBreak\x12=\x0A\x0Bblock_break\x18\x1B \x01(\x0B2\x1A.df.plugin.BlockBreakEventH\x00R\x0AblockBreak\x12P\x0A\x12player_block_place\x18\x1C \x01(\x0B2 .df.plugin.PlayerBlockPlaceEventH\x00R\x10playerBlockPlace\x12M\x0A\x11player_block_pick\x18\x1D \x01(\x0B2\x1F.df.plugin.PlayerBlockPickEventH\x00R\x0FplayerBlockPick\x12G\x0A\x0Fplayer_item_use\x18\x1E \x01(\x0B2\x1D.df.plugin.PlayerItemUseEventH\x00R\x0DplayerItemUse\x12^\x0A\x18player_item_use_on_block\x18\x1F \x01(\x0B2\$.df.plugin.PlayerItemUseOnBlockEventH\x00R\x14playerItemUseOnBlock\x12a\x0A\x19player_item_use_on_entity\x18 \x01(\x0B2%.df.plugin.PlayerItemUseOnEntityEventH\x00R\x15playerItemUseOnEntity\x12S\x0A\x13player_item_release\x18! \x01(\x0B2!.df.plugin.PlayerItemReleaseEventH\x00R\x11playerItemRelease\x12S\x0A\x13player_item_consume\x18\" \x01(\x0B2!.df.plugin.PlayerItemConsumeEventH\x00R\x11playerItemConsume\x12V\x0A\x14player_attack_entity\x18# \x01(\x0B2\".df.plugin.PlayerAttackEntityEventH\x00R\x12playerAttackEntity\x12\\\x0A\x16player_experience_gain\x18\$ \x01(\x0B2\$.df.plugin.PlayerExperienceGainEventH\x00R\x14playerExperienceGain\x12J\x0A\x10player_punch_air\x18% \x01(\x0B2\x1E.df.plugin.PlayerPunchAirEventH\x00R\x0EplayerPunchAir\x12J\x0A\x10player_sign_edit\x18& \x01(\x0B2\x1E.df.plugin.PlayerSignEditEventH\x00R\x0EplayerSignEdit\x12`\x0A\x18player_lectern_page_turn\x18' \x01(\x0B2%.df.plugin.PlayerLecternPageTurnEventH\x00R\x15playerLecternPageTurn\x12P\x0A\x12player_item_damage\x18( \x01(\x0B2 .df.plugin.PlayerItemDamageEventH\x00R\x10playerItemDamage\x12P\x0A\x12player_item_pickup\x18) \x01(\x0B2 .df.plugin.PlayerItemPickupEventH\x00R\x10playerItemPickup\x12]\x0A\x17player_held_slot_change\x18* \x01(\x0B2\$.df.plugin.PlayerHeldSlotChangeEventH\x00R\x14playerHeldSlotChange\x12J\x0A\x10player_item_drop\x18+ \x01(\x0B2\x1E.df.plugin.PlayerItemDropEventH\x00R\x0EplayerItemDrop\x12I\x0A\x0Fplayer_transfer\x18, \x01(\x0B2\x1E.df.plugin.PlayerTransferEventH\x00R\x0EplayerTransfer\x123\x0A\x07command\x18- \x01(\x0B2\x17.df.plugin.CommandEventH\x00R\x07command\x12R\x0A\x12player_diagnostics\x18. \x01(\x0B2!.df.plugin.PlayerDiagnosticsEventH\x00R\x11playerDiagnostics\x12M\x0A\x11world_liquid_flow\x18F \x01(\x0B2\x1F.df.plugin.WorldLiquidFlowEventH\x00R\x0FworldLiquidFlow\x12P\x0A\x12world_liquid_decay\x18G \x01(\x0B2 .df.plugin.WorldLiquidDecayEventH\x00R\x10worldLiquidDecay\x12S\x0A\x13world_liquid_harden\x18H \x01(\x0B2!.df.plugin.WorldLiquidHardenEventH\x00R\x11worldLiquidHarden\x12=\x0A\x0Bworld_sound\x18I \x01(\x0B2\x1A.df.plugin.WorldSoundEventH\x00R\x0AworldSound\x12M\x0A\x11world_fire_spread\x18J \x01(\x0B2\x1F.df.plugin.WorldFireSpreadEventH\x00R\x0FworldFireSpread\x12J\x0A\x10world_block_burn\x18K \x01(\x0B2\x1E.df.plugin.WorldBlockBurnEventH\x00R\x0EworldBlockBurn\x12P\x0A\x12world_crop_trample\x18L \x01(\x0B2 .df.plugin.WorldCropTrampleEventH\x00R\x10worldCropTrample\x12P\x0A\x12world_leaves_decay\x18M \x01(\x0B2 .df.plugin.WorldLeavesDecayEventH\x00R\x10worldLeavesDecay\x12P\x0A\x12world_entity_spawn\x18N \x01(\x0B2 .df.plugin.WorldEntitySpawnEventH\x00R\x10worldEntitySpawn\x12V\x0A\x14world_entity_despawn\x18O \x01(\x0B2\".df.plugin.WorldEntityDespawnEventH\x00R\x12worldEntityDespawn\x12I\x0A\x0Fworld_explosion\x18P \x01(\x0B2\x1E.df.plugin.WorldExplosionEventH\x00R\x0EworldExplosion\x12=\x0A\x0Bworld_close\x18Q \x01(\x0B2\x1A.df.plugin.WorldCloseEventH\x00R\x0AworldCloseB\x09\x0A\x07payload\"\x85\x03\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\x12F\x0A\x0Bserver_info\x18\x0C \x01(\x0B2#.df.plugin.ServerInformationRequestH\x00R\x0AserverInfo\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\"\xD4\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\x12B\x0A\x0Ccustom_items\x18\x05 \x03(\x0B2\x1F.df.plugin.CustomItemDefinitionR\x0BcustomItems\"<\x0A\x0ALogMessage\x12\x14\x0A\x05level\x18\x01 \x01(\x09R\x05level\x12\x18\x0A\x07message\x18\x02 \x01(\x09R\x07message\">\x0A\x0EEventSubscribe\x12,\x0A\x06events\x18\x01 \x03(\x0E2\x14.df.plugin.EventTypeR\x06events*\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\x10Q2M\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/HostToPlugin.php b/proto/generated/php/Df/Plugin/HostToPlugin.php index f70c303..a4b0482 100644 --- a/proto/generated/php/Df/Plugin/HostToPlugin.php +++ b/proto/generated/php/Df/Plugin/HostToPlugin.php @@ -29,6 +29,7 @@ class HostToPlugin extends \Google\Protobuf\Internal\Message * @type string $plugin_id * @type \Df\Plugin\HostHello $hello * @type \Df\Plugin\HostShutdown $shutdown + * @type \Df\Plugin\ServerInformationResponse $server_info * @type \Df\Plugin\EventEnvelope $event * } */ @@ -113,6 +114,33 @@ public function setShutdown($var) return $this; } + /** + * Generated from protobuf field .df.plugin.ServerInformationResponse server_info = 12 [json_name = "serverInfo"]; + * @return \Df\Plugin\ServerInformationResponse|null + */ + public function getServerInfo() + { + return $this->readOneof(12); + } + + public function hasServerInfo() + { + return $this->hasOneof(12); + } + + /** + * Generated from protobuf field .df.plugin.ServerInformationResponse server_info = 12 [json_name = "serverInfo"]; + * @param \Df\Plugin\ServerInformationResponse $var + * @return $this + */ + public function setServerInfo($var) + { + GPBUtil::checkMessage($var, \Df\Plugin\ServerInformationResponse::class); + $this->writeOneof(12, $var); + + return $this; + } + /** * Generated from protobuf field .df.plugin.EventEnvelope event = 20 [json_name = "event"]; * @return \Df\Plugin\EventEnvelope|null diff --git a/proto/generated/php/Df/Plugin/PluginToHost.php b/proto/generated/php/Df/Plugin/PluginToHost.php index a9bbd11..8b56581 100644 --- a/proto/generated/php/Df/Plugin/PluginToHost.php +++ b/proto/generated/php/Df/Plugin/PluginToHost.php @@ -29,6 +29,7 @@ class PluginToHost extends \Google\Protobuf\Internal\Message * @type string $plugin_id * @type \Df\Plugin\PluginHello $hello * @type \Df\Plugin\EventSubscribe $subscribe + * @type \Df\Plugin\ServerInformationRequest $server_info * @type \Df\Plugin\ActionBatch $actions * @type \Df\Plugin\LogMessage $log * @type \Df\Plugin\EventResult $event_result @@ -115,6 +116,33 @@ public function setSubscribe($var) return $this; } + /** + * Generated from protobuf field .df.plugin.ServerInformationRequest server_info = 12 [json_name = "serverInfo"]; + * @return \Df\Plugin\ServerInformationRequest|null + */ + public function getServerInfo() + { + return $this->readOneof(12); + } + + public function hasServerInfo() + { + return $this->hasOneof(12); + } + + /** + * Generated from protobuf field .df.plugin.ServerInformationRequest server_info = 12 [json_name = "serverInfo"]; + * @param \Df\Plugin\ServerInformationRequest $var + * @return $this + */ + public function setServerInfo($var) + { + GPBUtil::checkMessage($var, \Df\Plugin\ServerInformationRequest::class); + $this->writeOneof(12, $var); + + return $this; + } + /** * Generated from protobuf field .df.plugin.ActionBatch actions = 20 [json_name = "actions"]; * @return \Df\Plugin\ActionBatch|null diff --git a/proto/generated/php/Df/Plugin/ServerInformationRequest.php b/proto/generated/php/Df/Plugin/ServerInformationRequest.php new file mode 100644 index 0000000..64d22cd --- /dev/null +++ b/proto/generated/php/Df/Plugin/ServerInformationRequest.php @@ -0,0 +1,32 @@ +df.plugin.ServerInformationRequest + */ +class ServerInformationRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \Df\Plugin\GPBMetadata\Plugin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/proto/generated/php/Df/Plugin/ServerInformationResponse.php b/proto/generated/php/Df/Plugin/ServerInformationResponse.php new file mode 100644 index 0000000..a065c75 --- /dev/null +++ b/proto/generated/php/Df/Plugin/ServerInformationResponse.php @@ -0,0 +1,59 @@ +df.plugin.ServerInformationResponse + */ +class ServerInformationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string plugins = 1 [json_name = "plugins"]; + */ + private $plugins; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $plugins + * } + */ + public function __construct($data = NULL) { + \Df\Plugin\GPBMetadata\Plugin::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string plugins = 1 [json_name = "plugins"]; + * @return RepeatedField + */ + public function getPlugins() + { + return $this->plugins; + } + + /** + * Generated from protobuf field repeated string plugins = 1 [json_name = "plugins"]; + * @param string[] $var + * @return $this + */ + public function setPlugins($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->plugins = $arr; + + return $this; + } + +} + diff --git a/proto/generated/python/plugin_pb2.py b/proto/generated/python/plugin_pb2.py index 74b0332..7632dd0 100644 --- a/proto/generated/python/plugin_pb2.py +++ b/proto/generated/python/plugin_pb2.py @@ -30,7 +30,7 @@ import common_pb2 as common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cplugin.proto\x12\tdf.plugin\x1a\x13player_events.proto\x1a\x12world_events.proto\x1a\rcommand.proto\x1a\ractions.proto\x1a\x0fmutations.proto\x1a\x0c\x63ommon.proto\"\xcd\x01\n\x0cHostToPlugin\x12\x1b\n\tplugin_id\x18\x01 \x01(\tR\x08pluginId\x12,\n\x05hello\x18\n \x01(\x0b\x32\x14.df.plugin.HostHelloH\x00R\x05hello\x12\x35\n\x08shutdown\x18\x0b \x01(\x0b\x32\x17.df.plugin.HostShutdownH\x00R\x08shutdown\x12\x30\n\x05\x65vent\x18\x14 \x01(\x0b\x32\x18.df.plugin.EventEnvelopeH\x00R\x05\x65ventB\t\n\x07payload\",\n\tHostHello\x12\x1f\n\x0b\x61pi_version\x18\x01 \x01(\tR\napiVersion\"&\n\x0cHostShutdown\x12\x16\n\x06reason\x18\x01 \x01(\tR\x06reason\"\xe6\x1e\n\rEventEnvelope\x12\x19\n\x08\x65vent_id\x18\x01 \x01(\tR\x07\x65ventId\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.df.plugin.EventTypeR\x04type\x12)\n\x10\x65xpects_response\x18\x03 \x01(\x08R\x0f\x65xpectsResponse\x12=\n\x0bplayer_join\x18\n \x01(\x0b\x32\x1a.df.plugin.PlayerJoinEventH\x00R\nplayerJoin\x12=\n\x0bplayer_quit\x18\x0b \x01(\x0b\x32\x1a.df.plugin.PlayerQuitEventH\x00R\nplayerQuit\x12=\n\x0bplayer_move\x18\x0c \x01(\x0b\x32\x1a.df.plugin.PlayerMoveEventH\x00R\nplayerMove\x12=\n\x0bplayer_jump\x18\r \x01(\x0b\x32\x1a.df.plugin.PlayerJumpEventH\x00R\nplayerJump\x12I\n\x0fplayer_teleport\x18\x0e \x01(\x0b\x32\x1e.df.plugin.PlayerTeleportEventH\x00R\x0eplayerTeleport\x12S\n\x13player_change_world\x18\x0f \x01(\x0b\x32!.df.plugin.PlayerChangeWorldEventH\x00R\x11playerChangeWorld\x12V\n\x14player_toggle_sprint\x18\x10 \x01(\x0b\x32\".df.plugin.PlayerToggleSprintEventH\x00R\x12playerToggleSprint\x12S\n\x13player_toggle_sneak\x18\x11 \x01(\x0b\x32!.df.plugin.PlayerToggleSneakEventH\x00R\x11playerToggleSneak\x12*\n\x04\x63hat\x18\x12 \x01(\x0b\x32\x14.df.plugin.ChatEventH\x00R\x04\x63hat\x12J\n\x10player_food_loss\x18\x13 \x01(\x0b\x32\x1e.df.plugin.PlayerFoodLossEventH\x00R\x0eplayerFoodLoss\x12=\n\x0bplayer_heal\x18\x14 \x01(\x0b\x32\x1a.df.plugin.PlayerHealEventH\x00R\nplayerHeal\x12=\n\x0bplayer_hurt\x18\x15 \x01(\x0b\x32\x1a.df.plugin.PlayerHurtEventH\x00R\nplayerHurt\x12@\n\x0cplayer_death\x18\x16 \x01(\x0b\x32\x1b.df.plugin.PlayerDeathEventH\x00R\x0bplayerDeath\x12\x46\n\x0eplayer_respawn\x18\x17 \x01(\x0b\x32\x1d.df.plugin.PlayerRespawnEventH\x00R\rplayerRespawn\x12P\n\x12player_skin_change\x18\x18 \x01(\x0b\x32 .df.plugin.PlayerSkinChangeEventH\x00R\x10playerSkinChange\x12\\\n\x16player_fire_extinguish\x18\x19 \x01(\x0b\x32$.df.plugin.PlayerFireExtinguishEventH\x00R\x14playerFireExtinguish\x12P\n\x12player_start_break\x18\x1a \x01(\x0b\x32 .df.plugin.PlayerStartBreakEventH\x00R\x10playerStartBreak\x12=\n\x0b\x62lock_break\x18\x1b \x01(\x0b\x32\x1a.df.plugin.BlockBreakEventH\x00R\nblockBreak\x12P\n\x12player_block_place\x18\x1c \x01(\x0b\x32 .df.plugin.PlayerBlockPlaceEventH\x00R\x10playerBlockPlace\x12M\n\x11player_block_pick\x18\x1d \x01(\x0b\x32\x1f.df.plugin.PlayerBlockPickEventH\x00R\x0fplayerBlockPick\x12G\n\x0fplayer_item_use\x18\x1e \x01(\x0b\x32\x1d.df.plugin.PlayerItemUseEventH\x00R\rplayerItemUse\x12^\n\x18player_item_use_on_block\x18\x1f \x01(\x0b\x32$.df.plugin.PlayerItemUseOnBlockEventH\x00R\x14playerItemUseOnBlock\x12\x61\n\x19player_item_use_on_entity\x18 \x01(\x0b\x32%.df.plugin.PlayerItemUseOnEntityEventH\x00R\x15playerItemUseOnEntity\x12S\n\x13player_item_release\x18! \x01(\x0b\x32!.df.plugin.PlayerItemReleaseEventH\x00R\x11playerItemRelease\x12S\n\x13player_item_consume\x18\" \x01(\x0b\x32!.df.plugin.PlayerItemConsumeEventH\x00R\x11playerItemConsume\x12V\n\x14player_attack_entity\x18# \x01(\x0b\x32\".df.plugin.PlayerAttackEntityEventH\x00R\x12playerAttackEntity\x12\\\n\x16player_experience_gain\x18$ \x01(\x0b\x32$.df.plugin.PlayerExperienceGainEventH\x00R\x14playerExperienceGain\x12J\n\x10player_punch_air\x18% \x01(\x0b\x32\x1e.df.plugin.PlayerPunchAirEventH\x00R\x0eplayerPunchAir\x12J\n\x10player_sign_edit\x18& \x01(\x0b\x32\x1e.df.plugin.PlayerSignEditEventH\x00R\x0eplayerSignEdit\x12`\n\x18player_lectern_page_turn\x18\' \x01(\x0b\x32%.df.plugin.PlayerLecternPageTurnEventH\x00R\x15playerLecternPageTurn\x12P\n\x12player_item_damage\x18( \x01(\x0b\x32 .df.plugin.PlayerItemDamageEventH\x00R\x10playerItemDamage\x12P\n\x12player_item_pickup\x18) \x01(\x0b\x32 .df.plugin.PlayerItemPickupEventH\x00R\x10playerItemPickup\x12]\n\x17player_held_slot_change\x18* \x01(\x0b\x32$.df.plugin.PlayerHeldSlotChangeEventH\x00R\x14playerHeldSlotChange\x12J\n\x10player_item_drop\x18+ \x01(\x0b\x32\x1e.df.plugin.PlayerItemDropEventH\x00R\x0eplayerItemDrop\x12I\n\x0fplayer_transfer\x18, \x01(\x0b\x32\x1e.df.plugin.PlayerTransferEventH\x00R\x0eplayerTransfer\x12\x33\n\x07\x63ommand\x18- \x01(\x0b\x32\x17.df.plugin.CommandEventH\x00R\x07\x63ommand\x12R\n\x12player_diagnostics\x18. \x01(\x0b\x32!.df.plugin.PlayerDiagnosticsEventH\x00R\x11playerDiagnostics\x12M\n\x11world_liquid_flow\x18\x46 \x01(\x0b\x32\x1f.df.plugin.WorldLiquidFlowEventH\x00R\x0fworldLiquidFlow\x12P\n\x12world_liquid_decay\x18G \x01(\x0b\x32 .df.plugin.WorldLiquidDecayEventH\x00R\x10worldLiquidDecay\x12S\n\x13world_liquid_harden\x18H \x01(\x0b\x32!.df.plugin.WorldLiquidHardenEventH\x00R\x11worldLiquidHarden\x12=\n\x0bworld_sound\x18I \x01(\x0b\x32\x1a.df.plugin.WorldSoundEventH\x00R\nworldSound\x12M\n\x11world_fire_spread\x18J \x01(\x0b\x32\x1f.df.plugin.WorldFireSpreadEventH\x00R\x0fworldFireSpread\x12J\n\x10world_block_burn\x18K \x01(\x0b\x32\x1e.df.plugin.WorldBlockBurnEventH\x00R\x0eworldBlockBurn\x12P\n\x12world_crop_trample\x18L \x01(\x0b\x32 .df.plugin.WorldCropTrampleEventH\x00R\x10worldCropTrample\x12P\n\x12world_leaves_decay\x18M \x01(\x0b\x32 .df.plugin.WorldLeavesDecayEventH\x00R\x10worldLeavesDecay\x12P\n\x12world_entity_spawn\x18N \x01(\x0b\x32 .df.plugin.WorldEntitySpawnEventH\x00R\x10worldEntitySpawn\x12V\n\x14world_entity_despawn\x18O \x01(\x0b\x32\".df.plugin.WorldEntityDespawnEventH\x00R\x12worldEntityDespawn\x12I\n\x0fworld_explosion\x18P \x01(\x0b\x32\x1e.df.plugin.WorldExplosionEventH\x00R\x0eworldExplosion\x12=\n\x0bworld_close\x18Q \x01(\x0b\x32\x1a.df.plugin.WorldCloseEventH\x00R\nworldCloseB\t\n\x07payload\"\xbd\x02\n\x0cPluginToHost\x12\x1b\n\tplugin_id\x18\x01 \x01(\tR\x08pluginId\x12.\n\x05hello\x18\n \x01(\x0b\x32\x16.df.plugin.PluginHelloH\x00R\x05hello\x12\x39\n\tsubscribe\x18\x0b \x01(\x0b\x32\x19.df.plugin.EventSubscribeH\x00R\tsubscribe\x12\x32\n\x07\x61\x63tions\x18\x14 \x01(\x0b\x32\x16.df.plugin.ActionBatchH\x00R\x07\x61\x63tions\x12)\n\x03log\x18\x1e \x01(\x0b\x32\x15.df.plugin.LogMessageH\x00R\x03log\x12;\n\x0c\x65vent_result\x18( \x01(\x0b\x32\x16.df.plugin.EventResultH\x00R\x0b\x65ventResultB\t\n\x07payload\"\xd4\x01\n\x0bPluginHello\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\tR\x07version\x12\x1f\n\x0b\x61pi_version\x18\x03 \x01(\tR\napiVersion\x12\x32\n\x08\x63ommands\x18\x04 \x03(\x0b\x32\x16.df.plugin.CommandSpecR\x08\x63ommands\x12\x42\n\x0c\x63ustom_items\x18\x05 \x03(\x0b\x32\x1f.df.plugin.CustomItemDefinitionR\x0b\x63ustomItems\"<\n\nLogMessage\x12\x14\n\x05level\x18\x01 \x01(\tR\x05level\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\">\n\x0e\x45ventSubscribe\x12,\n\x06\x65vents\x18\x01 \x03(\x0e\x32\x14.df.plugin.EventTypeR\x06\x65vents*\x8a\t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45VENT_TYPE_ALL\x10\x01\x12\x0f\n\x0bPLAYER_JOIN\x10\n\x12\x0f\n\x0bPLAYER_QUIT\x10\x0b\x12\x0f\n\x0bPLAYER_MOVE\x10\x0c\x12\x0f\n\x0bPLAYER_JUMP\x10\r\x12\x13\n\x0fPLAYER_TELEPORT\x10\x0e\x12\x17\n\x13PLAYER_CHANGE_WORLD\x10\x0f\x12\x18\n\x14PLAYER_TOGGLE_SPRINT\x10\x10\x12\x17\n\x13PLAYER_TOGGLE_SNEAK\x10\x11\x12\x08\n\x04\x43HAT\x10\x12\x12\x14\n\x10PLAYER_FOOD_LOSS\x10\x13\x12\x0f\n\x0bPLAYER_HEAL\x10\x14\x12\x0f\n\x0bPLAYER_HURT\x10\x15\x12\x10\n\x0cPLAYER_DEATH\x10\x16\x12\x12\n\x0ePLAYER_RESPAWN\x10\x17\x12\x16\n\x12PLAYER_SKIN_CHANGE\x10\x18\x12\x1a\n\x16PLAYER_FIRE_EXTINGUISH\x10\x19\x12\x16\n\x12PLAYER_START_BREAK\x10\x1a\x12\x16\n\x12PLAYER_BLOCK_BREAK\x10\x1b\x12\x16\n\x12PLAYER_BLOCK_PLACE\x10\x1c\x12\x15\n\x11PLAYER_BLOCK_PICK\x10\x1d\x12\x13\n\x0fPLAYER_ITEM_USE\x10\x1e\x12\x1c\n\x18PLAYER_ITEM_USE_ON_BLOCK\x10\x1f\x12\x1d\n\x19PLAYER_ITEM_USE_ON_ENTITY\x10 \x12\x17\n\x13PLAYER_ITEM_RELEASE\x10!\x12\x17\n\x13PLAYER_ITEM_CONSUME\x10\"\x12\x18\n\x14PLAYER_ATTACK_ENTITY\x10#\x12\x1a\n\x16PLAYER_EXPERIENCE_GAIN\x10$\x12\x14\n\x10PLAYER_PUNCH_AIR\x10%\x12\x14\n\x10PLAYER_SIGN_EDIT\x10&\x12\x1c\n\x18PLAYER_LECTERN_PAGE_TURN\x10\'\x12\x16\n\x12PLAYER_ITEM_DAMAGE\x10(\x12\x16\n\x12PLAYER_ITEM_PICKUP\x10)\x12\x1b\n\x17PLAYER_HELD_SLOT_CHANGE\x10*\x12\x14\n\x10PLAYER_ITEM_DROP\x10+\x12\x13\n\x0fPLAYER_TRANSFER\x10,\x12\x0b\n\x07\x43OMMAND\x10-\x12\x16\n\x12PLAYER_DIAGNOSTICS\x10.\x12\x15\n\x11WORLD_LIQUID_FLOW\x10\x46\x12\x16\n\x12WORLD_LIQUID_DECAY\x10G\x12\x17\n\x13WORLD_LIQUID_HARDEN\x10H\x12\x0f\n\x0bWORLD_SOUND\x10I\x12\x15\n\x11WORLD_FIRE_SPREAD\x10J\x12\x14\n\x10WORLD_BLOCK_BURN\x10K\x12\x16\n\x12WORLD_CROP_TRAMPLE\x10L\x12\x16\n\x12WORLD_LEAVES_DECAY\x10M\x12\x16\n\x12WORLD_ENTITY_SPAWN\x10N\x12\x18\n\x14WORLD_ENTITY_DESPAWN\x10O\x12\x13\n\x0fWORLD_EXPLOSION\x10P\x12\x0f\n\x0bWORLD_CLOSE\x10Q2M\n\x06Plugin\x12\x43\n\x0b\x45ventStream\x12\x17.df.plugin.PluginToHost\x1a\x17.df.plugin.HostToPlugin(\x01\x30\x01\x42\x8a\x01\n\rcom.df.pluginB\x0bPluginProtoP\x01Z\'github.com/secmc/plugin/proto/generated\xa2\x02\x03\x44PX\xaa\x02\tDf.Plugin\xca\x02\tDf\\Plugin\xe2\x02\x15\x44\x66\\Plugin\\GPBMetadata\xea\x02\nDf::Pluginb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cplugin.proto\x12\tdf.plugin\x1a\x13player_events.proto\x1a\x12world_events.proto\x1a\rcommand.proto\x1a\ractions.proto\x1a\x0fmutations.proto\x1a\x0c\x63ommon.proto\"\x96\x02\n\x0cHostToPlugin\x12\x1b\n\tplugin_id\x18\x01 \x01(\tR\x08pluginId\x12,\n\x05hello\x18\n \x01(\x0b\x32\x14.df.plugin.HostHelloH\x00R\x05hello\x12\x35\n\x08shutdown\x18\x0b \x01(\x0b\x32\x17.df.plugin.HostShutdownH\x00R\x08shutdown\x12G\n\x0bserver_info\x18\x0c \x01(\x0b\x32$.df.plugin.ServerInformationResponseH\x00R\nserverInfo\x12\x30\n\x05\x65vent\x18\x14 \x01(\x0b\x32\x18.df.plugin.EventEnvelopeH\x00R\x05\x65ventB\t\n\x07payload\"\x1a\n\x18ServerInformationRequest\"5\n\x19ServerInformationResponse\x12\x18\n\x07plugins\x18\x01 \x03(\tR\x07plugins\",\n\tHostHello\x12\x1f\n\x0b\x61pi_version\x18\x01 \x01(\tR\napiVersion\"&\n\x0cHostShutdown\x12\x16\n\x06reason\x18\x01 \x01(\tR\x06reason\"\xe6\x1e\n\rEventEnvelope\x12\x19\n\x08\x65vent_id\x18\x01 \x01(\tR\x07\x65ventId\x12(\n\x04type\x18\x02 \x01(\x0e\x32\x14.df.plugin.EventTypeR\x04type\x12)\n\x10\x65xpects_response\x18\x03 \x01(\x08R\x0f\x65xpectsResponse\x12=\n\x0bplayer_join\x18\n \x01(\x0b\x32\x1a.df.plugin.PlayerJoinEventH\x00R\nplayerJoin\x12=\n\x0bplayer_quit\x18\x0b \x01(\x0b\x32\x1a.df.plugin.PlayerQuitEventH\x00R\nplayerQuit\x12=\n\x0bplayer_move\x18\x0c \x01(\x0b\x32\x1a.df.plugin.PlayerMoveEventH\x00R\nplayerMove\x12=\n\x0bplayer_jump\x18\r \x01(\x0b\x32\x1a.df.plugin.PlayerJumpEventH\x00R\nplayerJump\x12I\n\x0fplayer_teleport\x18\x0e \x01(\x0b\x32\x1e.df.plugin.PlayerTeleportEventH\x00R\x0eplayerTeleport\x12S\n\x13player_change_world\x18\x0f \x01(\x0b\x32!.df.plugin.PlayerChangeWorldEventH\x00R\x11playerChangeWorld\x12V\n\x14player_toggle_sprint\x18\x10 \x01(\x0b\x32\".df.plugin.PlayerToggleSprintEventH\x00R\x12playerToggleSprint\x12S\n\x13player_toggle_sneak\x18\x11 \x01(\x0b\x32!.df.plugin.PlayerToggleSneakEventH\x00R\x11playerToggleSneak\x12*\n\x04\x63hat\x18\x12 \x01(\x0b\x32\x14.df.plugin.ChatEventH\x00R\x04\x63hat\x12J\n\x10player_food_loss\x18\x13 \x01(\x0b\x32\x1e.df.plugin.PlayerFoodLossEventH\x00R\x0eplayerFoodLoss\x12=\n\x0bplayer_heal\x18\x14 \x01(\x0b\x32\x1a.df.plugin.PlayerHealEventH\x00R\nplayerHeal\x12=\n\x0bplayer_hurt\x18\x15 \x01(\x0b\x32\x1a.df.plugin.PlayerHurtEventH\x00R\nplayerHurt\x12@\n\x0cplayer_death\x18\x16 \x01(\x0b\x32\x1b.df.plugin.PlayerDeathEventH\x00R\x0bplayerDeath\x12\x46\n\x0eplayer_respawn\x18\x17 \x01(\x0b\x32\x1d.df.plugin.PlayerRespawnEventH\x00R\rplayerRespawn\x12P\n\x12player_skin_change\x18\x18 \x01(\x0b\x32 .df.plugin.PlayerSkinChangeEventH\x00R\x10playerSkinChange\x12\\\n\x16player_fire_extinguish\x18\x19 \x01(\x0b\x32$.df.plugin.PlayerFireExtinguishEventH\x00R\x14playerFireExtinguish\x12P\n\x12player_start_break\x18\x1a \x01(\x0b\x32 .df.plugin.PlayerStartBreakEventH\x00R\x10playerStartBreak\x12=\n\x0b\x62lock_break\x18\x1b \x01(\x0b\x32\x1a.df.plugin.BlockBreakEventH\x00R\nblockBreak\x12P\n\x12player_block_place\x18\x1c \x01(\x0b\x32 .df.plugin.PlayerBlockPlaceEventH\x00R\x10playerBlockPlace\x12M\n\x11player_block_pick\x18\x1d \x01(\x0b\x32\x1f.df.plugin.PlayerBlockPickEventH\x00R\x0fplayerBlockPick\x12G\n\x0fplayer_item_use\x18\x1e \x01(\x0b\x32\x1d.df.plugin.PlayerItemUseEventH\x00R\rplayerItemUse\x12^\n\x18player_item_use_on_block\x18\x1f \x01(\x0b\x32$.df.plugin.PlayerItemUseOnBlockEventH\x00R\x14playerItemUseOnBlock\x12\x61\n\x19player_item_use_on_entity\x18 \x01(\x0b\x32%.df.plugin.PlayerItemUseOnEntityEventH\x00R\x15playerItemUseOnEntity\x12S\n\x13player_item_release\x18! \x01(\x0b\x32!.df.plugin.PlayerItemReleaseEventH\x00R\x11playerItemRelease\x12S\n\x13player_item_consume\x18\" \x01(\x0b\x32!.df.plugin.PlayerItemConsumeEventH\x00R\x11playerItemConsume\x12V\n\x14player_attack_entity\x18# \x01(\x0b\x32\".df.plugin.PlayerAttackEntityEventH\x00R\x12playerAttackEntity\x12\\\n\x16player_experience_gain\x18$ \x01(\x0b\x32$.df.plugin.PlayerExperienceGainEventH\x00R\x14playerExperienceGain\x12J\n\x10player_punch_air\x18% \x01(\x0b\x32\x1e.df.plugin.PlayerPunchAirEventH\x00R\x0eplayerPunchAir\x12J\n\x10player_sign_edit\x18& \x01(\x0b\x32\x1e.df.plugin.PlayerSignEditEventH\x00R\x0eplayerSignEdit\x12`\n\x18player_lectern_page_turn\x18\' \x01(\x0b\x32%.df.plugin.PlayerLecternPageTurnEventH\x00R\x15playerLecternPageTurn\x12P\n\x12player_item_damage\x18( \x01(\x0b\x32 .df.plugin.PlayerItemDamageEventH\x00R\x10playerItemDamage\x12P\n\x12player_item_pickup\x18) \x01(\x0b\x32 .df.plugin.PlayerItemPickupEventH\x00R\x10playerItemPickup\x12]\n\x17player_held_slot_change\x18* \x01(\x0b\x32$.df.plugin.PlayerHeldSlotChangeEventH\x00R\x14playerHeldSlotChange\x12J\n\x10player_item_drop\x18+ \x01(\x0b\x32\x1e.df.plugin.PlayerItemDropEventH\x00R\x0eplayerItemDrop\x12I\n\x0fplayer_transfer\x18, \x01(\x0b\x32\x1e.df.plugin.PlayerTransferEventH\x00R\x0eplayerTransfer\x12\x33\n\x07\x63ommand\x18- \x01(\x0b\x32\x17.df.plugin.CommandEventH\x00R\x07\x63ommand\x12R\n\x12player_diagnostics\x18. \x01(\x0b\x32!.df.plugin.PlayerDiagnosticsEventH\x00R\x11playerDiagnostics\x12M\n\x11world_liquid_flow\x18\x46 \x01(\x0b\x32\x1f.df.plugin.WorldLiquidFlowEventH\x00R\x0fworldLiquidFlow\x12P\n\x12world_liquid_decay\x18G \x01(\x0b\x32 .df.plugin.WorldLiquidDecayEventH\x00R\x10worldLiquidDecay\x12S\n\x13world_liquid_harden\x18H \x01(\x0b\x32!.df.plugin.WorldLiquidHardenEventH\x00R\x11worldLiquidHarden\x12=\n\x0bworld_sound\x18I \x01(\x0b\x32\x1a.df.plugin.WorldSoundEventH\x00R\nworldSound\x12M\n\x11world_fire_spread\x18J \x01(\x0b\x32\x1f.df.plugin.WorldFireSpreadEventH\x00R\x0fworldFireSpread\x12J\n\x10world_block_burn\x18K \x01(\x0b\x32\x1e.df.plugin.WorldBlockBurnEventH\x00R\x0eworldBlockBurn\x12P\n\x12world_crop_trample\x18L \x01(\x0b\x32 .df.plugin.WorldCropTrampleEventH\x00R\x10worldCropTrample\x12P\n\x12world_leaves_decay\x18M \x01(\x0b\x32 .df.plugin.WorldLeavesDecayEventH\x00R\x10worldLeavesDecay\x12P\n\x12world_entity_spawn\x18N \x01(\x0b\x32 .df.plugin.WorldEntitySpawnEventH\x00R\x10worldEntitySpawn\x12V\n\x14world_entity_despawn\x18O \x01(\x0b\x32\".df.plugin.WorldEntityDespawnEventH\x00R\x12worldEntityDespawn\x12I\n\x0fworld_explosion\x18P \x01(\x0b\x32\x1e.df.plugin.WorldExplosionEventH\x00R\x0eworldExplosion\x12=\n\x0bworld_close\x18Q \x01(\x0b\x32\x1a.df.plugin.WorldCloseEventH\x00R\nworldCloseB\t\n\x07payload\"\x85\x03\n\x0cPluginToHost\x12\x1b\n\tplugin_id\x18\x01 \x01(\tR\x08pluginId\x12.\n\x05hello\x18\n \x01(\x0b\x32\x16.df.plugin.PluginHelloH\x00R\x05hello\x12\x39\n\tsubscribe\x18\x0b \x01(\x0b\x32\x19.df.plugin.EventSubscribeH\x00R\tsubscribe\x12\x46\n\x0bserver_info\x18\x0c \x01(\x0b\x32#.df.plugin.ServerInformationRequestH\x00R\nserverInfo\x12\x32\n\x07\x61\x63tions\x18\x14 \x01(\x0b\x32\x16.df.plugin.ActionBatchH\x00R\x07\x61\x63tions\x12)\n\x03log\x18\x1e \x01(\x0b\x32\x15.df.plugin.LogMessageH\x00R\x03log\x12;\n\x0c\x65vent_result\x18( \x01(\x0b\x32\x16.df.plugin.EventResultH\x00R\x0b\x65ventResultB\t\n\x07payload\"\xd4\x01\n\x0bPluginHello\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\tR\x07version\x12\x1f\n\x0b\x61pi_version\x18\x03 \x01(\tR\napiVersion\x12\x32\n\x08\x63ommands\x18\x04 \x03(\x0b\x32\x16.df.plugin.CommandSpecR\x08\x63ommands\x12\x42\n\x0c\x63ustom_items\x18\x05 \x03(\x0b\x32\x1f.df.plugin.CustomItemDefinitionR\x0b\x63ustomItems\"<\n\nLogMessage\x12\x14\n\x05level\x18\x01 \x01(\tR\x05level\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\">\n\x0e\x45ventSubscribe\x12,\n\x06\x65vents\x18\x01 \x03(\x0e\x32\x14.df.plugin.EventTypeR\x06\x65vents*\x8a\t\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45VENT_TYPE_ALL\x10\x01\x12\x0f\n\x0bPLAYER_JOIN\x10\n\x12\x0f\n\x0bPLAYER_QUIT\x10\x0b\x12\x0f\n\x0bPLAYER_MOVE\x10\x0c\x12\x0f\n\x0bPLAYER_JUMP\x10\r\x12\x13\n\x0fPLAYER_TELEPORT\x10\x0e\x12\x17\n\x13PLAYER_CHANGE_WORLD\x10\x0f\x12\x18\n\x14PLAYER_TOGGLE_SPRINT\x10\x10\x12\x17\n\x13PLAYER_TOGGLE_SNEAK\x10\x11\x12\x08\n\x04\x43HAT\x10\x12\x12\x14\n\x10PLAYER_FOOD_LOSS\x10\x13\x12\x0f\n\x0bPLAYER_HEAL\x10\x14\x12\x0f\n\x0bPLAYER_HURT\x10\x15\x12\x10\n\x0cPLAYER_DEATH\x10\x16\x12\x12\n\x0ePLAYER_RESPAWN\x10\x17\x12\x16\n\x12PLAYER_SKIN_CHANGE\x10\x18\x12\x1a\n\x16PLAYER_FIRE_EXTINGUISH\x10\x19\x12\x16\n\x12PLAYER_START_BREAK\x10\x1a\x12\x16\n\x12PLAYER_BLOCK_BREAK\x10\x1b\x12\x16\n\x12PLAYER_BLOCK_PLACE\x10\x1c\x12\x15\n\x11PLAYER_BLOCK_PICK\x10\x1d\x12\x13\n\x0fPLAYER_ITEM_USE\x10\x1e\x12\x1c\n\x18PLAYER_ITEM_USE_ON_BLOCK\x10\x1f\x12\x1d\n\x19PLAYER_ITEM_USE_ON_ENTITY\x10 \x12\x17\n\x13PLAYER_ITEM_RELEASE\x10!\x12\x17\n\x13PLAYER_ITEM_CONSUME\x10\"\x12\x18\n\x14PLAYER_ATTACK_ENTITY\x10#\x12\x1a\n\x16PLAYER_EXPERIENCE_GAIN\x10$\x12\x14\n\x10PLAYER_PUNCH_AIR\x10%\x12\x14\n\x10PLAYER_SIGN_EDIT\x10&\x12\x1c\n\x18PLAYER_LECTERN_PAGE_TURN\x10\'\x12\x16\n\x12PLAYER_ITEM_DAMAGE\x10(\x12\x16\n\x12PLAYER_ITEM_PICKUP\x10)\x12\x1b\n\x17PLAYER_HELD_SLOT_CHANGE\x10*\x12\x14\n\x10PLAYER_ITEM_DROP\x10+\x12\x13\n\x0fPLAYER_TRANSFER\x10,\x12\x0b\n\x07\x43OMMAND\x10-\x12\x16\n\x12PLAYER_DIAGNOSTICS\x10.\x12\x15\n\x11WORLD_LIQUID_FLOW\x10\x46\x12\x16\n\x12WORLD_LIQUID_DECAY\x10G\x12\x17\n\x13WORLD_LIQUID_HARDEN\x10H\x12\x0f\n\x0bWORLD_SOUND\x10I\x12\x15\n\x11WORLD_FIRE_SPREAD\x10J\x12\x14\n\x10WORLD_BLOCK_BURN\x10K\x12\x16\n\x12WORLD_CROP_TRAMPLE\x10L\x12\x16\n\x12WORLD_LEAVES_DECAY\x10M\x12\x16\n\x12WORLD_ENTITY_SPAWN\x10N\x12\x18\n\x14WORLD_ENTITY_DESPAWN\x10O\x12\x13\n\x0fWORLD_EXPLOSION\x10P\x12\x0f\n\x0bWORLD_CLOSE\x10Q2M\n\x06Plugin\x12\x43\n\x0b\x45ventStream\x12\x17.df.plugin.PluginToHost\x1a\x17.df.plugin.HostToPlugin(\x01\x30\x01\x42\x8a\x01\n\rcom.df.pluginB\x0bPluginProtoP\x01Z\'github.com/secmc/plugin/proto/generated\xa2\x02\x03\x44PX\xaa\x02\tDf.Plugin\xca\x02\tDf\\Plugin\xe2\x02\x15\x44\x66\\Plugin\\GPBMetadata\xea\x02\nDf::Pluginb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -38,24 +38,28 @@ if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\rcom.df.pluginB\013PluginProtoP\001Z\'github.com/secmc/plugin/proto/generated\242\002\003DPX\252\002\tDf.Plugin\312\002\tDf\\Plugin\342\002\025Df\\Plugin\\GPBMetadata\352\002\nDf::Plugin' - _globals['_EVENTTYPE']._serialized_start=5030 - _globals['_EVENTTYPE']._serialized_end=6192 + _globals['_EVENTTYPE']._serialized_start=5258 + _globals['_EVENTTYPE']._serialized_end=6420 _globals['_HOSTTOPLUGIN']._serialized_start=130 - _globals['_HOSTTOPLUGIN']._serialized_end=335 - _globals['_HOSTHELLO']._serialized_start=337 - _globals['_HOSTHELLO']._serialized_end=381 - _globals['_HOSTSHUTDOWN']._serialized_start=383 - _globals['_HOSTSHUTDOWN']._serialized_end=421 - _globals['_EVENTENVELOPE']._serialized_start=424 - _globals['_EVENTENVELOPE']._serialized_end=4366 - _globals['_PLUGINTOHOST']._serialized_start=4369 - _globals['_PLUGINTOHOST']._serialized_end=4686 - _globals['_PLUGINHELLO']._serialized_start=4689 - _globals['_PLUGINHELLO']._serialized_end=4901 - _globals['_LOGMESSAGE']._serialized_start=4903 - _globals['_LOGMESSAGE']._serialized_end=4963 - _globals['_EVENTSUBSCRIBE']._serialized_start=4965 - _globals['_EVENTSUBSCRIBE']._serialized_end=5027 - _globals['_PLUGIN']._serialized_start=6194 - _globals['_PLUGIN']._serialized_end=6271 + _globals['_HOSTTOPLUGIN']._serialized_end=408 + _globals['_SERVERINFORMATIONREQUEST']._serialized_start=410 + _globals['_SERVERINFORMATIONREQUEST']._serialized_end=436 + _globals['_SERVERINFORMATIONRESPONSE']._serialized_start=438 + _globals['_SERVERINFORMATIONRESPONSE']._serialized_end=491 + _globals['_HOSTHELLO']._serialized_start=493 + _globals['_HOSTHELLO']._serialized_end=537 + _globals['_HOSTSHUTDOWN']._serialized_start=539 + _globals['_HOSTSHUTDOWN']._serialized_end=577 + _globals['_EVENTENVELOPE']._serialized_start=580 + _globals['_EVENTENVELOPE']._serialized_end=4522 + _globals['_PLUGINTOHOST']._serialized_start=4525 + _globals['_PLUGINTOHOST']._serialized_end=4914 + _globals['_PLUGINHELLO']._serialized_start=4917 + _globals['_PLUGINHELLO']._serialized_end=5129 + _globals['_LOGMESSAGE']._serialized_start=5131 + _globals['_LOGMESSAGE']._serialized_end=5191 + _globals['_EVENTSUBSCRIBE']._serialized_start=5193 + _globals['_EVENTSUBSCRIBE']._serialized_end=5255 + _globals['_PLUGIN']._serialized_start=6422 + _globals['_PLUGIN']._serialized_end=6499 # @@protoc_insertion_point(module_scope) diff --git a/proto/generated/rust/df.plugin.rs b/proto/generated/rust/df.plugin.rs index 7c9300e..8942941 100644 --- a/proto/generated/rust/df.plugin.rs +++ b/proto/generated/rust/df.plugin.rs @@ -1488,7 +1488,7 @@ pub struct WorldCloseEvent { pub struct HostToPlugin { #[prost(string, tag="1")] pub plugin_id: ::prost::alloc::string::String, - #[prost(oneof="host_to_plugin::Payload", tags="10, 11, 20")] + #[prost(oneof="host_to_plugin::Payload", tags="10, 11, 12, 20")] pub payload: ::core::option::Option, } /// Nested message and enum types in `HostToPlugin`. @@ -1500,11 +1500,23 @@ pub mod host_to_plugin { Hello(super::HostHello), #[prost(message, tag="11")] Shutdown(super::HostShutdown), + #[prost(message, tag="12")] + ServerInfo(super::ServerInformationResponse), #[prost(message, tag="20")] Event(super::EventEnvelope), } } #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ServerInformationRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ServerInformationResponse { + #[prost(string, repeated, tag="1")] + pub plugins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HostHello { #[prost(string, tag="1")] @@ -1639,7 +1651,7 @@ pub mod event_envelope { pub struct PluginToHost { #[prost(string, tag="1")] pub plugin_id: ::prost::alloc::string::String, - #[prost(oneof="plugin_to_host::Payload", tags="10, 11, 20, 30, 40")] + #[prost(oneof="plugin_to_host::Payload", tags="10, 11, 12, 20, 30, 40")] pub payload: ::core::option::Option, } /// Nested message and enum types in `PluginToHost`. @@ -1651,6 +1663,8 @@ pub mod plugin_to_host { Hello(super::PluginHello), #[prost(message, tag="11")] Subscribe(super::EventSubscribe), + #[prost(message, tag="12")] + ServerInfo(super::ServerInformationRequest), #[prost(message, tag="20")] Actions(super::ActionBatch), #[prost(message, tag="30")] diff --git a/proto/generated/ts/plugin.js b/proto/generated/ts/plugin.js index 9a6c209..a5b6d80 100644 --- a/proto/generated/ts/plugin.js +++ b/proto/generated/ts/plugin.js @@ -338,7 +338,7 @@ export function eventTypeToJSON(object) { } } function createBaseHostToPlugin() { - return { pluginId: "", hello: undefined, shutdown: undefined, event: undefined }; + return { pluginId: "", hello: undefined, shutdown: undefined, serverInfo: undefined, event: undefined }; } export const HostToPlugin = { encode(message, writer = new BinaryWriter()) { @@ -351,6 +351,9 @@ export const HostToPlugin = { if (message.shutdown !== undefined) { HostShutdown.encode(message.shutdown, writer.uint32(90).fork()).join(); } + if (message.serverInfo !== undefined) { + ServerInformationResponse.encode(message.serverInfo, writer.uint32(98).fork()).join(); + } if (message.event !== undefined) { EventEnvelope.encode(message.event, writer.uint32(162).fork()).join(); } @@ -384,6 +387,13 @@ export const HostToPlugin = { message.shutdown = HostShutdown.decode(reader, reader.uint32()); continue; } + case 12: { + if (tag !== 98) { + break; + } + message.serverInfo = ServerInformationResponse.decode(reader, reader.uint32()); + continue; + } case 20: { if (tag !== 162) { break; @@ -404,6 +414,7 @@ export const HostToPlugin = { pluginId: isSet(object.pluginId) ? globalThis.String(object.pluginId) : "", hello: isSet(object.hello) ? HostHello.fromJSON(object.hello) : undefined, shutdown: isSet(object.shutdown) ? HostShutdown.fromJSON(object.shutdown) : undefined, + serverInfo: isSet(object.serverInfo) ? ServerInformationResponse.fromJSON(object.serverInfo) : undefined, event: isSet(object.event) ? EventEnvelope.fromJSON(object.event) : undefined, }; }, @@ -418,6 +429,9 @@ export const HostToPlugin = { if (message.shutdown !== undefined) { obj.shutdown = HostShutdown.toJSON(message.shutdown); } + if (message.serverInfo !== undefined) { + obj.serverInfo = ServerInformationResponse.toJSON(message.serverInfo); + } if (message.event !== undefined) { obj.event = EventEnvelope.toJSON(message.event); } @@ -435,12 +449,105 @@ export const HostToPlugin = { message.shutdown = (object.shutdown !== undefined && object.shutdown !== null) ? HostShutdown.fromPartial(object.shutdown) : undefined; + message.serverInfo = (object.serverInfo !== undefined && object.serverInfo !== null) + ? ServerInformationResponse.fromPartial(object.serverInfo) + : undefined; message.event = (object.event !== undefined && object.event !== null) ? EventEnvelope.fromPartial(object.event) : undefined; return message; }, }; +function createBaseServerInformationRequest() { + return {}; +} +export const ServerInformationRequest = { + encode(_, writer = new BinaryWriter()) { + return writer; + }, + decode(input, length) { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServerInformationRequest(); + 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(_) { + return {}; + }, + toJSON(_) { + const obj = {}; + return obj; + }, + create(base) { + return ServerInformationRequest.fromPartial(base ?? {}); + }, + fromPartial(_) { + const message = createBaseServerInformationRequest(); + return message; + }, +}; +function createBaseServerInformationResponse() { + return { plugins: [] }; +} +export const ServerInformationResponse = { + encode(message, writer = new BinaryWriter()) { + for (const v of message.plugins) { + writer.uint32(10).string(v); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServerInformationResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + message.plugins.push(reader.string()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + plugins: globalThis.Array.isArray(object?.plugins) ? object.plugins.map((e) => globalThis.String(e)) : [], + }; + }, + toJSON(message) { + const obj = {}; + if (message.plugins?.length) { + obj.plugins = message.plugins; + } + return obj; + }, + create(base) { + return ServerInformationResponse.fromPartial(base ?? {}); + }, + fromPartial(object) { + const message = createBaseServerInformationResponse(); + message.plugins = object.plugins?.map((e) => e) || []; + return message; + }, +}; function createBaseHostHello() { return { apiVersion: "" }; } @@ -1571,6 +1678,7 @@ function createBasePluginToHost() { pluginId: "", hello: undefined, subscribe: undefined, + serverInfo: undefined, actions: undefined, log: undefined, eventResult: undefined, @@ -1587,6 +1695,9 @@ export const PluginToHost = { if (message.subscribe !== undefined) { EventSubscribe.encode(message.subscribe, writer.uint32(90).fork()).join(); } + if (message.serverInfo !== undefined) { + ServerInformationRequest.encode(message.serverInfo, writer.uint32(98).fork()).join(); + } if (message.actions !== undefined) { ActionBatch.encode(message.actions, writer.uint32(162).fork()).join(); } @@ -1626,6 +1737,13 @@ export const PluginToHost = { message.subscribe = EventSubscribe.decode(reader, reader.uint32()); continue; } + case 12: { + if (tag !== 98) { + break; + } + message.serverInfo = ServerInformationRequest.decode(reader, reader.uint32()); + continue; + } case 20: { if (tag !== 162) { break; @@ -1660,6 +1778,7 @@ export const PluginToHost = { pluginId: isSet(object.pluginId) ? globalThis.String(object.pluginId) : "", hello: isSet(object.hello) ? PluginHello.fromJSON(object.hello) : undefined, subscribe: isSet(object.subscribe) ? EventSubscribe.fromJSON(object.subscribe) : undefined, + serverInfo: isSet(object.serverInfo) ? ServerInformationRequest.fromJSON(object.serverInfo) : undefined, actions: isSet(object.actions) ? ActionBatch.fromJSON(object.actions) : undefined, log: isSet(object.log) ? LogMessage.fromJSON(object.log) : undefined, eventResult: isSet(object.eventResult) ? EventResult.fromJSON(object.eventResult) : undefined, @@ -1676,6 +1795,9 @@ export const PluginToHost = { if (message.subscribe !== undefined) { obj.subscribe = EventSubscribe.toJSON(message.subscribe); } + if (message.serverInfo !== undefined) { + obj.serverInfo = ServerInformationRequest.toJSON(message.serverInfo); + } if (message.actions !== undefined) { obj.actions = ActionBatch.toJSON(message.actions); } @@ -1699,6 +1821,9 @@ export const PluginToHost = { message.subscribe = (object.subscribe !== undefined && object.subscribe !== null) ? EventSubscribe.fromPartial(object.subscribe) : undefined; + message.serverInfo = (object.serverInfo !== undefined && object.serverInfo !== null) + ? ServerInformationRequest.fromPartial(object.serverInfo) + : undefined; message.actions = (object.actions !== undefined && object.actions !== null) ? ActionBatch.fromPartial(object.actions) : undefined; diff --git a/proto/generated/ts/plugin.ts b/proto/generated/ts/plugin.ts index 69ec025..3f63e25 100644 --- a/proto/generated/ts/plugin.ts +++ b/proto/generated/ts/plugin.ts @@ -396,9 +396,17 @@ export interface HostToPlugin { pluginId: string; hello?: HostHello | undefined; shutdown?: HostShutdown | undefined; + serverInfo?: ServerInformationResponse | undefined; event?: EventEnvelope | undefined; } +export interface ServerInformationRequest { +} + +export interface ServerInformationResponse { + plugins: string[]; +} + export interface HostHello { apiVersion: string; } @@ -467,6 +475,7 @@ export interface PluginToHost { pluginId: string; hello?: PluginHello | undefined; subscribe?: EventSubscribe | undefined; + serverInfo?: ServerInformationRequest | undefined; actions?: ActionBatch | undefined; log?: LogMessage | undefined; eventResult?: EventResult | undefined; @@ -490,7 +499,7 @@ export interface EventSubscribe { } function createBaseHostToPlugin(): HostToPlugin { - return { pluginId: "", hello: undefined, shutdown: undefined, event: undefined }; + return { pluginId: "", hello: undefined, shutdown: undefined, serverInfo: undefined, event: undefined }; } export const HostToPlugin: MessageFns = { @@ -504,6 +513,9 @@ export const HostToPlugin: MessageFns = { if (message.shutdown !== undefined) { HostShutdown.encode(message.shutdown, writer.uint32(90).fork()).join(); } + if (message.serverInfo !== undefined) { + ServerInformationResponse.encode(message.serverInfo, writer.uint32(98).fork()).join(); + } if (message.event !== undefined) { EventEnvelope.encode(message.event, writer.uint32(162).fork()).join(); } @@ -541,6 +553,14 @@ export const HostToPlugin: MessageFns = { message.shutdown = HostShutdown.decode(reader, reader.uint32()); continue; } + case 12: { + if (tag !== 98) { + break; + } + + message.serverInfo = ServerInformationResponse.decode(reader, reader.uint32()); + continue; + } case 20: { if (tag !== 162) { break; @@ -563,6 +583,7 @@ export const HostToPlugin: MessageFns = { pluginId: isSet(object.pluginId) ? globalThis.String(object.pluginId) : "", hello: isSet(object.hello) ? HostHello.fromJSON(object.hello) : undefined, shutdown: isSet(object.shutdown) ? HostShutdown.fromJSON(object.shutdown) : undefined, + serverInfo: isSet(object.serverInfo) ? ServerInformationResponse.fromJSON(object.serverInfo) : undefined, event: isSet(object.event) ? EventEnvelope.fromJSON(object.event) : undefined, }; }, @@ -578,6 +599,9 @@ export const HostToPlugin: MessageFns = { if (message.shutdown !== undefined) { obj.shutdown = HostShutdown.toJSON(message.shutdown); } + if (message.serverInfo !== undefined) { + obj.serverInfo = ServerInformationResponse.toJSON(message.serverInfo); + } if (message.event !== undefined) { obj.event = EventEnvelope.toJSON(message.event); } @@ -596,6 +620,9 @@ export const HostToPlugin: MessageFns = { message.shutdown = (object.shutdown !== undefined && object.shutdown !== null) ? HostShutdown.fromPartial(object.shutdown) : undefined; + message.serverInfo = (object.serverInfo !== undefined && object.serverInfo !== null) + ? ServerInformationResponse.fromPartial(object.serverInfo) + : undefined; message.event = (object.event !== undefined && object.event !== null) ? EventEnvelope.fromPartial(object.event) : undefined; @@ -603,6 +630,109 @@ export const HostToPlugin: MessageFns = { }, }; +function createBaseServerInformationRequest(): ServerInformationRequest { + return {}; +} + +export const ServerInformationRequest: MessageFns = { + encode(_: ServerInformationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ServerInformationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServerInformationRequest(); + 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): ServerInformationRequest { + return {}; + }, + + toJSON(_: ServerInformationRequest): unknown { + const obj: any = {}; + return obj; + }, + + create(base?: DeepPartial): ServerInformationRequest { + return ServerInformationRequest.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): ServerInformationRequest { + const message = createBaseServerInformationRequest(); + return message; + }, +}; + +function createBaseServerInformationResponse(): ServerInformationResponse { + return { plugins: [] }; +} + +export const ServerInformationResponse: MessageFns = { + encode(message: ServerInformationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + for (const v of message.plugins) { + writer.uint32(10).string(v!); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ServerInformationResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServerInformationResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.plugins.push(reader.string()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ServerInformationResponse { + return { + plugins: globalThis.Array.isArray(object?.plugins) ? object.plugins.map((e: any) => globalThis.String(e)) : [], + }; + }, + + toJSON(message: ServerInformationResponse): unknown { + const obj: any = {}; + if (message.plugins?.length) { + obj.plugins = message.plugins; + } + return obj; + }, + + create(base?: DeepPartial): ServerInformationResponse { + return ServerInformationResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ServerInformationResponse { + const message = createBaseServerInformationResponse(); + message.plugins = object.plugins?.map((e) => e) || []; + return message; + }, +}; + function createBaseHostHello(): HostHello { return { apiVersion: "" }; } @@ -1805,6 +1935,7 @@ function createBasePluginToHost(): PluginToHost { pluginId: "", hello: undefined, subscribe: undefined, + serverInfo: undefined, actions: undefined, log: undefined, eventResult: undefined, @@ -1822,6 +1953,9 @@ export const PluginToHost: MessageFns = { if (message.subscribe !== undefined) { EventSubscribe.encode(message.subscribe, writer.uint32(90).fork()).join(); } + if (message.serverInfo !== undefined) { + ServerInformationRequest.encode(message.serverInfo, writer.uint32(98).fork()).join(); + } if (message.actions !== undefined) { ActionBatch.encode(message.actions, writer.uint32(162).fork()).join(); } @@ -1865,6 +1999,14 @@ export const PluginToHost: MessageFns = { message.subscribe = EventSubscribe.decode(reader, reader.uint32()); continue; } + case 12: { + if (tag !== 98) { + break; + } + + message.serverInfo = ServerInformationRequest.decode(reader, reader.uint32()); + continue; + } case 20: { if (tag !== 162) { break; @@ -1903,6 +2045,7 @@ export const PluginToHost: MessageFns = { pluginId: isSet(object.pluginId) ? globalThis.String(object.pluginId) : "", hello: isSet(object.hello) ? PluginHello.fromJSON(object.hello) : undefined, subscribe: isSet(object.subscribe) ? EventSubscribe.fromJSON(object.subscribe) : undefined, + serverInfo: isSet(object.serverInfo) ? ServerInformationRequest.fromJSON(object.serverInfo) : undefined, actions: isSet(object.actions) ? ActionBatch.fromJSON(object.actions) : undefined, log: isSet(object.log) ? LogMessage.fromJSON(object.log) : undefined, eventResult: isSet(object.eventResult) ? EventResult.fromJSON(object.eventResult) : undefined, @@ -1920,6 +2063,9 @@ export const PluginToHost: MessageFns = { if (message.subscribe !== undefined) { obj.subscribe = EventSubscribe.toJSON(message.subscribe); } + if (message.serverInfo !== undefined) { + obj.serverInfo = ServerInformationRequest.toJSON(message.serverInfo); + } if (message.actions !== undefined) { obj.actions = ActionBatch.toJSON(message.actions); } @@ -1944,6 +2090,9 @@ export const PluginToHost: MessageFns = { message.subscribe = (object.subscribe !== undefined && object.subscribe !== null) ? EventSubscribe.fromPartial(object.subscribe) : undefined; + message.serverInfo = (object.serverInfo !== undefined && object.serverInfo !== null) + ? ServerInformationRequest.fromPartial(object.serverInfo) + : undefined; message.actions = (object.actions !== undefined && object.actions !== null) ? ActionBatch.fromPartial(object.actions) : undefined; diff --git a/proto/types/plugin.proto b/proto/types/plugin.proto index 354d793..21cd688 100644 --- a/proto/types/plugin.proto +++ b/proto/types/plugin.proto @@ -20,10 +20,16 @@ message HostToPlugin { oneof payload { HostHello hello = 10; HostShutdown shutdown = 11; + ServerInformationResponse server_info = 12; EventEnvelope event = 20; } } +message ServerInformationRequest {} +message ServerInformationResponse { + repeated string plugins = 1; +} + message HostHello { string api_version = 1; } @@ -94,6 +100,7 @@ message PluginToHost { oneof payload { PluginHello hello = 10; EventSubscribe subscribe = 11; + ServerInformationRequest server_info = 12; ActionBatch actions = 20; LogMessage log = 30; EventResult event_result = 40; @@ -171,4 +178,4 @@ enum EventType { WORLD_ENTITY_DESPAWN = 79; WORLD_EXPLOSION = 80; WORLD_CLOSE = 81; -} \ No newline at end of file +} From 9fb2128e0eb6bac4a27aa8a375009d6ed12ddbcb Mon Sep 17 00:00:00 2001 From: RestartFU Date: Sun, 23 Nov 2025 12:55:48 -0500 Subject: [PATCH 2/2] various changes --- cmd/plugins/plugins.yaml | 4 ++-- plugin/adapters/plugin/manager.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/plugins/plugins.yaml b/cmd/plugins/plugins.yaml index f8225de..80eba06 100644 --- a/cmd/plugins/plugins.yaml +++ b/cmd/plugins/plugins.yaml @@ -49,8 +49,8 @@ plugins: args: ["run", "cmd/main.go"] work_dir: git: - enabled: false + enabled: true #persistent: true # persistent can be set to true if you don't # want the plugin to be cloned at every startup #version: tags/v0.0.1 # can also specify commit hashes - path: /home/restart/projects/test/plugin-go + path: https://github.com/secmc/plugin-go diff --git a/plugin/adapters/plugin/manager.go b/plugin/adapters/plugin/manager.go index 22fbf50..b8f7212 100644 --- a/plugin/adapters/plugin/manager.go +++ b/plugin/adapters/plugin/manager.go @@ -474,7 +474,6 @@ func (m *Manager) handlePluginMessage(p *pluginProcess, msg *pb.PluginToHost) { for _, pl := range m.plugins { pluginNames = append(pluginNames, pl.cfg.Name) } - p.sendServerInfo(pluginNames) default: p.log.Info(fmt.Sprintf("unhandled event: %#v", payload))