I am trying to create a /wild plugin that allows users to select a biome as well as a teleport range and they will only be teleported to a location that is in the that biome and is somewhere in the selected range. The name problem with this is obviously finding the location so to attempt and make the plugin more efficient I have decided to add a option in config to use previous location x% of the time. My problem however is with storing and retrieving the previous locations efficiently. My initial idea was to use a key system where a list of locations would be stored in a hashmap (lists would have a max size of 10 to prevent excessive memory usage) and each list would corrospond to a String that is a combination of the target world, target biome and the selected max and min ranges. My problem with this is that it is insanely inefficient as if I required a teleportation to any biome in the overworld with a range of 7500-10000 it would ignore a location that was a teleportation to a forest 7500-10000 blocks away. Similarly if I wanted to teleport a player 1000-10000 blocks away my current system would ignore 1000-5000, 5000-7500 and 7500-10000 locations which still all fit the required range. So my question is can anybody think of a better method to do this? Or does anyone have a more efficient of getting a random location that fits a set of requirements other than using a repeating task and the math.random to get the co-ordinates.