From 7a99a41b8b55880791b03fd495dd0903c0445bf3 Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Sun, 4 Feb 2024 11:33:24 -0800 Subject: [PATCH] include both endpoints when checking if the bounds of an area exceed the maximum --- internal.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal.lua b/internal.lua index 18f426a..65cfbe6 100644 --- a/internal.lua +++ b/internal.lua @@ -229,9 +229,9 @@ function areas:canPlayerAddArea(pos1, pos2, name) self.config.self_protection_max_size_high or self.config.self_protection_max_size if - (pos2.x - pos1.x) > max_size.x or - (pos2.y - pos1.y) > max_size.y or - (pos2.z - pos1.z) > max_size.z then + (pos2.x - pos1.x + 1) > max_size.x or + (pos2.y - pos1.y + 1) > max_size.y or + (pos2.z - pos1.z + 1) > max_size.z then return false, S("Area is too big.") end