Class Places

java.lang.Object
privbot.hooks.Places

public final class Places extends Object
Named-location registry: resolves a human place name ("Bank", "Edgeville bank", "Banker", an NPC/area name) to an anchor WorldPoint + arrival radius, drawing from the current server's movement config (banks + NPC anchors).

Single source of truth shared by Travel (navigate to a place) and the builder's AT_NAMED/IN_NAMED_AREA conditions. Resolution needs no live client; isAt(String) reads the player position via GameThread.ensure(java.util.function.Supplier<T>, T).

  • Method Details

    • resolve

      public Places.Place resolve(String name)
      Resolve a place name to an anchor + radius, or null if unknown. Order: "bank" keyword → nearest configured bank; exact bank name; NPC anchor.
    • bank

      public Places.Place bank()
      Nearest configured bank to the player (falls back to the first configured bank when offline).
    • isAt

      public boolean isAt(String name)
      True when the player is within the resolved place's radius.
    • names

      public List<String> names()
      All resolvable place names (banks + anchored NPCs) for the current server, plus the "Bank" keyword.
    • bankNames

      public List<String> bankNames()
      Names of this server's banks that resolve(java.lang.String) can reach (they have a dest tile), in config order.