From c836b52dd1b8d6a2999721f235e6c2b6079b266c Mon Sep 17 00:00:00 2001 From: Masy98 Date: Thu, 18 Dec 2014 19:30:32 +0100 Subject: Added Entity Guardian --- MCServer/Plugins/ProtectionAreas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/ProtectionAreas b/MCServer/Plugins/ProtectionAreas index 624580e5b..7765048fa 160000 --- a/MCServer/Plugins/ProtectionAreas +++ b/MCServer/Plugins/ProtectionAreas @@ -1 +1 @@ -Subproject commit 624580e5b522ba2799dfe5b5902b4002b1a8da3e +Subproject commit 7765048fa740b8f119db72a4ccc546504f86b2ab -- cgit v1.2.3 From 5cfb6063c37243477ea79319706dae7cdde27ab2 Mon Sep 17 00:00:00 2001 From: Masy98 Date: Fri, 19 Dec 2014 16:06:43 +0100 Subject: Fixed Guardians size and health --- MCServer/Plugins/ProtectionAreas | 2 +- MCServer/monsters.ini | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/ProtectionAreas b/MCServer/Plugins/ProtectionAreas index 7765048fa..624580e5b 160000 --- a/MCServer/Plugins/ProtectionAreas +++ b/MCServer/Plugins/ProtectionAreas @@ -1 +1 @@ -Subproject commit 7765048fa740b8f119db72a4ccc546504f86b2ab +Subproject commit 624580e5b522ba2799dfe5b5902b4002b1a8da3e diff --git a/MCServer/monsters.ini b/MCServer/monsters.ini index c4bc8c810..70c845b5c 100644 --- a/MCServer/monsters.ini +++ b/MCServer/monsters.ini @@ -192,3 +192,10 @@ AttackDamage=0.0 SightDistance=25.0 MaxHealth=6 +[Guardian] +AttackRange=2.0 +AttackRate=1 +AttackDamage=9.0 +SightDistance=25.0 +MaxHealth=30 + -- cgit v1.2.3 From 6e8e1c6d8da3d5a0f5ca39f6f18d88c2ca6c1e71 Mon Sep 17 00:00:00 2001 From: Masy98 Date: Sat, 20 Dec 2014 10:31:34 +0100 Subject: Added Rabbits --- MCServer/monsters.ini | 196 ++++++++++++++++++++++++++------------------------ 1 file changed, 104 insertions(+), 92 deletions(-) (limited to 'MCServer') diff --git a/MCServer/monsters.ini b/MCServer/monsters.ini index 70c845b5c..af1938e3e 100644 --- a/MCServer/monsters.ini +++ b/MCServer/monsters.ini @@ -1,44 +1,52 @@ -[Spider] +[Bat] AttackRange=2.0 AttackRate=1 -AttackDamage=2.0 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=16 +MaxHealth=6 -[Chicken] +[Blaze] +AttackRange=15.0 +AttackRate=1 +AttackDamage=6.0 +SightDistance=25.0 +MaxHealth=20 +IsFireproof=1 + +[CaveSpider] AttackRange=2.0 AttackRate=1 -AttackDamage=1.0 +AttackDamage=2.0 SightDistance=25.0 -MaxHealth=4 +MaxHealth=12 -[Cow] +[Chicken] AttackRange=2.0 AttackRate=1 -AttackDamage=1.0 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=10 +MaxHealth=4 -[Pig] +[Cow] AttackRange=2.0 AttackRate=1 -AttackDamage=1.0 +AttackDamage=0.0 SightDistance=25.0 MaxHealth=10 -[Sheep] -AttackRange=2.0 +[Creeper] +AttackRange=3.0 AttackRate=1 -AttackDamage=1.0 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=8 +MaxHealth=20 -[Squid] +[EnderDragon] AttackRange=2.0 AttackRate=1 -AttackDamage=1.0 +AttackDamage=6.0 SightDistance=25.0 -MaxHealth=10 +MaxHealth=200 [Enderman] AttackRange=2.0 @@ -47,27 +55,6 @@ AttackDamage=4.0 SightDistance=64.0 MaxHealth=40 -[ZombiePigman] -AttackRange=2.0 -AttackRate=1 -AttackDamage=7.0 -SightDistance=25.0 -MaxHealth=20 -IsFireproof=1 - -[CaveSpider] -AttackRange=2.0 -AttackRate=1 -AttackDamage=2.0 -SightDistance=25.0 -MaxHealth=12 - -[Creeper] -AttackRange=3.0 -AttackRate=1 -AttackDamage=0.0 -SightDistance=25.0 -MaxHealth=20 [Ghast] AttackRange=50.0 @@ -77,125 +64,150 @@ SightDistance=50.0 MaxHealth=10 IsFireproof=1 -[Silverfish] +[Giant] AttackRange=2.0 AttackRate=1 -AttackDamage=1.0 +AttackDamage=6.0 SightDistance=25.0 -MaxHealth=8 - -[Skeleton] -AttackRange=15.0 -AttackRate=1 -SightDistance=40.0 -MaxHealth=20 +MaxHealth=100 -[Slime] +[Guardian] AttackRange=2.0 -AttackRate=1 -AttackDamage=4.0 +AttackRate=1 +AttackDamage=9.0 SightDistance=25.0 -MaxHealth=16 +MaxHealth=30 -[Zombie] +[Horse] AttackRange=2.0 AttackRate=1 -AttackDamage=4.0 +AttackDamage=6.0 SightDistance=25.0 -MaxHealth=20 +MaxHealth=30 -[Wolf] +[IronGolem] AttackRange=2.0 AttackRate=1 -AttackDamage=4.0 +AttackDamage=6.0 SightDistance=25.0 -MaxHealth=20 +MaxHealth=100 -[Blaze] -AttackRange=15.0 +[MagmaCube] +AttackRange=2.0 AttackRate=1 AttackDamage=6.0 SightDistance=25.0 -MaxHealth=20 +MaxHealth=16 IsFireproof=1 -[Villager] +[Mooshroom] AttackRange=2.0 AttackRate=1 AttackDamage=0.0 SightDistance=25.0 -MaxHealth=20 -IsFireproof=0 +MaxHealth=10 -[Witch] +[Ocelot] AttackRange=2.0 AttackRate=1 AttackDamage=0.0 SightDistance=25.0 -MaxHealth=26 - +MaxHealth=10 -[Ocelot] +[Pig] AttackRange=2.0 AttackRate=1 AttackDamage=0.0 SightDistance=25.0 MaxHealth=10 -[Mooshroom] +[Rabbit] AttackRange=2.0 AttackRate=1 AttackDamage=0.0 SightDistance=25.0 MaxHealth=10 -[MagmaCube] +[Sheep] AttackRange=2.0 AttackRate=1 -AttackDamage=6.0 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=16 -IsFireproof=1 +MaxHealth=8 -[Horse] +[Silverfish] AttackRange=2.0 AttackRate=1 -AttackDamage=6.0 +AttackDamage=1.0 SightDistance=25.0 -MaxHealth=30 +MaxHealth=8 -[EnderDragon] +[Skeleton] +AttackRange=15.0 +AttackRate=1 +SightDistance=40.0 +MaxHealth=20 + +[Slime] AttackRange=2.0 AttackRate=1 -AttackDamage=6.0 +AttackDamage=4.0 SightDistance=25.0 -MaxHealth=200 +MaxHealth=16 -[Giant] +[SnowGolem] AttackRange=2.0 AttackRate=1 -AttackDamage=6.0 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=100 +MaxHealth=4 -[IronGolem] +[Spider] +AttackRange=2.0 +AttackRate=1 +AttackDamage=2.0 +SightDistance=25.0 +MaxHealth=16 + +[Squid] AttackRange=2.0 AttackRate=1 -AttackDamage=6.0 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=100 +MaxHealth=10 -[Bat] +[Villager] AttackRange=2.0 -AttackRate=1 +AttackRate=1 AttackDamage=0.0 SightDistance=25.0 -MaxHealth=6 +MaxHealth=20 -[Guardian] +[Witch] AttackRange=2.0 -AttackRate=1 -AttackDamage=9.0 +AttackRate=1 +AttackDamage=0.0 SightDistance=25.0 -MaxHealth=30 +MaxHealth=26 + +[Wolf] +AttackRange=2.0 +AttackRate=1 +AttackDamage=4.0 +SightDistance=25.0 +MaxHealth=20 + +[Zombie] +AttackRange=2.0 +AttackRate=1 +AttackDamage=4.0 +SightDistance=25.0 +MaxHealth=20 +[ZombiePigman] +AttackRange=2.0 +AttackRate=1 +AttackDamage=7.0 +SightDistance=25.0 +MaxHealth=20 +IsFireproof=1 -- cgit v1.2.3 From 5609d76ed7d8026b3bcaeb02fb42bd9ba2f27c96 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 24 Dec 2014 20:02:51 +0100 Subject: APIDump: Updated the player block placement documentation. The hooks now have fewer parameters but are called on all player-placed blocks (#1618). --- MCServer/Plugins/APIDump/APIDesc.lua | 2 ++ MCServer/Plugins/APIDump/Hooks/OnPlayerPlacedBlock.lua | 10 +++++----- MCServer/Plugins/APIDump/Hooks/OnPlayerPlacingBlock.lua | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index ba3763724..b2c7108e9 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1840,7 +1840,9 @@ a_Player:OpenWindow(Window); MoveToWorld = { Params = "WorldName", Return = "bool", Return = "Moves the player to the specified world. Returns true if successful." }, OpenWindow = { Params = "{{cWindow|Window}}", Return = "", Notes = "Opens the specified UI window for the player." }, PermissionMatches = { Params = "Permission, Template", Return = "bool", Notes = "(STATIC) Returns true if the specified permission matches the specified template. The template may contain wildcards." }, + PlaceBlock = { Params = "BlockX, BlockY, BlockZ, BlockType, BlockMeta", Return = "bool", Notes = "Places a block while impersonating the player. The {{OnPlayerPlacingBlock|HOOK_PLAYER_PLACING_BLOCK}} hook is called before the placement, and if it succeeds, the block is placed and the {{OnPlayerPlacedBlock|HOOK_PLAYER_PLACED_BLOCK}} hook is called. Returns true iff the block is successfully placed. Assumes that the block is in a currently loaded chunk." }, Respawn = { Params = "", Return = "", Notes = "Restores the health, extinguishes fire, makes visible and sends the Respawn packet." }, + SendBlocksAround = { Params = "BlockX, BlockY, BlockZ, [Range]", Return = "", Notes = "Sends all the world's blocks in Range from the specified coords to the player, as a BlockChange packet. Range defaults to 1 (only one block sent)." }, SendMessage = { Params = "Message", Return = "", Notes = "Sends the specified message to the player." }, SendMessageFailure = { Params = "Message", Return = "", Notes = "Prepends Rose [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For a command that failed to run because of insufficient permissions, etc." }, SendMessageFatal = { Params = "Message", Return = "", Notes = "Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For something serious, such as a plugin crash, etc." }, diff --git a/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacedBlock.lua b/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacedBlock.lua index 54888a6db..6445a76b4 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacedBlock.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacedBlock.lua @@ -12,7 +12,11 @@ return Use the {{cPlayer}}:GetWorld() function to get the world to which the block belongs.

See also the {{OnPlayerPlacingBlock|HOOK_PLAYER_PLACING_BLOCK}} hook for a similar hook called - before the placement. + before the placement.

+

+ If the client action results in multiple blocks being placed (such as a bed or a door), each separate + block is reported through this hook. All the blocks are already present in the world before the first + instance of this hook is called. ]], Params = { @@ -20,10 +24,6 @@ return { Name = "BlockX", Type = "number", Notes = "X-coord of the block" }, { Name = "BlockY", Type = "number", Notes = "Y-coord of the block" }, { Name = "BlockZ", Type = "number", Notes = "Z-coord of the block" }, - { Name = "BlockFace", Type = "number", Notes = "Face of the existing block upon which the player interacted. One of the BLOCK_FACE_ constants" }, - { Name = "CursorX", Type = "number", Notes = "X-coord of the cursor within the block face (0 .. 15)" }, - { Name = "CursorY", Type = "number", Notes = "Y-coord of the cursor within the block face (0 .. 15)" }, - { Name = "CursorZ", Type = "number", Notes = "Z-coord of the cursor within the block face (0 .. 15)" }, { Name = "BlockType", Type = "BLOCKTYPE", Notes = "The block type of the block" }, { Name = "BlockMeta", Type = "NIBBLETYPE", Notes = "The block meta of the block" }, }, diff --git a/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacingBlock.lua b/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacingBlock.lua index 2a928390b..4241a09aa 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacingBlock.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnPlayerPlacingBlock.lua @@ -15,7 +15,11 @@ return Use the {{cPlayer}}:GetWorld() function to get the world to which the block belongs.

See also the {{OnPlayerPlacedBlock|HOOK_PLAYER_PLACED_BLOCK}} hook for a similar hook called after - the placement. + the placement.

+

+ If the client action results in multiple blocks being placed (such as a bed or a door), each separate + block is reported through this hook and only if all of them succeed, all the blocks are placed. If + any one of the calls are refused by the plugin, all the blocks are refused and reverted on the client. ]], Params = { @@ -23,10 +27,6 @@ return { Name = "BlockX", Type = "number", Notes = "X-coord of the block" }, { Name = "BlockY", Type = "number", Notes = "Y-coord of the block" }, { Name = "BlockZ", Type = "number", Notes = "Z-coord of the block" }, - { Name = "BlockFace", Type = "number", Notes = "Face of the existing block upon which the player is interacting. One of the BLOCK_FACE_ constants" }, - { Name = "CursorX", Type = "number", Notes = "X-coord of the cursor within the block face (0 .. 15)" }, - { Name = "CursorY", Type = "number", Notes = "Y-coord of the cursor within the block face (0 .. 15)" }, - { Name = "CursorZ", Type = "number", Notes = "Z-coord of the cursor within the block face (0 .. 15)" }, { Name = "BlockType", Type = "BLOCKTYPE", Notes = "The block type of the block" }, { Name = "BlockMeta", Type = "NIBBLETYPE", Notes = "The block meta of the block" }, }, -- cgit v1.2.3 From f59740b262bf5259225ab4d6cd2537bead2a12a5 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 25 Dec 2014 00:36:01 +0100 Subject: APIDump: Added details about client handle in OnServerPing hook. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 76b6d1517..430465786 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -7,7 +7,10 @@ return Desc = [[ A plugin may implement an OnServerPing() function and register it as a Hook to process pings from clients in the server server list. It can change the logged in players and player capacity, as well - as the server description and the favicon, that are displayed to the client in the server list. + as the server description and the favicon, that are displayed to the client in the server list.

+

+ The client handle already has its protocol version assigned to it, so the plugin can check that; however, + there's no username associated with the client yet, and no player object. ]], Params = { { Name = "ClientHandle", Type = "{{cClientHandle}}", Notes = "The client handle that pinged the server" }, -- cgit v1.2.3 From b621fb511f5048968434475e4ebc7f4d012626aa Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Mon, 29 Dec 2014 20:21:57 +0100 Subject: Added player count to webadmin Now it shows the number of online players near the memory use --- MCServer/webadmin/template.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index 4d3934da8..416657c4b 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -52,12 +52,21 @@ end +function GetTotalPlayers() + Players=0 + local EachPlayer = function(Player) + Players = Players + 1 + end + cRoot:Get():ForEachPlayer(EachPlayer) + return Players +end function ShowPage(WebAdmin, TemplateRequest) SiteContent = {} local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path) local Title = "MCServer WebAdmin" + local NumPlayers = GetTotalPlayers() local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage() local NumChunks = cRoot:Get():GetTotalChunkCount() local PluginPage = WebAdmin:GetPage(TemplateRequest.Request) @@ -102,6 +111,7 @@ function ShowPage(WebAdmin, TemplateRequest)

-- cgit v1.2.3 From 48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5 Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Tue, 30 Dec 2014 10:31:16 +0100 Subject: Use cRoot:Get():GetServer():GetNumPlayers() instead of a custom function. --- MCServer/webadmin/template.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index 416657c4b..6ea7b69bc 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -52,21 +52,13 @@ end -function GetTotalPlayers() - Players=0 - local EachPlayer = function(Player) - Players = Players + 1 - end - cRoot:Get():ForEachPlayer(EachPlayer) - return Players -end function ShowPage(WebAdmin, TemplateRequest) SiteContent = {} local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path) local Title = "MCServer WebAdmin" - local NumPlayers = GetTotalPlayers() + local NumPlayers = cRoot:Get():GetServer():GetNumPlayers() local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage() local NumChunks = cRoot:Get():GetTotalChunkCount() local PluginPage = WebAdmin:GetPage(TemplateRequest.Request) -- cgit v1.2.3