From 6bc503151746ea05842009983c7de932fa80cd03 Mon Sep 17 00:00:00 2001 From: satoshinm Date: Sun, 27 Aug 2017 14:10:20 -0700 Subject: Implement Forge protocol handshake support (#3869) --- Server/Plugins/APIDump/APIDesc.lua | 54 ++++++++++++++++++++++++++++++ Server/Plugins/APIDump/Classes/Plugins.lua | 4 +++ 2 files changed, 58 insertions(+) (limited to 'Server') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index d7dc83043..573837333 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -1338,6 +1338,16 @@ end }, Notes = "Returns the brand that the client has sent in their MC|Brand plugin message.", }, + GetForgeMods = + { + Returns = + { + { + Type = "table", + }, + }, + Notes = "Returns the Forge mods installed on the client.", + }, GetIPString = { Returns = @@ -1456,6 +1466,16 @@ end }, Notes = "Returns true if the client has registered to receive messages on the specified plugin channel.", }, + IsForgeClient = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if the client is modded with Forge.", + }, IsUUIDOnline = { IsStatic = true, @@ -11892,6 +11912,25 @@ end }, Notes = "Returns true if the specified player is queued to be transferred to a World.", }, + RegisterForgeMod = + { + Params = + { + { + Name = "ModName", + Type = "string", + }, + { + Name = "ModVersion", + Type = "string", + }, + { + Name = "ProtocolVersionNumber", + Type = "number", + }, + }, + Notes = "Add a Forge mod name/version to the server ping list.", + }, SetMaxPlayers = { Params = @@ -11913,6 +11952,21 @@ end }, Notes = "Returns true iff the server is set to authenticate players (\"online mode\").", }, + UnregisterForgeMod = + { + Params = + { + { + Name = "ModName", + Type = "string", + }, + { + Name = "ProtocolVersionNumber", + Type = "number", + }, + }, + Notes = "Remove a Forge mod name/version from the server ping list.", + }, }, }, cStringCompression = diff --git a/Server/Plugins/APIDump/Classes/Plugins.lua b/Server/Plugins/APIDump/Classes/Plugins.lua index e22f4e3a0..6c9df7902 100644 --- a/Server/Plugins/APIDump/Classes/Plugins.lua +++ b/Server/Plugins/APIDump/Classes/Plugins.lua @@ -796,6 +796,10 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); { Notes = "Called when a Login packet is sent to the client, before the client is queued for authentication.", }, + HOOK_LOGIN_FORGE = + { + Notes = "Called when a Forge client has sent its ModList to the server, during the login handshake.", + }, HOOK_PLAYER_ANIMATION = { Notes = "Called when a client send the Animation packet.", -- cgit v1.2.3