mlrkey Posted May 24, 2015 Posted May 24, 2015 (edited) how is this done again? thanks guys Edited May 24, 2015 by mlrkey
Czar Posted May 24, 2015 Posted May 24, 2015 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>
mlrkey Posted May 24, 2015 Author Posted May 24, 2015 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?
Mysteryy Posted May 24, 2015 Posted May 24, 2015 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.
FrostBug Posted May 24, 2015 Posted May 24, 2015 Any way to get the closest player without looking at name? Player closestPlayer = getPlayers().closest((Filter<Player>) (Player v) -> { return true; });