From adab829d8fc24e0bc21737f5e125e19620b1f87c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 1 Oct 2014 20:14:28 +0100 Subject: Fixed broken code. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 6d2325fe6..db1707e47 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -34,9 +34,9 @@ function OnServerPing(ClientHandle, ServerDescription, OnlinePlayers, MaxPlayers MaxPlayers = 0 -- Change favicon - if (cFile:IsFile("my-favicon.png")) then + if cFile:IsFile("my-favicon.png") then local FaviconData = cFile:ReadWholeFile("my-favicon.png") - if (FaviconData != "") then + if FaviconData ~= "" and FaviconData ~= nil then Favicon = Base64Encode(FaviconData) end end -- cgit v1.2.3 From a765e43ee0db7be62a7d5c643a70cfec5a07d116 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 22:29:38 +0200 Subject: APIDump: Fixed cEntity documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 2f1c766cb..bf5003035 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -785,7 +785,9 @@ end AddSpeedX = { Params = "AddX", Return = "", Notes = "Adds the specified amount of speed in the X axis direction." }, AddSpeedY = { Params = "AddY", Return = "", Notes = "Adds the specified amount of speed in the Y axis direction." }, AddSpeedZ = { Params = "AddZ", Return = "", Notes = "Adds the specified amount of speed in the Z axis direction." }, + ArmorCoversAgainst = { Params = "{{cEntity|AttackerEntity}}, DamageType, RawDamage", Return = "number", Notes = "Returns the points out of a_RawDamage that the currently equipped armor would cover." }, Destroy = { Params = "", Return = "", Notes = "Schedules the entity to be destroyed" }, + GetAirLevel = { Params = "", Return = "number", Notes = "Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players." }, GetArmorCoverAgainst = { Params = "AttackerEntity, DamageType, RawDamage", Return = "number", Notes = "Returns the number of hitpoints out of RawDamage that the currently equipped armor would cover. See {{TakeDamageInfo}} for more information on attack damage." }, GetChunkX = { Params = "", Return = "number", Notes = "Returns the X-coord of the chunk in which the entity is placed" }, GetChunkZ = { Params = "", Return = "number", Notes = "Returns the Z-coord of the chunk in which the entity is placed" }, @@ -801,6 +803,7 @@ end GetHeadYaw = { Params = "", Return = "number", Notes = "Returns the pitch of the entity's head (FIXME: Rename to GetHeadPitch() )." }, GetHealth = { Params = "", Return = "number", Notes = "Returns the current health of the entity." }, GetHeight = { Params = "", Return = "number", Notes = "Returns the height (Y size) of the entity" }, + GetInvulnerableTicks = { Params = "", Return = "number", Notes = "Returns the number of ticks that this entity will be invulnerable for. This is used for after-hit recovery - the entities are invulnerable for half a second after being hit." }, GetKnockbackAmountAgainst = { Params = "ReceiverEntity", Return = "number", Notes = "Returns the amount of knockback that the currently equipped items would cause when attacking the ReceiverEntity." }, GetLookVector = { Params = "", Return = "{{Vector3f}}", Notes = "Returns the vector that defines the direction in which the entity is looking" }, GetMass = { Params = "", Return = "number", Notes = "Returns the mass of the entity. Currently unused." }, @@ -818,23 +821,29 @@ end GetSpeedX = { Params = "", Return = "number", Notes = "Returns the X-part of the speed vector" }, GetSpeedY = { Params = "", Return = "number", Notes = "Returns the Y-part of the speed vector" }, GetSpeedZ = { Params = "", Return = "number", Notes = "Returns the Z-part of the speed vector" }, + GetTicksAlive = { Params = "", Return = "number", Notes = "Returns the number of ticks that this entity has been alive for." }, GetUniqueID = { Params = "", Return = "number", Notes = "Returns the ID that uniquely identifies the entity within the running server. Note that this ID is not persisted to the data files." }, GetWidth = { Params = "", Return = "number", Notes = "Returns the width (X and Z size) of the entity." }, GetWorld = { Params = "", Return = "{{cWorld}}", Notes = "Returns the world where the entity resides" }, GetYaw = { Params = "", Return = "number", Notes = "Returns the yaw (direction) of the entity. Measured in degrees, values range from -180 to +180. 0 means ZP, 90 means XM, -180 means ZM, -90 means XP." }, + HandleSpeedFromAttachee = { Params = "ForwardAmount, SidewaysAmount", Return = "", Notes = "Updates the entity's speed based on the attachee exerting the specified force forward and sideways. Used for entities being driven by other entities attached to them - usually players driving minecarts and boats." }, Heal = { Params = "Hitpoints", Return = "", Notes = "Heals the specified number of hitpoints. Hitpoints is expected to be a positive number." }, IsA = { Params = "ClassName", Return = "bool", Notes = "Returns true if the entity class is a descendant of the specified class name, or the specified class itself" }, IsBoat = { Params = "", Return = "bool", Notes = "Returns true if the entity is a {{cBoat|boat}}." }, IsCrouched = { Params = "", Return = "bool", Notes = "Returns true if the entity is crouched. Always false for entities that don't support crouching." }, IsDestroyed = { Params = "", Return = "bool", Notes = "Returns true if the entity has been destroyed and is awaiting removal from the internal structures." }, + IsEnderCrystal = { Params = "", Return = "bool", Notes = "Returns true if the entity is an ender crystal." }, IsExpOrb = { Params = "", Return = "bool", Notes = "Returns true if the entity represents an experience orb" }, IsFallingBlock = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cFallingBlock}} entity." }, + IsFireproof = { Params = "", Return = "bool", Notes = "Returns true if the entity takes no damage from being on fire." }, IsFloater = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a fishing rod floater" }, IsInvisible = { Params = "", Return = "bool", Notes = "Returns true if the entity is invisible" }, + IsItemFrame = { Params = "", Return = "bool", Notes = "Returns true if the entity is an item frame." }, IsMinecart = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cMinecart|minecart}}" }, IsMob = { Params = "", Return = "bool", Notes = "Returns true if the entity represents any {{cMonster|mob}}." }, IsOnFire = { Params = "", Return = "bool", Notes = "Returns true if the entity is on fire" }, IsPainting = { Params = "", Return = "bool", Notes = "Returns if this entity is a painting." }, + IsPawn = { Params = "", Return = "bool", Notes = "Returns true if the entity is a {{cPawn}} descendant." }, IsPickup = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cPickup|pickup}}." }, IsPlayer = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cPlayer|player}}" }, IsProjectile = { Params = "", Return = "bool", Notes = "Returns true if the entity is a {{cProjectileEntity}} descendant." }, @@ -844,12 +853,19 @@ end IsSubmerged = { Params = "", Return = "bool", Notes = "Returns true if the mob or player is submerged in water (head is in a water block). Note, this function is only updated with mobs or players." }, IsSwimming = { Params = "", Return = "bool", Notes = "Returns true if the mob or player is swimming in water (feet are in a water block). Note, this function is only updated with mobs or players." }, IsTNT = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cTNTEntity|TNT entity}}" }, + Killed = { Params = "{{cEntity|Victim}}", Return = "", Notes = "This entity has killed another entity (the Victim). For players, adds the scoreboard statistics about the kill." }, KilledBy = { Notes = "FIXME: Remove this from API" }, - GetAirLevel = { Params = "", Return = "number", Notes = "Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players." }, + MoveToWorld = + { + { Params = "{{cWorld|World}}, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)." }, + { Params = "WorldName, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)." }, + }, SetGravity = { Params = "Gravity", Return = "", Notes = "Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default." }, SetHeadYaw = { Params = "HeadPitch", Return = "", Notes = "Sets the head pitch (FIXME: Rename to SetHeadPitch() )." }, SetHealth = { Params = "Hitpoints", Return = "", Notes = "Sets the entity's health to the specified amount of hitpoints. Doesn't broadcast any hurt animation. Doesn't kill the entity if health drops below zero. Use the TakeDamage() function instead for taking damage." }, SetHeight = { Params = "", Return = "", Notes = "FIXME: Remove this from API" }, + SetInvulnerableTicks = { Params = "NumTicks", Return = "", Notes = "Sets the amount of ticks for which the entity will not receive any damage from other entities." }, + SetIsFireproof = { Params = "IsFireproof", Return = "", Notes = "Sets whether the entity receives damage from being on fire." }, SetMass = { Params = "Mass", Return = "", Notes = "Sets the mass of the entity. Currently unused." }, SetMaxHealth = { Params = "MaxHitpoints", Return = "", Notes = "Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints." }, SetPitch = { Params = "number", Return = "", Notes = "Sets the pitch (nose-down rotation) of the entity" }, @@ -864,7 +880,7 @@ end SetPosZ = { Params = "number", Return = "", Notes = "Sets the Z-coord of the entity's pivot" }, SetRoll = { Params = "number", Return = "", Notes = "Sets the roll (sideways rotation) of the entity. Currently unused." }, SetRot = { Params = "{{Vector3f|Rotation}}", Return = "", Notes = "Sets the entire rotation vector (Yaw, Pitch, Roll)" }, - SetYawFromSpeed = { Params = "", Return = "", Notes = "Sets the entity's yaw to match its current speed (entity looking forwards as it moves). (FIXME: Rename to SetYawFromSpeed)" }, + SetYawFromSpeed = { Params = "", Return = "", Notes = "Sets the entity's yaw to match its current speed (entity looking forwards as it moves)." }, SetSpeed = { { Params = "SpeedX, SpeedY, SpeedZ", Return = "", Notes = "Sets the current speed of the entity" }, @@ -890,18 +906,20 @@ end Constants = { etBoat = { Notes = "The entity is a {{cBoat}}" }, + etEnderCrystal = { Notes = "" }, etEntity = { Notes = "No further specialization available" }, etExpOrb = { Notes = "The entity is a {{cExpOrb}}" }, etFallingBlock = { Notes = "The entity is a {{cFallingBlock}}" }, etFloater = { Notes = "The entity is a fishing rod floater" }, + etItemFrame = { Notes = "" }, + etMinecart = { Notes = "The entity is a {{cMinecart}} descendant" }, etMob = { Notes = "The entity is a {{cMonster}} descendant" }, etMonster = { Notes = "The entity is a {{cMonster}} descendant" }, - etMinecart = { Notes = "The entity is a {{cMinecart}} descendant" }, - etPlayer = { Notes = "The entity is a {{cPlayer}}" }, + etPainting = { Notes = "The entity is a {{cPainting}}" }, etPickup = { Notes = "The entity is a {{cPickup}}" }, + etPlayer = { Notes = "The entity is a {{cPlayer}}" }, etProjectile = { Notes = "The entity is a {{cProjectileEntity}} descendant" }, etTNT = { Notes = "The entity is a {{cTNTEntity}}" }, - etPainting = { Notes = "The entity is a {{cPainting}}" }, }, ConstantGroups = { -- cgit v1.2.3 From 7c731dbd8ac55c5e5660df0e1f745a76489b646c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 1 Oct 2014 21:37:20 +0100 Subject: Added parentheses for clarity. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index db1707e47..76b6d1517 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -36,7 +36,7 @@ function OnServerPing(ClientHandle, ServerDescription, OnlinePlayers, MaxPlayers -- Change favicon if cFile:IsFile("my-favicon.png") then local FaviconData = cFile:ReadWholeFile("my-favicon.png") - if FaviconData ~= "" and FaviconData ~= nil then + if (FaviconData ~= "") and (FaviconData ~= nil) then Favicon = Base64Encode(FaviconData) end end -- cgit v1.2.3 From 017ba1c32a8f5f43dcf769692ad2ffea497aee5e Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:08:10 +0200 Subject: Made WebAdmin design more modern --- MCServer/webadmin/files/style.css | 496 +++++++++++++++++++----------------- MCServer/webadmin/template.lua | 63 ++--- MCServer/webadmin/template_orig.lua | 137 ++++++++++ 3 files changed, 431 insertions(+), 265 deletions(-) create mode 100644 MCServer/webadmin/template_orig.lua (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index e7ffe3999..a1d9993de 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,326 +1,354 @@ -/* reset CSS */ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; +body, html +{ + font-family: "Open Sans"; padding: 0; - border: 0; - outline: 0; - font-size: 100%; - vertical-align: baseline; - background: transparent; + margin: 0; + font-weight: 400; + background-color: #fbe9e7; + color: rgba(0, 0, 0, 0.87); +} + +.light { font-weight: 300; } +.bold { font-weight: 600; } + +#wrapper +{ + background-color: #ff5722; + margin: 40px auto; + width: 99%; + max-width: 1200px; + box-sizing: border-box; + -moz-box-sizing: border-box; + box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15); + color: rgba(0, 0, 0, 0.87); +} + +.title +{ + font-size: 30pt; + padding: 10px 40px; + text-decoration: none; + color: white; + text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3); + display: block; } -body { - line-height: 1; + +#sidebar +{ + float: left; + width: 20%; } -ol, ul { + +.sideNav +{ list-style: none; -} -blockquote, q { - quotes: none; + background-color: #fafafa; + margin: 20px 0; + padding: 5px 0; + width: 100%; + box-shadow: 1px 0px 10px rgba(0, 0, 0, 0.2); } -/* remember to define focus styles! */ -:focus { - outline: 0; +.sideNav li +{ + padding: 10px; + color: rgba(0, 0, 0, 0.54); } -/* remove textarea resize at Safari */ -textarea { - resize: none; +.sideNav li.link +{ + padding-left: 30px; } -/* remember to highlight inserts somehow! */ -ins { +.sideNav li.link a +{ text-decoration: none; + color: rgba(0, 0, 0, 0.87); } -del { - text-decoration: line-through; -} - -/* tables still need 'cellspacing="0"' in the markup */ -table { - border-collapse: collapse; - border-spacing: 0; -} - -/* - Origional from http://www.perspectived.com/ - Modified by Ben Phelps - Made for FakeTruth - MCServer -*/ - -/* Basic ---------------------------------------- */ - -.clear { clear: both; } - -body { - background: white; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #646464; - text-align: center; +#container +{ + margin: 0; + padding: 0; + overflow: hidden; + background-color: #f5f5f5; } -#wrapper { - text-align: left; - width: 930px; - margin: 0 auto; +#main +{ + float: right; + width: 80%; + padding: 0 15px 20px 15px; + box-sizing: border-box; + -moz-box-sizing: border-box; } -/* Logo ---------------------------------------- */ - -h1 { - margin: 15px 0 10px 5px; - width: 180px; - height: 36px; - background: url(logo.png) no-repeat left top; +.clear +{ + clear: both; } -h1 a { - display: block; - width: 225px; - height: 28px; +table +{ + width: 100%; + border-collapse: collapse; } -h1 span { display: none; } - -a { - color: #646464; +table td +{ + padding: 5px; } -/* Container ---------------------------------------- */ - -#containerHolder { - background: #eee; +table th +{ + border-bottom: 1px solid rgba(0, 0, 0, 0.12); padding: 5px; + text-align: center; } - -#container { - background: #fff url(background.gif) repeat-y left top; - border: 1px solid #ddd; - width: 918px; - +table tr:nth-child(odd) +{ + background-color: rgba(0, 0, 0, 0.015); } -#connectHolder { - background: #eee; - padding: 5px; - margin-bottom:8px; +p +{ + margin: 8px 0; + padding: 8px 3px; } - -#connect { - border: 1px solid #ddd; - background-color: #fff; - padding:5px; - width: 908px; +a +{ + text-decoration: none; + color: #0277bd; + -webkit-transition: color 0.1s linear; + -moz-transition: color 0.1s linear; + transition: color 0.1s linear; } -.pics { - height: 375px; - width: 600px; -} - -.pics img { - padding: 5px; - border: 1px solid #ddd; - background-color: #eee; - width: 600px; - height: 375px; - margin-left: 15px; +a:hover +{ + color: #01579b; } -/* Login -------------------------------------- */ - -#loginLogo { - margin: 0 auto; - margin-top:100px; - width: 180px; - height: 36px; - background-image: url(logo.png); +.welcome-msg +{ + color: rgba(0, 0, 0, 0.54); } -#loginHolder { - background: #eee; - padding: 5px; - width: 310px; - margin: 0 auto; - height: 90px; - margin-top:20px; +.username +{ + text-transform: capitalize; + color: rgba(0, 0, 0, 0.87); } -#login { - padding:10px; - width: 288px; - height: 68px; - border: 1px solid #ddd; - background:#fff; - text-align: left; +a:hover +{ + color: black; } - -/* Sidebar ---------------------------------------- */ - -#sidebar { - width: 179px; - float: left; +input, select +{ + padding: 8px; } -#sidebar .sideNav { width: 179px; } +form +{ + padding: 4px; +} -#sidebar .sideNav li { border-bottom: 1px solid #ddd; width: 179px; } +.info input[type="submit"], .info button, .info input[type="button"], +.warn input[type="submit"], .warn button, .warn input[type="button"], +.err input[type="submit"], .err button, .err input[type="button"] +{ + float: right; +} -#sidebar .sideNav li a { +.err +{ + color: white; display: block; - color: #646464; - background: #f6f6f6; - text-decoration: none; - height: 29px; - line-height: 29px; - padding: 0 19px; - width: 141px; + background-color: #e51c23 !important; + padding: 15px; + line-height: 30px; + min-height: 30px; } -#sidebar .sideNav li a:hover { background: #fdfcf6; } - -#sidebar .sideNav li a.active, #sidebar .sideNav li a.active:hover { - background: #f0f7fa; - color: #c66653; +.err:before +{ + content: "ERROR: "; } -/* Breadcrumb ---------------------------------------- */ - -h2 { - width: 718px; - float: right; - color: #646464; - font-size: 16px; - line-height: 16px; - font-weight: bold; - margin: 20px 0 0 0; - padding: 0 0 10px 0; - border-bottom: 1px solid #ddd; +.warn +{ + color: white; + display: block; + background-color: #ff5722 !important; + padding: 15px; + line-height: 30px; + min-height: 30px; } -h2 a { - color: #646464; - text-decoration: none; +.warn:before +{ + content: "WARNING: "; } -h2 a.active { color: #c66653; } +.info +{ + color: white; + display: block; + background-color: #5677fc !important; + padding: 15px; + line-height: 30px; + min-height: 30px; +} -h2 a:hover { text-decoration: underline; } +.info:before +{ + content: "INFORMATION: "; +} -/* Content ---------------------------------------- */ +#footer .fleft +{ + float: left; +} -#main { - width: 700px; +#footer .fright +{ float: right; - padding: 0 19px 0 0; + text-align: right; } -#main p { - +#footer +{ + margin: 0; padding: 10px; + font-size: 9pt; + color: rgba(255, 255, 255, 0.8); + box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.2) inset; +} +#footer a +{ + text-transform: none; + color: white; } -h3 { - font-size: 14px; - line-height: 14px; - font-weight: bold; - color: #5494af; - padding: 0 0 0 10px; - margin: 20px 0 10px; +input[type="submit"], button, input[type="button"] +{ + background-color: #ffc107; + padding: 8px 15px 8px 15px; + margin: 0 2px; + display: inline-block; + text-align: center; + color: black; + box-shadow: 0px 2px 3px rgba(0,0,0,0.2); + border: none; + outline: none; + cursor: pointer; } -h4 { - padding: 0 0 0 10px; - margin: 20px 0 10px; +input[type="submit"]:hover, button:hover, input[type="button"]:hover +{ + background-color: #ffca28; } -#main ul { - padding: 0 0 0 10px; - list-style-type: circle; - list-style-position: inside; +input[type="submit"]:active, button:active, input[type="button"]:active +{ + background-color: #ffd54f; + -webkit-transform: translateY(1px); + -moz-transform: translateY(1px); + transform: translateY(1px); } -#main table { - border-top: 1px solid #ddd; - width: 700px; +hr +{ + border: none; + height: 1px; + background-color: rgba(0, 0, 0, 0.12); } -#main table tr th { - text-align: left; - background: #f6f6f6; - padding: 0px 20px; - height: 20px; - line-height: 20px; - border-bottom: 1px solid #ddd; +h4 +{ + padding-bottom: 10px; + margin-bottom: 12px; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } -#main table tr td { - background: #f6f6f6; - padding: 0px 20px; - height: 29px; - line-height: 29px; - border-bottom: 1px solid #ddd; + +/**** PAGE SPECIFIC CSS ****/ + +/* remove the * for disabling: */ + +.page-core-server-settings table td +{ + text-align: center; + width: 25%; } -#main table tr.odd td { - background: #fbfbfb; +.page-core-server-settings.no-param table td:nth-child(1) a, +.page-core-server-settings.param-tab-general table td:nth-child(1) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); } -#main table tr:hover td { background: #fdfcf6; } +.page-core-server-settings.param-tab-monsters table td:nth-child(2) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); +} -#main table .action { - text-align: right; - padding: 0 20px 0 10px; +.page-core-server-settings.param-tab-worlds table td:nth-child(3) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); } -#main table tr .action a { margin: 0 0 0 10px; text-decoration: none; color: #9b9b9b; } -#main table tr:hover .action .edit { color: #c5a059; } -#main table tr:hover .action .delete { color: #a02b2b; } -#main table tr:hover .action .view { color: #55a34a; } +.page-core-server-settings.param-tab-world table td:nth-child(4) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); +} -#main table tr:hover .action a:hover { text-decoration: underline; } +.page-core-permissions form table tr, +.page-core-permissions form table td, +.page-core-permissions form table th +{ + border: none; + background-color: transparent; +} -fieldset { - border: 1px solid #ddd; - padding: 19px; - margin: 0 0 20px 0; - background: #fbfbfb; +.page-core-permissions form table tr:nth-child(1) th +{ + width: 35%; } -form p { margin: 0 0 14px 0; float: left; width: 100%; } +.page-core-permissions form table tr:nth-child(1) td +{ + width: 65%; +} -label { - display: block; +.page-core-permissions form table td input +{ width: 100%; - margin: 0 0 7px 0; - line-height: 12px; + box-sizing: border-box; + -moz-box-sizing: border-box; + margin: 0; } -/* Footer ---------------------------------------- */ +#ChatDiv +{ + margin-bottom: 10px; +} -#footer { - margin: 10px 0 30px 0; - font-size: 11px; - line-height: 11px; - color: #9B9B9B; - padding: 0 0 0 5px; +#ChatMessage +{ + width: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; } -#footer a { color: #9B9B9B; } -#footer a:hover { text-decoration: none; } +/**/ \ No newline at end of file diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index a7480f83e..84a50b055 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -70,25 +70,33 @@ function ShowPage(WebAdmin, TemplateRequest) PageContent, SubTitle = GetDefaultPage() end + local reqParamsClass = "" + + for key,value in pairs(TemplateRequest.Request.Params) do + reqParamsClass = reqParamsClass .. " param-" .. string.lower(string.gsub(key, "[^a-zA-Z0-9]+", "-") .. "-" .. string.gsub(value, "[^a-zA-Z0-9]+", "-")) + end + + if (string.gsub(reqParamsClass, "%s", "") == "") then + reqParamsClass = " no-param" + end + Output([[ ]] .. Title .. [[ - + + - -
- -

- MCServer -

-
-
-
- + +
- ]]) +]]) return table.concat(SiteContent) end diff --git a/MCServer/webadmin/template_orig.lua b/MCServer/webadmin/template_orig.lua new file mode 100644 index 000000000..a7480f83e --- /dev/null +++ b/MCServer/webadmin/template_orig.lua @@ -0,0 +1,137 @@ +-- Use a table for fast concatenation of strings +local SiteContent = {} +function Output(String) + table.insert(SiteContent, String) +end + + + + + +function GetTableSize(Table) + local Size = 0 + for key,value in pairs(Table) do + Size = Size + 1 + end + return Size +end + + + + + +function GetDefaultPage() + local PM = cRoot:Get():GetPluginManager() + + local SubTitle = "Current Game" + local Content = "" + + Content = Content .. "

Server Name:

" + Content = Content .. "

" .. cRoot:Get():GetServer():GetServerID() .. "

" + + Content = Content .. "

Plugins:

    " + local AllPlugins = PM:GetAllPlugins() + for key,value in pairs(AllPlugins) do + if( value ~= nil and value ~= false ) then + Content = Content .. "
  • " .. key .. " V." .. value:GetVersion() .. "
  • " + end + end + + Content = Content .. "
" + Content = Content .. "

Players:

    " + + local AddPlayerToTable = function( Player ) + Content = Content .. "
  • " .. Player:GetName() .. "
  • " + end + cRoot:Get():ForEachPlayer( AddPlayerToTable ) + + Content = Content .. "

"; + + return Content, SubTitle +end + + + + + +function ShowPage(WebAdmin, TemplateRequest) + SiteContent = {} + local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path) + local Title = "MCServer WebAdmin" + local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage() + local NumChunks = cRoot:Get():GetTotalChunkCount() + local PluginPage = WebAdmin:GetPage(TemplateRequest.Request) + local PageContent = PluginPage.Content + local SubTitle = PluginPage.PluginName + if (PluginPage.TabName ~= "") then + SubTitle = PluginPage.PluginName .. " - " .. PluginPage.TabName + end + if (PageContent == "") then + PageContent, SubTitle = GetDefaultPage() + end + + Output([[ + + + + +]] .. Title .. [[ + + + + +
+ +

+ MCServer +

+
+
+ + + +

Welcome ]] .. TemplateRequest.Request.Username .. [[

+
+

]] .. SubTitle .. [[

+ ]] .. PageContent .. [[ +
+ + +
+ +
+ +
+ + + +
+ + + + ]]) + + return table.concat(SiteContent) +end -- cgit v1.2.3 From 3baacce51e05ea4cc6d7352475b08a35ba8bc2a0 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:14:16 +0200 Subject: Added license --- MCServer/webadmin/files/style.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index a1d9993de..3c8c8750f 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,3 +1,19 @@ +/* + * Copyright 2014 WebFreak001 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + body, html { font-family: "Open Sans"; -- cgit v1.2.3 From 828ded593cad10018dce226541bf782e6f2f545e Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:24:54 +0200 Subject: Added newline --- MCServer/webadmin/files/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 3c8c8750f..5860c00e1 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -366,5 +366,4 @@ h4 -moz-box-sizing: border-box; } - -/**/ \ No newline at end of file +/**/ -- cgit v1.2.3 From cea0707ad5144e698fec6bf6a02174c7f1fd58cd Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:35:29 +0200 Subject: Removed my license, added me to CONTRIBUTORS --- MCServer/webadmin/files/style.css | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 5860c00e1..211f9f9a3 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,19 +1,3 @@ -/* - * Copyright 2014 WebFreak001 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - body, html { font-family: "Open Sans"; -- cgit v1.2.3 From 7aa81de2c67a3347720c9a5772832577b92a81d6 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:48:44 +0200 Subject: added font callback --- MCServer/webadmin/files/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 211f9f9a3..7f01b34b2 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,6 +1,6 @@ body, html { - font-family: "Open Sans"; + font-family: "Open Sans", Tahoma, sans-serif; padding: 0; margin: 0; font-weight: 400; -- cgit v1.2.3 From 02617a11cd6454c7a1d35bded1413828460cfdeb Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 5 Oct 2014 15:05:24 +0200 Subject: Updated Core. --- MCServer/Plugins/Core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core index 3a0e0597b..f8c2531fb 160000 --- a/MCServer/Plugins/Core +++ b/MCServer/Plugins/Core @@ -1 +1 @@ -Subproject commit 3a0e0597b7a24c44bf87ec90beb9be48d0b99709 +Subproject commit f8c2531fbef9bfd0b6f024d4d3319384a70a0831 -- cgit v1.2.3 From a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 5 Oct 2014 20:19:21 +0200 Subject: cClientHandle: Added protocol version knowledge. --- MCServer/Plugins/APIDump/APIDesc.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index bf5003035..6a151b5ef 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -529,6 +529,7 @@ end GetLocale = { Params = "", Return = "Locale", Notes = "Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings." }, GetPing = { Params = "", Return = "number", Notes = "Returns the ping time, in ms" }, GetPlayer = { Params = "", Return = "{{cPlayer|cPlayer}}", Notes = "Returns the player object connected to this client. Note that this may be nil, for example if the player object is not yet spawned." }, + GetProtocolVersion = { Params = "", Return = "number", Notes = "Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known." }, GetUniqueID = { Params = "", Return = "number", Notes = "Returns the UniqueID of the client used to identify the client in the server" }, GetUUID = { Params = "", Return = "string", Notes = "Returns the authentication-based UUID of the client. This UUID should be used to identify the player when persisting any player-related data. Returns a 32-char UUID (no dashes)" }, GetUsername = { Params = "", Return = "string", Notes = "Returns the username that the client has provided" }, -- cgit v1.2.3