Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<Resident> residents = TownyUniverse.getDataSource().getResidents();
- List<Resident> noTown = new ArrayList<Resident>();
- for (Resident resident : residents) {
- if (!resident.hasTown()) {
- noTown.add(resident);
- }
- }
- if (!noTown.contains(player)){
- player.sendMessage(chatPluginPrefix + "You cannot use this command because you are already in a town!");
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement