11-01-2015, 12:24 AM
I'm not sure what you mean with the CommandOutput parameter. Could you elaborate? If I understand it correctly you plan to use it to send a message to the player/console/command block when Terminate is called? Can I add information when, by your example, the chunk is loaded? How would that work? Would it look a little like this?:
It does make sense to have all type of command handlers return the message to be send. I'm all for it
function HandleCertainCommand(a_Split, a_Player, a_EntireCmd, a_CommandOutput) local function OnChunkLoaded(a_ChunkX, a_ChunkZ) a_CommandOutput:AddToMsg(a_ChunkX .. " " .. a_ChunkZ .. "was loaded") a_CommandOutput:Terminate() end -- Load the chunk the player is standing in return false, "Chunk " end
It does make sense to have all type of command handlers return the message to be send. I'm all for it