There’s this, but I need to check for if a player is between loc1 and loc2, not getting the distance between loc1 and loc2, and all the Sponge docs have to say about distance is fall distance. Any method I could use?
Would mean manually setting location 1 to a location in the coding, manually setting location 2 to a location in the coding, then checking to see if the player is between those two locations. (Basically, making an invisible box and checking to see if the player is in the “box”).
Thanks in advance!
UPDATE:
Never mind. I have a pretty good feeling I can accomplish the same thing by doing this:
public void onMove(MoveEntityEvent event, @Root Player player) {
CommandManager cmdManager = Sponge.getCommandManager();
Location<World> loc1 = player.getLocation();
Random rand = new Random();
int value = rand.nextInt(3) + 1;
Random shiny = new Random();
int shinyPoke = shiny.nextInt(8192) + 1;
// Route 1
if (loc1.getBlockX() > -1253) {
if (loc1.getBlockX() < -1289) {
if (loc1.getBlockZ() > -1639) {
if (loc1.getBlockZ() < -1711) {