From ccd40285f08c7a15ae23265c1965745bd925fb85 Mon Sep 17 00:00:00 2001 From: Anand S <36130650+ClobberXD@users.noreply.github.com> Date: Fri, 6 Apr 2018 15:50:35 +0530 Subject: [PATCH] Used colored chat messages in various mods --- mods/afkkick/init.lua | 2 +- mods/email/init.lua | 2 +- mods/report/init.lua | 2 +- mods/respawn_immunity/init.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/afkkick/init.lua b/mods/afkkick/init.lua index 65e2dbf..57ddec8 100644 --- a/mods/afkkick/init.lua +++ b/mods/afkkick/init.lua @@ -51,7 +51,7 @@ minetest.register_globalstep(function(dtime) --Warn player if he/she has less than WARN_TIME seconds to move or be kicked if players[playerName]["lastAction"] + MAX_INACTIVE_TIME - WARN_TIME < currGameTime then - minetest.chat_send_player(playerName, "Warning, you have " .. tostring(players[playerName]["lastAction"] + MAX_INACTIVE_TIME - currGameTime) .. " seconds to move or be kicked") + minetest.chat_send_player(playerName, minetest.colorize(#FF8C00,"Warning, you have " .. tostring(players[playerName]["lastAction"] + MAX_INACTIVE_TIME - currGameTime) .. " seconds to move or be kicked")) end end diff --git a/mods/email/init.lua b/mods/email/init.lua index 34344c5..75df617 100644 --- a/mods/email/init.lua +++ b/mods/email/init.lua @@ -70,7 +70,7 @@ minetest.register_on_joinplayer(function(player) if #inbox > 0 then minetest.after(10, function() minetest.chat_send_player(player:get_player_name(), - "(" .. #inbox .. ") You have mail! Type /inbox to recieve") + minetest.colorize(#00FF00,"(" .. #inbox .. ") You have mail! Type /inbox to recieve")) end) end end) diff --git a/mods/report/init.lua b/mods/report/init.lua index 9e1e794..9824c60 100644 --- a/mods/report/init.lua +++ b/mods/report/init.lua @@ -64,7 +64,7 @@ minetest.register_chatcommand("report", { local toname = player:get_player_name() if minetest.check_player_privs(toname, {kick = true, ban = true}) then table.insert(mods, toname) - minetest.chat_send_player(toname, "-!- " .. name .. " reported: " .. param) + minetest.chat_send_player(toname, minetest.colorize(#FFFF00,"-!- " .. name .. " reported: " .. param)) end end diff --git a/mods/respawn_immunity/init.lua b/mods/respawn_immunity/init.lua index 0dae12f..b6480e1 100644 --- a/mods/respawn_immunity/init.lua +++ b/mods/respawn_immunity/init.lua @@ -45,7 +45,7 @@ minetest.register_on_punchplayer(function(player, hitter, if hitter and respawn_immunity.is_immune(hitter) then minetest.chat_send_player(hitter:get_player_name(), - "Your immunity has ended because you attacked a player") + minetest.colorize(#FF8C00,"Your immunity has ended because you attacked a player")) immune_players[hitter:get_player_name()] = nil respawn_immunity.update_effects(hitter) end