Class PvpQuery
java.lang.Object
privbot.mechanics.PvpQuery
What a
ctx.pvp.snapshot(..) call should include. Immutable: every method returns a new query.
within(int): only players this many tiles (square distance) from the local player, on its plane, are kept. Default 15.named(String...): only players with one of these names (case and tags ignored). Default: every player in range.includeLocal(boolean): whether the local player is also listed inPvpSnapshot.opponents(). Default false;PvpSnapshot.local()is always there.
Pure data: no client calls, safe on any thread.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe radius used whenwithin(int)is not called. -
Method Summary
-
Field Details
-
DEFAULT_RADIUS
-
-
Method Details
-
all
-
within
- Parameters:
tiles- the largest distance in tiles (a negative value is treated as 0)- Returns:
- a copy with that radius
-
named
-
includeLocal
- Parameters:
include- whether the local player is also listed among the opponents- Returns:
- a copy with that setting
-
radius
public int radius()- Returns:
- the radius in tiles
-
names
-
includesLocal
public boolean includesLocal()- Returns:
- whether the local player is listed among the opponents
-
keeps
- Parameters:
name- a player name- Returns:
- whether the name filter keeps it; a null name is kept only when there is no filter
-