Jump to content

Detecting other players based on names


investmentideas
 Share

Recommended Posts

Hi,

I am trying to code this bot to attack a player if it comes within a radius of 5 tiles and the player is not one of the following names ("User1", "User2"). I have this below code but not sure where to go. any advice on how I can check based on player usernames?

players.getAll().stream().anyMatch(f -> myPlayer().getArea(5).contains(f));
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

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