Class User.Overhead

java.lang.Object
privbot.hooks.User.Overhead
Enclosing class:
User

public static final class User.Overhead extends Object
One read of the local overhead: isReadable() false means nothing can be said about the prayer the server shows — never treat it as "no overhead".
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final User.Overhead
    The read failed, or the profile cannot name the id that is drawn.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.runelite.api.HeadIcon
    The icon drawn, or null when nothing is drawn or what is drawn blocks none of melee/ranged/magic (Elorin's Deflect Summoning, a blank sprite).
    boolean
    Readable, and no HeadIcon is drawn.
    boolean
     
    The capture-row form: the HeadIcon name, "NONE", or null when unreadable.
    int
    The server's own icon id on Impact, Elorin and SpawnPK (255 or -1 = nothing drawn); the icon's ordinal or -1 on RuneLite-API servers; Integer.MIN_VALUE when unreadable.
    shows(String prayerName)
    Whether the drawn overhead is the overhead of the prayer with this in-game name ("Protect from Magic", "Deflect Melee", "Soul Split"): a combined icon (Missiles + Magic) shows each part, and a curse shows its own icon.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • UNREADABLE

      public static final User.Overhead UNREADABLE
      The read failed, or the profile cannot name the id that is drawn.
  • Method Details

    • isReadable

      public boolean isReadable()
      Returns:
      whether anything can be said about the overhead (false: never treat as "no overhead")
    • icon

      public net.runelite.api.HeadIcon icon()
      The icon drawn, or null when nothing is drawn or what is drawn blocks none of melee/ranged/magic (Elorin's Deflect Summoning, a blank sprite). Also null when unreadable: check isReadable() first.
    • isNone

      public boolean isNone()
      Readable, and no HeadIcon is drawn.
    • rawId

      public int rawId()
      The server's own icon id on Impact, Elorin and SpawnPK (255 or -1 = nothing drawn); the icon's ordinal or -1 on RuneLite-API servers; Integer.MIN_VALUE when unreadable.
    • label

      public String label()
      The capture-row form: the HeadIcon name, "NONE", or null when unreadable.
    • shows

      public Boolean shows(String prayerName)
      Whether the drawn overhead is the overhead of the prayer with this in-game name ("Protect from Magic", "Deflect Melee", "Soul Split"): a combined icon (Missiles + Magic) shows each part, and a curse shows its own icon. Confirm a protection prayer with this rather than ctx.prayer.isActive(name), which reads false when it cannot read.
      Parameters:
      prayerName - the prayer's in-game name
      Returns:
      true or false; null when the overhead is unreadable, the name is unknown, or the prayer draws no overhead (Piety, Protect Item, ...)
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the label and raw id, or UNREADABLE