From 50249987378c8715aa2b9ff9be4f4c1be7b227c5 Mon Sep 17 00:00:00 2001 From: cheapie Date: Wed, 2 Oct 2024 11:46:12 -0500 Subject: Add initial content --- init.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 init.lua (limited to 'init.lua') diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..844e4e6 --- /dev/null +++ b/init.lua @@ -0,0 +1,15 @@ +local old_after_place = minetest.registered_nodes["mesecons_commandblock:commandblock_off"].after_place_node + +minetest.override_item("mesecons_commandblock:commandblock_off",{ + after_place_node = function(pos,player,...) + if minetest.check_player_privs(player,"spill") then + return old_after_place(pos,player,...) + else + if not player.is_fake_player then + minetest.chat_send_player(player:get_player_name(),"You need the 'spill' privilege to use this.") + end + minetest.remove_node(pos) + return true + end + end, +}) -- cgit v1.2.3