1
0
Fork 0

implement suggestions by cora (https://is.gd/jJRf3y)

This commit is contained in:
chmodsayshello 2022-10-31 21:40:38 +00:00
parent c1af4935a1
commit c572c27326
1 changed files with 6 additions and 6 deletions

View File

@ -20,6 +20,11 @@ minetest.register_chatcommand("awards", {
params = S("[c|clear|disable|enable]"),
description = S("Show, clear, disable or enable your advancements."),
func = function(name, param)
if param == "enable" then
awards.enable(name)
minetest.chat_send_player(name, S("You have enabled your advancements."))
end
if awards.player(name).disabled then
minetest.chat_send_player(name, S("Awards are disabled, enable them first by using /awards enable!"))
return
@ -32,13 +37,8 @@ minetest.register_chatcommand("awards", {
elseif param == "disable" then
awards.disable(name)
minetest.chat_send_player(name, S("You have disabled your advancements."))
elseif param == "enable" then
awards.enable(name)
minetest.chat_send_player(name, S("You have enabled your advancements."))
elseif param == "c" then
else param == "c" then
awards.show_to(name, name, nil, true)
else
awards.show_to(name, name, nil, false)
end
end
})