bonemeal: use wea.parse.chance

This commit is contained in:
Starbeamrainbowlabs 2021-05-11 22:20:29 +01:00
parent f9eb67b4cc
commit ea05d5f559
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2

@ -27,7 +27,7 @@ worldedit.register_command("bonemeal", {
end
end
if #parts >= 2 then
chance = tonumber(parts[2])
chance = worldeditadditions.parse.chance(parts[2])
if not chance then
return false, "Invalid chance value (must be a positive integer)"
end