Class MumbleLink.Context

java.lang.Object
com.gw2tb.gw2ml.MumbleLink.Context
Enclosing class:
MumbleLink

public final class MumbleLink.Context extends Object
Since:
0.1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The number of bytes that are used to store the context in the underlying data.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copy(byte[] dest)
    Shorthand for copy(0, dest, 0, BYTES).
    void
    copy(int srcOffset, byte[] dest, int destOffset, int length)
    Copies the underlying data beginning at the specified offset, to the specified offset of the destination array.
    void
    copy(int srcOffset, MemorySegment dest, int destOffset, int length)
    Copies the underlying data beginning at the specified offset, to the specified offset of the destination segment.
    void
    copy(int srcOffset, ByteBuffer dest, int destOffset, int length)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method is deprecated in favor of copy(int, MemorySegment, int, int).
    void
    Shorthand for copy(0, dest, 0, BYTES).
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method is deprecated in favor of copy(MemorySegment).
    long
    Returns the ID of the game build that is currently running (as per Guild Wars 2 API).
    int
    Returns the height of the compass in pixels.
    float
    Returns the rotation of the compass in radians.
    int
    Returns the width of the compass in pixels.
    long
    Returns the ID of the current game instance.
    float
    Returns the X-component of the position at the center of the map.
    float
    Returns the Y-component of the position at the center of the map.
    long
    Returns the ID of the map the player is currently on (as per Guild Wars 2 API).
    float
    Returns the scale of the map.
    long
    Returns information about the type of the map the player is currently on.
    byte
    Returns information about the type of the mount the player is currently riding.
    float
    Returns the X-component of the position of the player in continent coordinates.
    float
    Returns the Y-component of the position of the player in continent coordinates.
    long
    Returns the ID of the process.
    Returns the address of the map server that the game client is currently connected to.
    int
    Returns a 32bit bitfield that contains various information about the current game shard.
    int
    Returns a 32bit bitfield that contains various information about the current state of the game UI.

    Methods inherited from class java.lang.Object

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

    • BYTES

      public static final int BYTES
      The number of bytes that are used to store the context in the underlying data.
      Since:
      0.1.0
      See Also:
  • Method Details

    • copy

      public void copy(byte[] dest)
      Shorthand for copy(0, dest, 0, BYTES).

      See copy(int, byte[], int, int).

      Parameters:
      dest - the destination array
      Throws:
      IllegalStateException - if this view was invalidated
      IndexOutOfBoundsException - if any index is violated
      NullPointerException - if dest is null
      Since:
      0.1.0
    • copy

      @Deprecated(since="3.0.0", forRemoval=true) public void copy(ByteBuffer dest)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is deprecated in favor of copy(MemorySegment).
      Shorthand for copy(0, dest, 0, BYTES).

      See copy(int, ByteBuffer, int, int).

      Parameters:
      dest - the destination buffer
      Throws:
      IllegalStateException - if this view was invalidated
      IndexOutOfBoundsException - if any index is violated
      NullPointerException - if dest is null
      Since:
      1.3.0
    • copy

      public void copy(MemorySegment dest)
      Shorthand for copy(0, dest, 0, BYTES).

      See copy(int, MemorySegment, int, int).

      Parameters:
      dest - the destination segment
      Throws:
      IllegalStateException - if this view was invalidated
      IndexOutOfBoundsException - if any index is violated
      NullPointerException - if dest is null
      Since:
      3.0.0
    • copy

      public void copy(int srcOffset, byte[] dest, int destOffset, int length)
      Copies the underlying data beginning at the specified offset, to the specified offset of the destination array.

      If any of the following is true, an IndexOutOfBoundsException is thrown and the destination is not modified:

      • The srcOffset argument is negative.
      • The destOffset argument is negative.
      • The length argument is negative.
      • srcOffset + length is greater than BYTES, the length of the context
      • destOffset + length is greater than dest.length, the length of the destination array.
      Parameters:
      srcOffset - starting position in the context
      dest - the destination array
      destOffset - starting position in the destination data
      length - the number of bytes to be copied
      Throws:
      IllegalStateException - if this view was invalidated
      IndexOutOfBoundsException - if any index is violated
      NullPointerException - if dest is null
      Since:
      0.1.0
    • copy

      @Deprecated(since="3.0.0", forRemoval=true) public void copy(int srcOffset, ByteBuffer dest, int destOffset, int length)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is deprecated in favor of copy(int, MemorySegment, int, int).
      Copies the underlying data beginning at the specified offset, to the specified offset of the destination buffer.

      If any of the following is true, an IndexOutOfBoundsException is thrown and the destination is not modified:

      • The srcOffset argument is negative.
      • The destOffset argument is negative.
      • The length argument is negative.
      • srcOffset + length is greater than BYTES, the length of the context
      • destOffset + length is greater than dest.length, the length of the destination buffer.
      Parameters:
      srcOffset - starting position in the context
      dest - the destination buffer
      destOffset - starting position in the destination data
      length - the number of bytes to be copied
      Throws:
      IllegalStateException - if this view was invalidated
      IndexOutOfBoundsException - if any index is violated
      NullPointerException - if dest is null
      Since:
      1.3.0
    • copy

      public void copy(int srcOffset, MemorySegment dest, int destOffset, int length)
      Copies the underlying data beginning at the specified offset, to the specified offset of the destination segment.

      If any of the following is true, an IndexOutOfBoundsException is thrown and the destination is not modified:

      • The srcOffset argument is negative.
      • The destOffset argument is negative.
      • The length argument is negative.
      • srcOffset + length is greater than BYTES, the length of the context
      • destOffset + length is greater than dest.length, the length of the destination buffer.
      Parameters:
      srcOffset - starting position in the context
      dest - the destination segment
      destOffset - starting position in the destination data
      length - the number of bytes to be copied
      Throws:
      IllegalStateException - if this view was invalidated
      IndexOutOfBoundsException - if any index is violated
      NullPointerException - if dest is null
      Since:
      3.0.0
    • getServerAddress

      public @Nullable InetSocketAddress getServerAddress()
      Returns the address of the map server that the game client is currently connected to.
      Returns:
      the address of the map server that the game client is currently connected to
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getMapID

      public long getMapID()
      Returns the ID of the map the player is currently on (as per Guild Wars 2 API).
      Returns:
      the ID of the map the player is currently on
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getMapType

      public long getMapType()
      Returns information about the type of the map the player is currently on.

      The functionality provided by MapType may be used to interpret the value.

      Returns:
      information about the type of the map the player is currently on
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getShardID

      public int getShardID()
      Returns a 32bit bitfield that contains various information about the current game shard.
      Returns:
      a 32bit bitfield that contains various information about the current game shard
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      1.0.0
      API Note:
      This field has no known purpose for outside use.
    • getInstance

      public long getInstance()
      Returns the ID of the current game instance.
      Returns:
      the ID of the current game instance
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
      API Note:
      This field has no known purpose for outside use.
    • getBuildID

      public long getBuildID()
      Returns the ID of the game build that is currently running (as per Guild Wars 2 API).
      Returns:
      the ID of the game build that is currently running
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getUIState

      public int getUIState()
      Returns a 32bit bitfield that contains various information about the current state of the game UI.

      The functionality provided by UIState may be used to interpret the value of the bitfield.

      Returns:
      a 32bit bitfield that contains various information about the current state of the game UI
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getCompassWidth

      public int getCompassWidth()
      Returns the width of the compass in pixels.
      Returns:
      the width of the compass in pixels
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getCompassHeight

      public int getCompassHeight()
      Returns the height of the compass in pixels.
      Returns:
      the height of the compass in pixels
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getCompassRotation

      public float getCompassRotation()
      Returns the rotation of the compass in radians.
      Returns:
      the rotation of the compass in radians
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getPlayerX

      public float getPlayerX()
      Returns the X-component of the position of the player in continent coordinates.
      Returns:
      the X-component of the position of the player in continent coordinates
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getPlayerY

      public float getPlayerY()
      Returns the Y-component of the position of the player in continent coordinates.
      Returns:
      the Y-component of the position of the player in continent coordinates
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getMapCenterX

      public float getMapCenterX()
      Returns the X-component of the position at the center of the map.
      Returns:
      the X-component of the position at the center of the map
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getMapCenterY

      public float getMapCenterY()
      Returns the Y-component of the position at the center of the map.
      Returns:
      the Y-component of the position at the center of the map
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getMapScale

      public float getMapScale()
      Returns the scale of the map.
      Returns:
      the scale of the map
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      0.1.0
    • getProcessID

      public long getProcessID()
      Returns the ID of the process.
      Returns:
      the ID of the process
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      1.4.0
    • getMountType

      public byte getMountType()
      Returns information about the type of the mount the player is currently riding.

      The functionality provided by MountType may be used to interpret the value.

      Returns:
      information about the type of the mount the player is currently riding
      Throws:
      IllegalStateException - if this view was invalidated
      Since:
      1.5.0