1
0
Fork 0

Privs for colorizing command and comment cleanup

This commit is contained in:
the-real-herowl 2024-02-02 04:05:28 +01:00
parent fc6fe3f1ed
commit 03b8ad15e3
1 changed files with 1 additions and 2 deletions

View File

@ -20,8 +20,6 @@ local colors = {
{ "white", "White", "mcl_dye:white", "#d1d7d8" }, { "white", "White", "mcl_dye:white", "#d1d7d8" },
} }
-- #608b03 from #495d20
local function color_string_to_table(colorstring) local function color_string_to_table(colorstring)
return { return {
r = tonumber(colorstring:sub(2,3), 16), -- 16 as second parameter allows hexadecimal r = tonumber(colorstring:sub(2,3), 16), -- 16 as second parameter allows hexadecimal
@ -186,6 +184,7 @@ minetest.register_on_craft(colorizing_crafting)
minetest.register_chatcommand("color_leather", { minetest.register_chatcommand("color_leather", {
params = "<color>", params = "<color>",
description = "Colorize a piece of leather armor, or wash it", description = "Colorize a piece of leather armor, or wash it",
privs = {debug = true},
func = function(name, param) func = function(name, param)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)
if player then if player then