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 Deprecated 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 Playerclosest(@NonNull java.lang.Integer... ids)static @Nullable Playerclosest(@NonNull java.lang.String... names)static @Nullable Playerclosest(@NonNull Filter<Player> filter)static @Nullable Playerclosest(@NonNull Filter<Player> filter, @NonNull Tile toTile)static @Nullable Player @NonNull []getArray()Gets all playersstatic @Nullable PlayergetAtIndex(int index)Gets a player at a specific indexstatic @Nullable PlayerCompositegetComposite(@NonNull Player player, @NonNull java.lang.Object playerComposite)Deprecated.just use methods fromPlayerstatic @NonNull PlayergetLocal()Gets your playerstatic @Nullable ModelWrappergetModel(@NonNull Player player)Deprecated.usedEntity.getModel()and switch away from ModelWrapper usagestatic booleanreferenceExists(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:
Playeras 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
@Deprecated public static @Nullable PlayerComposite getComposite(@NonNull Player player, @NonNull java.lang.Object playerComposite)
Deprecated.just use methods fromPlayer- Parameters:
player-playerComposite-- Returns:
-
getModel
@Deprecated public static @Nullable ModelWrapper getModel(@NonNull Player player)
Deprecated.usedEntity.getModel()and switch away from ModelWrapper usage- Parameters:
player-- Returns:
-
-