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