summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua4
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua17
-rw-r--r--MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua2
-rw-r--r--MCServer/settings_apidump.ini30
4 files changed, 52 insertions, 1 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 26537918e..9b117b0fa 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -867,6 +867,10 @@ ValueName0=SomeOtherValue
{ Params = "KeyName, Comment", Return = "", Notes = "Adds a comment to be stored in the file under the specified key" },
},
AddKeyName = { Params = "KeyName", Returns = "number", Notes = "Adds a new key of the specified name. Returns the KeyID of the new key." },
+ AddValue = { Params = "KeyName, ValueName, Value", Return = "", Notes = "Adds a new value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)" },
+ AddValueB = { Params = "KeyName, ValueName, Value", Return = "", Notes = "Adds a new bool value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)" },
+ AddValueF = { Params = "KeyName, ValueName, Value", Return = "", Notes = "Adds a new float value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)" },
+ AddValueI = { Params = "KeyName, ValueName, Value", Return = "", Notes = "Adds a new integer value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)" },
CaseInsensitive = { Params = "", Return = "", Notes = "Sets key names' and value names' comparisons to case insensitive (default)." },
CaseSensitive = { Params = "", Return = "", Notes = "Sets key names and value names comparisons to case sensitive." },
Clear = { Params = "", Return = "", Notes = "Removes all the in-memory data. Note that , like all the other operations, this doesn't affect any file data." },
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 7b43b6c20..8512fbd5f 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -966,6 +966,23 @@ end
function OnPluginMessage(a_Client, a_Channel, a_Message)
LOGINFO("Received a plugin message from client " .. a_Client:GetUsername() .. ": channel '" .. a_Channel .. "', message '" .. a_Message .. "'");
+
+ if (a_Channel == "REGISTER") then
+ if (a_Message:find("WECUI")) then
+ -- The client has WorldEditCUI mod installed, test the comm by sending a few WECUI messages:
+ --[[
+ WECUI messages have the following generic format:
+ <shape>|<params>
+ If shape is p (cuboid selection), the params are sent individually for each corner click and have the following format:
+ <point-index>|<x>|<y>|<z>|<volume>
+ point-index is 0 or 1 (lclk / rclk)
+ volume is the 3D volume of the current cuboid selected (all three coords' deltas multiplied), including the edge blocks; -1 if N/A
+ --]]
+ -- Select a 51 * 51 * 51 block cuboid:
+ a_Client:SendPluginMessage("WECUI", "p|0|50|50|50|-1");
+ a_Client:SendPluginMessage("WECUI", "p|1|100|100|100|132651"); -- 132651 = 51 * 51 * 51
+ end
+ end
end
diff --git a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
index 6e90b1ae9..4a7cd4e1e 100644
--- a/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
+++ b/MCServer/Plugins/TestLuaRocks/TestLuaRocks.lua
@@ -27,7 +27,7 @@ LOG("headers: ");
for k, v in pairs(headers or {}) do
LOG(" " .. k .. ": " .. v);
end
-LOG("body length: " .. string.length(body));
+LOG("body length: " .. string.len(body));
diff --git a/MCServer/settings_apidump.ini b/MCServer/settings_apidump.ini
new file mode 100644
index 000000000..80227a713
--- /dev/null
+++ b/MCServer/settings_apidump.ini
@@ -0,0 +1,30 @@
+; This settings file is used by the $/MakeLuaAPI.cmd script
+; It is copied over settings.ini so that the APIDump plugin gets loaded upon server start
+
+[Server]
+Description=MCServer - in C++!
+MaxPlayers=100
+HardcoreEnabled=0
+Port=25565
+PortsIPv6=
+DefaultViewDistance=10
+
+[RCON]
+Enabled=0
+
+[Authentication]
+Authenticate=1
+Server=session.minecraft.net
+Address=/game/checkserver.jsp?user=%USERNAME%&serverId=%SERVERID%
+
+[Worlds]
+; World=secondworld
+DefaultWorld=world
+
+[Plugins]
+Plugin=APIDump
+
+[DeadlockDetect]
+Enabled=0
+IntervalSec=20
+