aboutsummaryrefslogtreecommitdiff
path: root/src/onload/villager_protection.lua
blob: 3e0a5f75f1e0ba50f7462b2192485275f20f92df (plain)
1
2
3
4
5
6
7
minetest.registered_entities["mobs_mc:villager"].on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
	if puncher:get_wielded_item():get_name() ~= "skycraft:god_stick" then 
		minetest.chat_send_player(puncher:get_player_name(), minetest.colorize("#FF6737", "Hey! Sorry, you can't hit that here!"))
	else
		self.object:remove()
	end
end