multiwand: fix crash on left clicking background

This commit is contained in:
Starbeamrainbowlabs 2022-09-18 16:21:36 +01:00
parent cf0be6c1fb
commit 0983e09f50
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2

@ -3,11 +3,11 @@ local wea = worldeditadditions
local Vector3 = wea.Vector3
local function push_pos(player_name, pos)
pos = Vector3.clone(pos)
if player_name == nil then return end
if pos == nil then
worldedit.player_notify(player_name, "[multi wand] Error: Too far away (try raising your maxdist with //farwand maxdist <number>)")
else
pos = Vector3.clone(pos)
wea_c.pos.push(player_name, pos)
worldedit.player_notify(player_name, "[multi wand] Added "..pos..". "..wea_c.pos.count(player_name).." points now registered.")
end