Advertisement
jacklin213

Untitled

Apr 19th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. List<Resident> residents = TownyUniverse.getDataSource().getResidents();
  2. List<Resident> noTown = new ArrayList<Resident>();
  3. for (Resident resident : residents) {
  4. if (!resident.hasTown()) {
  5. noTown.add(resident);
  6. }
  7. }
  8. if (!noTown.contains(player)){
  9. player.sendMessage(chatPluginPrefix + "You cannot use this command because you are already in a town!");
  10. return true;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement