May 24, 201510 yr Player p = getPlayers().closest(playerName); // .. p.interact("Attack"); make sure to add the necessary checks, I'm only showing the core process. It's the same as any other <code>Entity</code>
May 24, 201510 yr Author Player p = getPlayers().closest(playerName); // .. p.interact("Attack"); make sure to add the necessary checks, I'm only showing the core process. It's the same as any other <code>Entity</code> Any way to get the closest player without looking at name?
May 24, 201510 yr Any way to get the closest player without looking at name? Get all players and check if the list is null and the size is > 0. That means there is at least 1 player in the list.
May 24, 201510 yr Any way to get the closest player without looking at name? Player closestPlayer = getPlayers().closest((Filter<Player>) (Player v) -> { return true; });
Create an account or sign in to comment