bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
EntityAPI() |
Modifier and Type | Method and Description |
---|---|
E |
closest(Area area,
int... ids)
Gets the closest entity with the specified entity ids contained in the specified area.
|
E |
closest(Area area,
java.lang.String... names)
Gets the closest entity with the specified entity names contained in the specified area.
|
E |
closest(boolean realDistance,
java.util.Collection<E> entities)
Gets the closest entity from a collection of entities.
|
E |
closest(boolean realDistance,
java.util.Collection<E> entities,
int distanceTolerance)
Gets the closest entity from a collection of entities.
|
E |
closest(boolean realDistance,
Filter<E>... filters)
Gets the closest generically specified
Entity by using either the Pythagoras algorithm or real distance. |
E |
closest(boolean realDistance,
int... ids)
Gets the closest generically specified
Entity that matches any of the given ids by using either
the Pythagoras algorithm or real distance. |
E |
closest(boolean realDistance,
java.lang.String... names)
Gets the closest generically specified
Entity that matches any of the given names by either using
the Pythagoras algorithm or real distance. |
E |
closest(java.util.Collection<E> entities)
Gets the closest entity from a collection of entities.
|
E |
closest(Filter<E>... filters)
Gets the closest generically specified
Entity by using the Pythagoras algorithm. |
E |
closest(int... ids)
Gets the closest generically specified
Entity that matches any of the given ids by using
the Pythagoras algorithm. |
E |
closest(java.lang.String... names)
Gets the closest generically specified
Entity that matches any of the given names by using
the Pythagoras algorithm. |
E |
closestThatContains(boolean realDistance,
java.lang.String... strings)
Gets the closest generically specified
Entity that contains any of the specified strings in its name
by using either the Pythagoras algorithm or real distance. |
E |
closestThatContains(java.lang.String... strings)
Gets the closest generically specified
Entity that contains any of the specified strings in its name
by using the Pythagoras algorithm. |
abstract java.util.List<E> |
get(int x,
int y)
Gets a list of entities on the specified x and y coordinates on the plane of your current player.
|
java.util.Iterator<E> |
iterator()
Returns the iterator to loop through the collection of entities.
|
filter, filter, singleFilter
getAll
initializeModule
exchangeContext, execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public java.util.Iterator<E> iterator()
public E closest(java.util.Collection<E> entities)
entities
- The collection of entities.public E closest(boolean realDistance, java.util.Collection<E> entities)
realDistance
- Whether to use real distance, which means the length of the actual path to
walk to the entity meaning when no path is found the entity will be ignored and can return null,
or the absolute distance.entities
- The collection of entities.public E closest(boolean realDistance, java.util.Collection<E> entities, int distanceTolerance)
realDistance
- Whether to use real distance, which means the length of the actual path to
walk to the entity meaning when no path is found the entity will be ignored and can return null,
or the absolute distance.entities
- The collection of entities.distanceTolerance
- The tolerance for distance. Allows the "closest" to be randomly chosen as long as it is
within this standard.public E closest(int... ids)
Entity
that matches any of the given ids by using
the Pythagoras algorithm.ids
- The ids to look for matches.Entity
that matches any of the given ids by using
the Pythagoras algorithm.public E closest(boolean realDistance, int... ids)
Entity
that matches any of the given ids by using either
the Pythagoras algorithm or real distance.realDistance
- Whether to use real distance, which means the length of the actual path to
walk to the entity meaning when no path is found the entity will be ignored and can return null,
or the absolute distance.ids
- The ids to look for matches.Entity
that matches any of the given ids by using either
the Pythagoras algorithm or real distance.public E closest(java.lang.String... names)
Entity
that matches any of the given names by using
the Pythagoras algorithm.names
- The names to look for matches.Entity
that matches any of the given names by using
the Pythagoras algorithm.public E closest(boolean realDistance, java.lang.String... names)
Entity
that matches any of the given names by either using
the Pythagoras algorithm or real distance.realDistance
- Whether to use real distance, which means the length of the actual path to
walk to the entity meaning when no path is found the entity will be ignored and can return null,
or the absolute distance.names
- The names to look for matches.Entity
that match any of the given names by either using
the Pythagoras algorithm or real distance.public E closestThatContains(java.lang.String... strings)
Entity
that contains any of the specified strings in its name
by using the Pythagoras algorithm.strings
- The strings to look for matches.Entity
that contains any of the specified strings in its name
by using the Pythagoras algorithm.public E closestThatContains(boolean realDistance, java.lang.String... strings)
Entity
that contains any of the specified strings in its name
by using either the Pythagoras algorithm or real distance.realDistance
- Whether to use real distance, which means the length of the actual path to
walk to the entity meaning when no path is found the entity will be ignored and can return null,
or the absolute distance.strings
- The strings to look for matches.Entity
that contains any of the specified strings in its name
by using either the Pythagoras algorithm or real distance.@SafeVarargs public final E closest(Filter<E>... filters)
Entity
by using the Pythagoras algorithm.filters
- The filters for items to look for.Entity
by using the Pythagoras algorithm.@SafeVarargs public final E closest(boolean realDistance, Filter<E>... filters)
Entity
by using either the Pythagoras algorithm or real distance.filters
- The filters for items to look for.realDistance
- Whether to use real distance, which means the length of the actual path to
walk to the entity meaning when no path is found the entity will be ignored and can return null,
or the absolute distance.Entity
by using the Pythagoras algorithm or real distance.public E closest(Area area, java.lang.String... names)
area
- The area to look for matches.names
- The names of entities to look for.public E closest(Area area, int... ids)
area
- The area to look for matches.ids
- The ids of entities to look for.public abstract java.util.List<E> get(int x, int y)
x
- The x coordinate.y
- The y coordinate.