mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2024-12-22 22:22:25 +01:00
/money command
This commit is contained in:
parent
a4fa4c21ef
commit
94014e9173
13
commands.lua
13
commands.lua
@ -41,6 +41,19 @@ core.register_chatcommand("pay", {
|
||||
end
|
||||
})
|
||||
|
||||
-- user /money chat command
|
||||
core.register_chatcommand("money", {
|
||||
description = S("Return your emeralds in your bank account."),
|
||||
func = function(name, param)
|
||||
local emeralds = emeraldbank.get_emeralds(name)
|
||||
if emeralds then
|
||||
minetest.chat_send_player(name, S("Emeralds in Bank: @1", emeralds))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
})
|
||||
|
||||
-- admin chat command
|
||||
core.register_chatcommand("emeralds", {
|
||||
params = "<player> <num>",
|
||||
|
Loading…
Reference in New Issue
Block a user