Skip to content

Commit

Permalink
Update init.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT authored Jul 25, 2024
1 parent 405d7cc commit f80451a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playtime/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ minetest.register_chatcommand("playtime", {
description = S("See your total playtime on this server"),
func = function(name, player_name)
if player_name == "" then
player_name = name or "singleplayer"
end
player_name = name
end

if minetest.get_player_by_name(player_name) then
return true,
C("#63d437", "Total: ")..C("#ffea00", format_duration(playtime.get_total_playtime(player_name))).."\n"..
Expand Down

0 comments on commit f80451a

Please sign in to comment.