Browse Source

Corrige la commande /awards.

Corrige l'affige des awards d'un joueur donné.
Empêche le retour de l'inventaire sfinv quand on active ou desactive
les awards d'un joueur.
master
sys4 1 year ago
parent
commit
4f5260da5f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/chat_commands.lua
  2. +1
    -1
      src/gui.lua

+ 1
- 1
src/chat_commands.lua View File

@@ -33,7 +33,7 @@ minetest.register_chatcommand("awards", {
awards.show_to(action, name, nil, true)
end

if (action == "disable" or action == "enable") and minetest.global_exists("sfinv") then
if (action == "disable" or action == "enable") and minetest.global_exists("sfinv") and not minetest.get_modpath("unified_inventory") then
local player = minetest.get_player_by_name(playern)
if player then
sfinv.set_player_inventory_formspec(player)


+ 1
- 1
src/gui.lua View File

@@ -168,7 +168,7 @@ function awards.show_to(name, to, sid, text)
if name == "" or name == nil then
name = to
end
local data = awards.player(to)
local data = awards.player(name)
if name == to and data.disabled then
minetest.chat_send_player(name, S("You've disabled awards. Type /awards enable to reenable."))
return


Loading…
Cancel
Save