title instead chat (part 2)

This commit is contained in:
Freeman 2023-01-04 21:36:26 +01:00
parent 5fe12e55ab
commit 3070c3f0ca
2 changed files with 3 additions and 3 deletions

@ -53,10 +53,10 @@ core.register_chatcommand("pay", {
pitch = 1.0,
})
else
core.chat_send_player(name, S("Not enough Emeralds in your account") )
mcl_title.set(player1, "subtitle", {text=S("Not enough Emeralds in your account"), color="dark_red"})
end
else
core.chat_send_player(name, S("Invalid pay") )
mcl_title.set(player1, "subtitle", {text=S("Invalid pay"), color="dark_red"})
end
return true
end

@ -34,7 +34,7 @@ core.register_globalstep(function(dtime)
for _, player in ipairs(core.get_connected_players()) do
if not player or player.is_fake_player then return end
local name = player:get_player_name()
core.chat_send_player(name, S("You have earned @1 emeralds in your bank account!", income_count) )
mcl_title.set(player, "subtitle", {text=S("You have earned @1 emeralds in your bank account!", income_count), color="green"})
emeraldbank.add_emeralds(player, income_count)
end
end