Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Horse getHorseDistance(Player p) {
- double distance = Double.MAX_VALUE;
- Horse h = null;
- for (Entity entity : p.getNearbyEntities(100, 100, 100)) {
- if (entity instanceof Horse) {
- double dis = p.getLocation().distance(entity.getLocation());
- if (dis < distance) {
- distance = dis;
- h = (Horse) entity;
- }
- }
- }
- return h;
- }
- //Narchicht
- CrachtHorse{cariant=HORSE,owner=CraftPlayer{name=Anzy02}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement