Class CustomSource

java.lang.Object
dev.aurelium.auraskills.api.source.CustomSource
All Implemented Interfaces:
XpSource

public class CustomSource extends Object implements XpSource
  • Constructor Details

  • Method Details

    • getId

      public NamespacedId getId()
      Description copied from interface: XpSource
      Gets the id of the source. Any source set in the plugin config will use the auraskills namespace. Repeated sources in different skills will have the same NamespacedId but are different instances.
      Specified by:
      getId in interface XpSource
      Returns:
      The id
    • getType

      public SourceType getType()
      Specified by:
      getType in interface XpSource
    • getDisplayName

      public String getDisplayName(Locale locale)
      Description copied from interface: XpSource
      Gets the display name of the source. Different sources may return the same name.
      Specified by:
      getDisplayName in interface XpSource
      Parameters:
      locale - The locale to get the name in
      Returns:
      The display name
    • getUnitName

      @Nullable public @Nullable String getUnitName(Locale locale)
      Specified by:
      getUnitName in interface XpSource
    • name

      public String name()
      Description copied from interface: XpSource
      Gets the name of the source in all caps without a namespace. Different sources may return the same name.
      Specified by:
      name in interface XpSource
      Returns:
      The name in all caps
    • getXp

      public double getXp()
      Description copied from interface: XpSource
      Gets the amount of xp the source gives. The value is the base amount before any multipliers are applied.
      Specified by:
      getXp in interface XpSource
      Returns:
      The base xp of the source
    • getValues

      public SourceValues getValues()