Class Players
- java.lang.Object
-
- org.dreambot.api.methods.interactive.Interactables<Player>
-
- org.dreambot.api.methods.interactive.Players
-
public class Players extends Interactables<Player>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NonNull java.util.List<@NonNull Player>
all()
static @NonNull java.util.List<@NonNull Player>
all(@NonNull java.lang.Integer... ids)
static @NonNull java.util.List<@NonNull Player>
all(@NonNull java.lang.String... names)
static @NonNull java.util.List<@NonNull Player>
all(@NonNull Filter<Player> filter)
static @Nullable Player
closest(@NonNull java.lang.Integer... ids)
static @Nullable Player
closest(@NonNull java.lang.String... names)
static @Nullable Player
closest(@NonNull Filter<Player> filter)
static @Nullable Player
closest(@NonNull Filter<Player> filter, @NonNull Tile toTile)
static @Nullable Player @NonNull []
getArray()
Gets all playersstatic @Nullable Player
getAtIndex(int index)
Gets a player at a specific indexstatic @Nullable PlayerComposite
getComposite(@NonNull Player player, @NonNull java.lang.Object playerComposite)
static @NonNull Player
getLocal()
Gets your playerstatic @Nullable ModelWrapper
getModel(@NonNull Player player)
static boolean
referenceExists(int index)
Checks to see if the player reference exists at this index
-
-
-
Method Detail
-
all
public static @NonNull java.util.List<@NonNull Player> all()
-
getLocal
public static @NonNull Player getLocal()
Gets your player- Returns:
Player
as your current logged in player. Note that this can return null only if it's called before the client is started. To avoid (mostly) spurious IDE warnings, it's marked @NonNull.
-
all
public static @NonNull java.util.List<@NonNull Player> all(@NonNull java.lang.Integer... ids)
-
all
public static @NonNull java.util.List<@NonNull Player> all(@NonNull java.lang.String... names)
-
closest
public static @Nullable Player closest(@NonNull java.lang.String... names)
-
closest
public static @Nullable Player closest(@NonNull java.lang.Integer... ids)
-
closest
public static @Nullable Player closest(@NonNull Filter<Player> filter, @NonNull Tile toTile)
-
getArray
public static @Nullable Player @NonNull [] getArray()
Gets all players- Returns:
- All cached players
-
referenceExists
public static boolean referenceExists(int index)
Checks to see if the player reference exists at this index- Parameters:
index
-- Returns:
- true if not null else false
-
getAtIndex
public static @Nullable Player getAtIndex(int index)
Gets a player at a specific index- Parameters:
index
-- Returns:
- null if player reference not found, otherwise player for given index
-
getComposite
public static @Nullable PlayerComposite getComposite(@NonNull Player player, @NonNull java.lang.Object playerComposite)
-
getModel
public static @Nullable ModelWrapper getModel(@NonNull Player player)
-
-