summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua17
-rw-r--r--MCServer/settings_apidump.ini30
2 files changed, 47 insertions, 0 deletions
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/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
+