Jump to content

Following players?


Nazz

Recommended Posts

	public List<Player> getPlayer(Area area)	{
		List<Player> list = new ArrayList<Player>();
		
		for(Player p: client.getLocalPlayers()){
			if (p!=null){
				if (area.contains(p)){
					if (!p.getName().contains(client.getMyPlayer().getName()))
						list.add(p);
				}
			}
		}
		return list;
	}

im not going to spoon feed you everything. But this method return a list of players that are within the area, not counting you of course. 

 

Now what you could do is, whoever you want to follow someone. You could  loop through the new method, until you find the person you want, maybe by name, or however you want. Then you could use the MethodProvider#selectEntityOption method.

Edited by josedpay
Link to comment
Share on other sites

	public List<Player> getPlayer(Area area)	{
		List<Player> list = new ArrayList<Player>();
		
		for(Player p: client.getLocalPlayers()){
			if (p!=null){
				if (area.contains(p)){
					if (!p.getName().contains(client.getMyPlayer().getName()))
						list.add(p);
				}
			}
		}
		return list;
	}

im not going to spoon feed you everything. But this method return a list of players that are within the area, not counting you of course. 

 

Now what you could do is, whoever you want to follow someone. You could  loop through the new method, until you find the person you want, maybe by name, or however you want. Then you could use the MethodProvider#selectEntityOption method.

 

 

Thanks man! just what i was looking for :)

 

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...