From f4bb8eb29bd8742f08687d17f0575fefec066693 Mon Sep 17 00:00:00 2001 From: fluxionary <25628292+fluxionary@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:25:23 -0800 Subject: [PATCH] Include the endpoint position in the area size check (#70) --- 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