Minetest-WorldEditAdditions/worldeditadditions_commands/commands/test/tests/notify.test.lua

13 lines
482 B
Lua
Raw Normal View History

2024-10-13 20:54:02 +00:00
local Notify = worldeditadditions_core.notify
2024-10-16 00:32:14 +00:00
worldeditadditions.normalize_test("notify", {
2024-10-13 20:54:02 +00:00
params = "<message>",
description = "Sends message to player in all main notification formats (error, warn, ok, info).",
func = function(name, params_table)
local message = table.concat(params_table, " ")
Notify.error(name, message)
Notify.warn(name, message)
Notify.ok(name, message)
Notify.info(name, message)
2024-10-13 21:23:34 +00:00
Notify.custom(name, "@" .. name, "Good Job", "#FF00D7")
2024-10-13 20:54:02 +00:00
end
})