Package net.eternalclient.api.utilities
Class ClientInstances
- java.lang.Object
-
- net.eternalclient.api.utilities.ClientInstances
-
public class ClientInstances extends java.lang.Object
Utility class for finding and managing client instances.
-
-
Constructor Summary
Constructors Constructor Description ClientInstances()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<ClientInstance>
find(java.util.function.Predicate<ClientInstance> predicate)
Returns a list of all client instances that satisfy the given predicate.static java.util.List<World>
findFreeWorlds(java.util.function.Predicate<World> worldPredicate, int maxPerWorld, int radius, java.lang.String... scripts)
Finds free worlds based on the given predicate, maximum number per world, radius, and scripts.static java.util.List<World>
findFreeWorlds(java.util.function.Predicate<World> worldPredicate, int maxPerWorld, Positionable positionable, int radius, java.lang.String... scripts)
Finds free worlds based on the given predicate, maximum number per world, radius, and scripts.static void
sendMessage(java.lang.String message)
Sends a message that will be broadcasted to all of your client instances (including the sending instance)
-
-
-
Method Detail
-
sendMessage
public static void sendMessage(java.lang.String message)
Sends a message that will be broadcasted to all of your client instances (including the sending instance)- Parameters:
message
-
-
find
public static java.util.List<ClientInstance> find(java.util.function.Predicate<ClientInstance> predicate)
Returns a list of all client instances that satisfy the given predicate.- Parameters:
predicate
- the predicate used to filter the client instances- Returns:
- a list of client instances that satisfy the predicate
-
findFreeWorlds
public static java.util.List<World> findFreeWorlds(java.util.function.Predicate<World> worldPredicate, int maxPerWorld, int radius, java.lang.String... scripts)
Finds free worlds based on the given predicate, maximum number per world, radius, and scripts.- Parameters:
worldPredicate
- the predicate used to filter the worldsmaxPerWorld
- the maximum number of worlds to return per worldradius
- the search radius for the worldsscripts
- the scripts to search for in the worlds- Returns:
- a list of free worlds that match the given criteria
-
findFreeWorlds
public static java.util.List<World> findFreeWorlds(java.util.function.Predicate<World> worldPredicate, int maxPerWorld, Positionable positionable, int radius, java.lang.String... scripts)
Finds free worlds based on the given predicate, maximum number per world, radius, and scripts.- Parameters:
worldPredicate
- the predicate used to filter the worldsmaxPerWorld
- the maximum number of worlds to return per worldradius
- the search radius for the worldsscripts
- the scripts to search for in the worlds- Returns:
- a list of free worlds that match the given criteria
-
-