Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Area[] banks = null;
  2. WebWalkEvent e = new WebWalkEvent(banks);
  3. PathPreferenceProfile ppf = new PathPreferenceProfile();
  4. ppf.setAllowTeleports(true);
  5. e.setPathPreferenceProfile(ppf);
  6. Position pos = e.getDestination();
  7. if (pos != null) {
  8. for (Area bank : banks) {
  9. if (bank.contains(pos)) {
  10. log("Closest bank: " + bank);
  11. }
  12. }
  13. } else {
  14. log("No bank can be reached");
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement