diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-21 12:13:43 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-21 12:13:43 +0100 |
commit | 65aa72a2c30d082c3d57370c619c5c59354084fb (patch) | |
tree | 68202098f42aa45e307cec1deeedd95c6315d55f | |
parent | Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested) (diff) | |
download | cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.tar cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.tar.gz cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.tar.bz2 cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.tar.lz cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.tar.xz cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.tar.zst cuberite-65aa72a2c30d082c3d57370c619c5c59354084fb.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/Core/web_serversettings.lua | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/MCServer/Plugins/Core/web_serversettings.lua b/MCServer/Plugins/Core/web_serversettings.lua index 63b5aab47..c4b41e685 100644 --- a/MCServer/Plugins/Core/web_serversettings.lua +++ b/MCServer/Plugins/Core/web_serversettings.lua @@ -9,9 +9,18 @@ end local function HTML_Select_On_Off( name, defaultValue )
return [[<select name="]] .. name .. [[">]]
- .. HTML_Option("1", "On", defaultValue == 1 )
- .. HTML_Option("0", "Off", defaultValue == 0 )
- .. [[</select>]]
+ .. HTML_Option("1", "On", defaultValue == 1 )
+ .. HTML_Option("0", "Off", defaultValue == 0 )
+ .. [[</select>]]
+end
+
+local function HTML_Select_Version( name, defaultValue )
+ return [[<select name="]] .. name .. [[">]]
+ .. HTML_Option("29", "1.2.5", defaultValue == 3 )
+ .. HTML_Option("39", "1.3.2", defaultValue == 2 )
+ .. HTML_Option("47", "1.4.2", defaultValue == 1 )
+ .. HTML_Option("49", "1.4.5", defaultValue == 0 )
+ .. [[</select>]]
end
@@ -31,7 +40,10 @@ local function ShowGeneralSettings( Request ) SettingsIni:SetValue("Server", "MaxPlayers", Request.PostParams["Server_MaxPlayers"], false )
end
if( tonumber( Request.PostParams["Server_Port"] ) ~= nil ) then
- SettingsIni:SetValue("Server", "Port", Request.PostParams["Server_Port"], false )
+ SettingsIni:SetValue("Server", "Port", Request.PostParams["Server_Port"], false )
+ end
+ if( tonumber( Request.PostParams["Server_Version"] ) ~= nil ) then
+ SettingsIni:SetValue("Server", "PrimaryServerVersion", Request.PostParams["Server_Version"], false )
end
if( tonumber( Request.PostParams["Authentication_Authenticate"] ) ~= nil ) then
SettingsIni:SetValue("Authentication", "Authenticate", Request.PostParams["Authentication_Authenticate"], false )
@@ -60,6 +72,8 @@ local function ShowGeneralSettings( Request ) <td><input type="text" name="Server_MaxPlayers" value="]] .. SettingsIni:GetValue("Server", "MaxPlayers") .. [["></td></tr>
<tr><td>Port:</td>
<td><input type="text" name="Server_Port" value="]] .. SettingsIni:GetValue("Server", "Port") .. [["></td></tr>
+ <tr><td>Shown Version:</td>
+ <td>]] .. HTML_Select_Version("Server_Version", SettingsIni:GetValueI("Server", "PrimaryServerVersion") ) .. [[</td></tr>
</table><br>
<table>
|