From 9ddc3635d6a04ff4b78611df00c905cc86e166ae Mon Sep 17 00:00:00 2001 From: Feyo Korenhof <35343640+feyokorenhof@users.noreply.github.com> Date: Wed, 26 May 2021 18:07:32 +0200 Subject: Implemented cServer::ScheduleTask() and cServer::TickQueuedTasks() (#5224) --- Server/Plugins/APIDump/APIDesc.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Server') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index ef3bc5ea0..af6049fba 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -12307,6 +12307,21 @@ end }, Notes = "Add a Forge mod name/version to the server ping list.", }, + ScheduleTask = + { + Params = + { + { + Name = "DelayTicks", + Type = "number", + }, + { + Name = "TaskFunction", + Type = "function", + }, + }, + Notes = "Queues the specified function to be executed in the server's tick thread after a the specified number of ticks. This enables operations to be queued for execution in the future. The function signature is
function({{cServer|Server}})
All return values from the function are ignored. Note that it is unsafe to store references to Cuberite objects, such as entities, across from the caller to the task handler function; store the EntityID instead.", + }, SetMaxPlayers = { Params = -- cgit v1.2.3