Add xp command for debug and server admins

This commit is contained in:
oilboi 2020-05-10 00:31:33 -04:00
parent 34e17cae6c
commit 0cf9e712d3

View File

@ -94,7 +94,20 @@ minetest.register_node("enchanting:table", {
clicker:set_wielded_item(stack)
end,clicker)
end
})
})
minetest.register_chatcommand("xp", {
params = "nil",
description = "Spawn x amount of a mob, used as /spawn 'mob' 10 or /spawn 'mob' for one",
privs = {server = true},
func = function(name)
local player = minetest.get_player_by_name(name)
local pos = player:get_pos()
minetest.throw_experience(pos, math.random(200,300))
end,
})
minetest.register_craft({