Interface PlayerAchievement


public interface PlayerAchievement
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns the description that contains info about earning it of this achievement that'll get displayed e.g. when a player earns it
    getDescription(@Nullable CommandSender sender)
    Returns the description that contains info about earning it of this achievement that'll get displayed e.g. when a player earns it
    Tip: Use Message.buildByKey(String, String) when you're saving the message in the messages file
    Returns the id of this achievement
    default String
    Returns the name of this achievement that'll get displayed e.g. when a player earns it
    getName(@Nullable CommandSender sender)
    Returns the name of this achievement that'll get displayed e.g. when a player earns it
    Tip: Use Message.buildByKey(String, String) when you're saving the message in the messages file
    Returns the plugin that created this achievement
    boolean
    Get whether it has been enabled by the server administrator.
    void
    setEnabled(boolean enabled)
    Set whether it is enabled.
  • Method Details

    • getId

      String getId()
      Returns the id of this achievement
      Returns:
      The internal id of this achievement
    • getPlugin

      Plugin getPlugin()
      Returns the plugin that created this achievement
      Returns:
      The plugin that registered this achievement
    • getName

      String getName(@Nullable @Nullable CommandSender sender)
      Returns the name of this achievement that'll get displayed e.g. when a player earns it
      Tip: Use Message.buildByKey(String, String) when you're saving the message in the messages file
      Parameters:
      sender - Shall return the name in the language of him. Can be null
      Returns:
      The name of this achievement in the language of the sender
    • getName

      default String getName()
      Returns the name of this achievement that'll get displayed e.g. when a player earns it
      Returns:
      The name of this achievement in the default language
    • getDescription

      String getDescription(@Nullable @Nullable CommandSender sender)
      Returns the description that contains info about earning it of this achievement that'll get displayed e.g. when a player earns it
      Tip: Use Message.buildByKey(String, String) when you're saving the message in the messages file
      Parameters:
      sender - Shall return the description in the language of him. Can be null
      Returns:
      The description of this achievement in the language of the sender
    • getDescription

      default String getDescription()
      Returns the description that contains info about earning it of this achievement that'll get displayed e.g. when a player earns it
      Returns:
      The description of this achievement in the default language
    • isEnabled

      boolean isEnabled()
      Get whether it has been enabled by the server administrator.

      Player's won't earn it and see it in relevant UIs it's disabled. The given state also resets itself with reloads as it loads the given information from the coressponding config file.

      Returns:
      true if it's enabled
    • setEnabled

      void setEnabled(boolean enabled)
      Set whether it is enabled.

      Player's won't earn it and see it in relevant UIs it's disabled. The given state also resets itself with reloads as it loads the given information from the coressponding config file.

      Parameters:
      enabled - true if it's enabled