Restrict the radius to 20

If it is any larger, it would cause a server to crash.
This commit is contained in:
Nathan Curran
2021-04-11 11:40:53 +10:00
committed by GitHub
parent 6563b4f6ce
commit 0c10a447d9

View File

@@ -72,6 +72,10 @@ public class SearchContainerCommand implements TabExecutor {
}
}
if (radius > 20) {
radius = 20;
}
Player senderPlayer = (Player) sender;
World world = senderPlayer.getWorld();
Chunk centerChunk = senderPlayer.getLocation().getChunk();