From 0c10a447d9ae15170996cdc86ba9279d6534569f Mon Sep 17 00:00:00 2001 From: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Date: Sun, 11 Apr 2021 11:40:53 +1000 Subject: [PATCH] Restrict the radius to 20 If it is any larger, it would cause a server to crash. --- .../com/lishid/openinv/commands/SearchContainerCommand.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/src/main/java/com/lishid/openinv/commands/SearchContainerCommand.java b/plugin/src/main/java/com/lishid/openinv/commands/SearchContainerCommand.java index 7242ee9..616b5e7 100644 --- a/plugin/src/main/java/com/lishid/openinv/commands/SearchContainerCommand.java +++ b/plugin/src/main/java/com/lishid/openinv/commands/SearchContainerCommand.java @@ -71,6 +71,10 @@ public class SearchContainerCommand implements TabExecutor { return false; } } + + if (radius > 20) { + radius = 20; + } Player senderPlayer = (Player) sender; World world = senderPlayer.getWorld(); -- 2.49.1