Interface Reward


  • public interface Reward
    Represents a reward for a crate.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double getChance()
      Gets the chance of the winning the reward.
      String getCommand()
      Gets the command to be executed when the reward is won.
      org.bukkit.inventory.ItemStack getDisplayItem()
      Gets the display ItemStack for the reward used in the crate preview menu and in crate animations.
      String getId()
      Returns the id of the reward.
    • Method Detail

      • getId

        String getId()
        Returns the id of the reward.

        Specified in the crate's configuration file, path: "rewards.(id)".

        Returns:
        the id of the reward
      • getChance

        double getChance()
        Gets the chance of the winning the reward.

        Specified in the crate's configuration file, path: "rewards.id.chance".

        Returns:
        the chance of the reward
      • getCommand

        String getCommand()
        Gets the command to be executed when the reward is won.

        Specified in the crate's configuration file, path: "rewards.id.command".

        Returns:
        the command to be executed
      • getDisplayItem

        org.bukkit.inventory.ItemStack getDisplayItem()
        Gets the display ItemStack for the reward used in the crate preview menu and in crate animations.

        Specified in the crate's configuration file, path: "rewards.id.display-item".

        Returns:
        the display ItemStack for the reward