From 04653b45394a9e95fddcae274cca0c422f21cfdc Mon Sep 17 00:00:00 2001 From: Howaner Date: Sat, 30 Aug 2014 12:53:19 +0200 Subject: Added GetWalkSpeed() and SetWalkSpeed() documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 2 ++ MCServer/Plugins/SexyMotd | 1 + 2 files changed, 3 insertions(+) create mode 120000 MCServer/Plugins/SexyMotd (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 3e1a6e3bb..434dd8a90 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1636,6 +1636,8 @@ a_Player:OpenWindow(Window); MobTypeToString = { Params = "{{cMonster#MobType|MobType}}", Return = "string", Notes = "(STATIC) Returns the string representing the given mob type ({{cMonster#MobType|mtXXX}} constant), or empty string if unknown type." }, MoveToPosition = { Params = "Position", Return = "", Notes = "Moves mob to the specified position" }, StringToMobType = { Params = "string", Return = "{{cMonster#MobType|MobType}}", Notes = "(STATIC) Returns the mob type ({{cMonster#MobType|mtXXX}} constant) parsed from the string type (\"creeper\"), or mtInvalidType if unrecognized." }, + GetWalkSpeed = { Params = "", Return = "number", Notes = "Returns the walk speed of this mob. Standard is 1.0" }, + SetWalkSpeed = { Params = "number", Return = "", Notes = "Sets the walk speed of this mob. Standard is 1.0" }, }, Constants = { diff --git a/MCServer/Plugins/SexyMotd b/MCServer/Plugins/SexyMotd new file mode 120000 index 000000000..b6af08265 --- /dev/null +++ b/MCServer/Plugins/SexyMotd @@ -0,0 +1 @@ +/home/franz/Schreibtisch/MCServer Plugins/SexyMotd/ \ No newline at end of file -- cgit v1.2.3 From c5be3e0b6673c03c9a4dba109454af8bcaefc4e5 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sat, 30 Aug 2014 12:55:43 +0200 Subject: Removed SexyMotd link --- MCServer/Plugins/SexyMotd | 1 - 1 file changed, 1 deletion(-) delete mode 120000 MCServer/Plugins/SexyMotd (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/SexyMotd b/MCServer/Plugins/SexyMotd deleted file mode 120000 index b6af08265..000000000 --- a/MCServer/Plugins/SexyMotd +++ /dev/null @@ -1 +0,0 @@ -/home/franz/Schreibtisch/MCServer Plugins/SexyMotd/ \ No newline at end of file -- cgit v1.2.3 From c8953d165c037684b1373e090dea56daddc6e636 Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 2 Sep 2014 19:13:36 +0200 Subject: Added a custom name test to the debuggers plugin. --- MCServer/Plugins/Debuggers/Debuggers.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 179935c08..65ce0993a 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -38,6 +38,7 @@ function Initialize(Plugin) -- _X: Disabled so that the normal operation doesn't interfere with anything -- PM:AddHook(cPluginManager.HOOK_CHUNK_GENERATED, OnChunkGenerated); + PM:BindCommand("/cm", "debuggers", HandleCustomNameCmd, "- Gives you a custom name"); PM:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "- Shows a list of all the loaded entities"); PM:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "- Kills all the loaded entities"); PM:BindCommand("/wool", "debuggers", HandleWoolCmd, "- Sets all your armor to blue wool"); @@ -768,6 +769,22 @@ end +function HandleCustomNameCmd(Split, Player) + if (Split[2] == nil) then + Player:SendMessage("Usage: /cm [CustomName]"); + return true; + end + + local NewName = Split[2] + Player:SetCustomName(NewName); + Player:SendMessageSuccess("Custom name setted to " .. Player:GetCustomName() .. "!") + return true +end + + + + + function HandleListEntitiesCmd(Split, Player) local NumEntities = 0; -- cgit v1.2.3 From 079634d18cf63abad05db0fda9a4510aa75c0522 Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 2 Sep 2014 19:20:59 +0200 Subject: Added the new functions to APIDump. --- MCServer/Plugins/APIDump/APIDesc.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index e7f9e9b18..f109638e9 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1629,6 +1629,11 @@ a_Player:OpenWindow(Window); ]], Functions = { + HasCustomName = { Params = "", Return = "bool", Notes = "Returns true if the monster has a custom name." }, + GetCustomName = { Params = "", Return = "string", Notes = "Gets the custom name of the monster. If no custom name is set, the function returns an empty string." }, + SetCustomName = { Params = "string", Return = "", Notes = "Sets the custom name of the monster. You see the name over the monster. If you want to disable the custom name, simply set an empty string." }, + IsCustomNameAlwaysVisible = { Params = "", Return = "bool", Notes = "Is the custom name of this monster always visible? If not, you only see the name when you sight the mob." }, + SetCustomNameAlwaysVisible = { Params = "bool", Return = "", Notes = "Sets the custom name visiblity of this monster. If it's false, you only see the name when you sight the mob. If it's true, you always see the custom name." }, FamilyFromType = { Params = "{{cMonster#MobType|MobType}}", Return = "{{cMonster#MobFamily|MobFamily}}", Notes = "(STATIC) Returns the mob family ({{cMonster#MobFamily|mfXXX}} constants) based on the mob type ({{cMonster#MobType|mtXXX}} constants)" }, GetMobFamily = { Params = "", Return = "{{cMonster#MobFamily|MobFamily}}", Notes = "Returns this mob's family ({{cMonster#MobFamily|mfXXX}} constant)" }, GetMobType = { Params = "", Return = "{{cMonster#MobType|MobType}}", Notes = "Returns the type of this mob ({{cMonster#MobType|mtXXX}} constant)" }, @@ -1752,6 +1757,7 @@ a_Player:OpenWindow(Window); ForceSetSpeed = { Params = "{{Vector3d|Direction}}", Notes = "Forces the player to move to the given direction." }, GetClientHandle = { Params = "", Return = "{{cClientHandle}}", Notes = "Returns the client handle representing the player's connection. May be nil (AI players)." }, GetColor = { Return = "string", Notes = "Returns the full color code to be used for this player's messages (based on their rank). Prefix player messages with this code." }, + GetTabListName = { Return = "string", Notes = "Returns the name that is used in the tablist." }, GetCurrentXp = { Params = "", Return = "number", Notes = "Returns the current amount of XP" }, GetEffectiveGameMode = { Params = "", Return = "{{Globals#GameMode|GameMode}}", Notes = "(OBSOLETE) Returns the current resolved game mode of the player. If the player is set to inherit the world's gamemode, returns that instead. See also GetGameMode() and IsGameModeXXX() functions. Note that this function is the same as GetGameMode(), use that function instead." }, GetEquippedItem = { Params = "", Return = "{{cItem}}", Notes = "Returns the item that the player is currently holding; empty item if holding nothing." }, @@ -1802,6 +1808,9 @@ a_Player:OpenWindow(Window); SendMessagePrivateMsg = { Params = "Message, SenderName", Return = "", Notes = "Prepends Light Blue [MSG: *SenderName*] / prepends SenderName and colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For private messaging." }, SendMessageSuccess = { Params = "Message", Return = "", Notes = "Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Success notification." }, SendMessageWarning = { Params = "Message, Sender", Return = "", Notes = "Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Denotes that something concerning, such as plugin reload, is about to happen." }, + HasCustomName = { Params = "", Return = "bool", Notes = "Returns true if the player has a custom name." }, + GetCustomName = { Params = "", Return = "string", Notes = "Returns the custom name of this player. If the player hasn't a custom name, it will return an empty string." }, + SetCustomName = { Params = "string", Return = "", Notes = "Sets the custom name of this player. If you want to disable the custom name, simply set an empty string. The custom name will be used in the tab-list, in the player nametag and in the tab-completion." }, SetCanFly = { Params = "CanFly", Notes = "Sets if the player can fly or not." }, SetCrouch = { Params = "IsCrouched", Return = "", Notes = "Sets the crouch state, broadcasts the change to other players." }, SetCurrentExperience = { Params = "XPAmount", Return = "", Notes = "Sets the current amount of experience (and indirectly, the XP level)." }, -- cgit v1.2.3 From 38e824dbcfa66ee63670f6e8aa708e7a4aa58f5e Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 2 Sep 2014 20:10:41 +0200 Subject: Renamed SetWalkSpeed() to SetRelativeWalkSpeed() --- MCServer/Plugins/APIDump/APIDesc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 337ce47c3..18fb7acad 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1636,8 +1636,8 @@ a_Player:OpenWindow(Window); MobTypeToString = { Params = "{{cMonster#MobType|MobType}}", Return = "string", Notes = "(STATIC) Returns the string representing the given mob type ({{cMonster#MobType|mtXXX}} constant), or empty string if unknown type." }, MoveToPosition = { Params = "Position", Return = "", Notes = "Moves mob to the specified position" }, StringToMobType = { Params = "string", Return = "{{cMonster#MobType|MobType}}", Notes = "(STATIC) Returns the mob type ({{cMonster#MobType|mtXXX}} constant) parsed from the string type (\"creeper\"), or mtInvalidType if unrecognized." }, - GetWalkSpeed = { Params = "", Return = "number", Notes = "Returns the walk speed of this mob. Standard is 1.0" }, - SetWalkSpeed = { Params = "number", Return = "", Notes = "Sets the walk speed of this mob. Standard is 1.0" }, + GetRelativeWalkSpeed = { Params = "", Return = "number", Notes = "Returns the relative walk speed of this mob. Standard is 1.0" }, + SetRelativeWalkSpeed = { Params = "number", Return = "", Notes = "Sets the relative walk speed of this mob. Standard is 1.0" }, }, Constants = { -- cgit v1.2.3 From ccaec8f424f4cb59ced6518d7fb1171667728f1c Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 17 Sep 2014 20:28:30 +0200 Subject: Fixed wrong url in the debuggers plugin --- MCServer/Plugins/Debuggers/Debuggers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 0e7e647d5..66e06cb72 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -1502,7 +1502,7 @@ function OnPlayerJoined(a_Player) -- Test composite chat chaining: a_Player:SendMessage(cCompositeChat() :AddTextPart("Hello, ") - :AddUrlPart(a_Player:GetName(), "www.mc-server.org", "u@2") + :AddUrlPart(a_Player:GetName(), "http://www.mc-server.org", "u@2") :AddSuggestCommandPart(", and welcome.", "/help", "u") :AddRunCommandPart(" SetDay", "/time set 0") ) -- cgit v1.2.3 From 0baca1f1d8e5e8f97e7aa81e319e343949879622 Mon Sep 17 00:00:00 2001 From: Howaner Date: Fri, 19 Sep 2014 14:36:02 +0200 Subject: Updated SPAWNING_ENTITY hook description. --- MCServer/Plugins/APIDump/Hooks/OnSpawningEntity.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/APIDump/Hooks/OnSpawningEntity.lua b/MCServer/Plugins/APIDump/Hooks/OnSpawningEntity.lua index c4bff3916..e2bd1c940 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnSpawningEntity.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnSpawningEntity.lua @@ -6,8 +6,9 @@ return DefaultFnName = "OnSpawningEntity", -- also used as pagename Desc = [[ This hook is called before the server spawns an {{cEntity|entity}}. The plugin can either modify the - entity before it is spawned, or disable the spawning altogether. If the entity spawning is a - monster, the {{OnSpawningMonster|HOOK_SPAWNING_MONSTER}} hook is called before this hook.

+ entity before it is spawned, or disable the spawning altogether. You can't disable the spawning if the + entity is a player. If the entity spawning is a monster, the {{OnSpawningMonster|HOOK_SPAWNING_MONSTER}} + hook is called before this hook.

See also the {{OnSpawnedEntity|HOOK_SPAWNED_ENTITY}} hook for a similar hook called after the entity is spawned. -- cgit v1.2.3 From a817243e3fc0115da3fc499ae108b4cdc9dd0a4e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 26 Sep 2014 21:42:55 +0100 Subject: Updated Core --- MCServer/Plugins/Core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core index bd23915df..9de860603 160000 --- a/MCServer/Plugins/Core +++ b/MCServer/Plugins/Core @@ -1 +1 @@ -Subproject commit bd23915df763b182610c6163c5ff2d64a0756560 +Subproject commit 9de86060388b515642c55d58b44b4281285efc00 -- cgit v1.2.3