Class NMSArray

java.lang.Object
redempt.redlib.nms.NMSArray

public class NMSArray extends Object
Wraps any type of Array and provides easy reflection access
  • Constructor Details

    • NMSArray

      public NMSArray(Object array)
  • Method Details

    • get

      public NMSObject get(int index)
      Gets a wrapped NMSObject with the value at a certain index in the array
      Parameters:
      index - The index to get
      Returns:
      An NMSObject wrapping the object at the index
    • getDirect

      public Object getDirect(int index)
      Gets the object at the given index in the wrapped array
      Parameters:
      index - The index to get
      Returns:
      The object at the index
    • set

      public void set(int index, Object obj)
      Sets the object at the index of the wrapped array
      Parameters:
      index - The index to set
      obj - The object to set. If it is an NMSObject, it will be unwrapped automatically.
    • length

      public int length()