Update init.lua

This commit is contained in:
TalkLounge 2019-06-15 17:04:06 +02:00 committed by GitHub
parent b2e086f9ec
commit ec68d6cbd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1165,7 +1165,11 @@ minetest.register_chatcommand("/allocate", {
worldedit.player_notify(name, "File was created with newer version of WorldEdit!")
end
local nodepos1, nodepos2, count = worldedit.allocate(pos, value)
if not nodepos1 or not nodepos2 or not count then
worldedit.player_notify(name, "0 nodes allocated")
return
end
worldedit.pos1[name] = nodepos1
worldedit.mark_pos1(name)
worldedit.pos2[name] = nodepos2