![](https://osbot.org/forum/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://osbot.org/forum/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
torquish
-
Posts
6 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by torquish
-
-
I am trying to get a Player's object from the specified name. What I have currently only works when the name doesn't contain a space. What am I doing wrong?
private Player getPlayerObjectFromName(String name) { List<Player> players = getPlayers().filter(player -> player != null && player.getName().equalsIgnoreCase(name)); if (players != null) { for (Player p : players) { if (p.getName().equalsIgnoreCase(name)) { return p; } } } return null; }
Edit: So I figured out the issue. Player objects use (char) 160 as a space which is why I was never getting a match when testing a name with (char) 32 as its space.
-
Have you read the numerous tutorials yet?
-
4 hours ago, FrostBug said:
Why? The point you click isn't sent to the server
Are you assuming it isn't or do you have proof of that? If points aren't used in bot analysis, then what is? Surely it's more than just timing between actions.
-
1 hour ago, Alek said:
Please describe to me what a human-like point is.
A human clicks in a more generalized area of an object as opposed to every object's points being equally selected.
-
How does .interact() determine which point to click within the entity/widget/w.e.? Does it choose a random point or is it using an algorithm that selects a more human-like point within the area?
getPlayerObjectFromName
in Scripting Help
Posted
Yes it works. Thanks.