Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing item extra data. Used to store additional information about item other then just item id and data

Hierarchy

Index

Constructors

Properties

class: Class<ItemExtraData>

Methods

  • addEnchant(type: number, level: number): void
  • asJson(): JSONObject
  • clone(): any
  • equals(param0: any): boolean
  • finalize(): void
  • getAllCustomData(): string
  • getAllEnchantNames(): string
  • getBoolean(name: string, fallback?: boolean): boolean
  • Parameters

    • name: string

      parameter name

    • Optional fallback: boolean

      default value to be returned if item extra data doesn't contain a parameter with specified name

    Returns boolean

    custom boolean parameter value if extra data of the item contains one, fallback value otherwise. If fallback was not specified, null is returned.

  • getClass(): Class<any>
  • getCustomName(): string
  • getEnchantCount(): number
  • getEnchantLevel(type: number): number
  • getEnchantName(id: number, level: number): string
  • getEnchants(): {}
  • getFloat(name: string, fallback?: number): number
  • Parameters

    • name: string

      parameter name

    • Optional fallback: number

      default value to be returned if item extra data doesn't contain a parameter with specified name

    Returns number

    custom float parameter value if extra data of the item contains one, fallback value otherwise. If fallback was not specified, null is returned.

  • getInt(name: string, fallback?: number): number
  • Parameters

    • name: string

      parameter name

    • Optional fallback: number

      default value to be returned if item extra data doesn't contain a parameter with specified name

    Returns number

    custom integer parameter value if extra data of the item contains one, fallback value otherwise. If fallback was not specified, null is returned.

  • getLong(name: string, fallback?: number): number
  • Parameters

    • name: string

      parameter name

    • Optional fallback: number

      default value to be returned if item extra data doesn't contain a parameter with specified name

    Returns number

    custom long integer parameter value if extra data of the item contains one, fallback value otherwise. If fallback was not specified, null is returned.

  • getRawEnchants(): number[][]
  • getSerializable(name: string): any
  • getString(name: string, fallback?: string): string
  • Parameters

    • name: string

      parameter name

    • Optional fallback: string

      default value to be returned if item extra data doesn't contain a parameter with specified name

    Returns string

    custom string parameter value if extra data of the item contains one, fallback value otherwise. If fallback was not specified, null is returned.

  • getValue(): number
  • hashCode(): number
  • isEmpty(): boolean
  • isEnchanted(): boolean
  • isFinalizableInstance(): boolean
  • notify(): void
  • notifyAll(): void
  • removeAllEnchants(): void
  • removeCustomData(): void
  • removeEnchant(type: number): void
  • setAllCustomData(data: string): void
  • setCustomName(name: string): void
  • toString(): string
  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void
  • constructClone(pointer: number): number
  • initSaverId(): void
  • unwrapValue(extra: any): number

Generated using TypeDoc