Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public int npcsInArea(int area) {
  2. int count = 0;
  3. for (int i = 0; i < Server.npcHandler.npcs.length; i++) {
  4. if (Server.npcHandler.npcs[i] != null) {
  5. boolean inArea = false;
  6. switch (area) {
  7. case 0:
  8. inArea = Server.npcHandler.npcs[i].AREA_BOOLEAN();
  9. break;
  10. case 1:
  11. inArea = Server.npcHandler.npcs[i].AREA_BOOLEAN2();
  12. break;
  13. }
  14. if (inArea) {
  15. count++;
  16. }
  17. }
  18. }
  19. return count;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement