Interface Reward

    • Method Detail

      • getParent

        Crate getParent()
        Returns the crate that this reward belongs to.
        Returns:
        the parent of this reward. If the parent doesn't exist, this returns null.
      • setParent

        void setParent​(Crate crate)
      • getLine

        RewardLine getLine()
        Returns the reward line that is config-compatible.
        Returns:
        the reward line
      • hasPermission

        @Deprecated
        boolean hasPermission​(org.bukkit.entity.Player player)
        Deprecated.
        Checks if the player has any of the following permissions specified by getPermissions()
        Parameters:
        player - the player to check
        Returns:
        true if the player has any permission, false otherwise
      • setPermissions

        @Deprecated
        void setPermissions​(List<String> perms)
        Deprecated.
        Sets the list of permissions.
        Parameters:
        perms - the list of permissions to set
      • getPermissions

        @Deprecated
        List<String> getPermissions()
        Deprecated.
        Returns the set of permissions.
        Returns:
        the list of permissions, otherwise the empty list
      • getSlot

        int getSlot()
      • setSlot

        void setSlot​(int slot)
      • getChance

        double getChance()
        Returns the chance.
        Returns:
        chance
      • setChance

        void setChance​(double chance)
        Sets the chance to a double representation. The chance must be greater than or equal to zero.
        Parameters:
        chance - the chance to set.
      • getDisplayItem

        org.bukkit.inventory.ItemStack getDisplayItem()
        Returns the display item.
        Returns:
        the display item if non-null, otherwise null.
      • setDisplayItem

        void setDisplayItem​(org.bukkit.inventory.ItemStack item)
        Sets the display item.
        Parameters:
        item - the item to set.
      • hasDisplayItem

        boolean hasDisplayItem()
        Checks whether this reward has an display item.
        Returns:
        true if the display item is non-null.
      • getItems

        List<org.bukkit.inventory.ItemStack> getItems()
        Returns the list of items.
        Returns:
        the list of items, otherwise the empty list.
      • getItems

        List<org.bukkit.inventory.ItemStack> getItems​(org.bukkit.entity.Player player)
        Returns the list of formatted items.
        Parameters:
        player - the player to format the items to.
        Returns:
        the list of formatted items, otherwise the empty list.
      • hasItems

        boolean hasItems()
        Returns whether the list has a set of items.
        Returns:
        true if there are items, false otherwise.
      • setItems

        void setItems​(List<org.bukkit.inventory.ItemStack> items)
        Sets the list of items.
        Parameters:
        items - the list to set.
      • getCommands

        List<String> getCommands()
        Returns the list of commands.
        Returns:
        the list of commands, otherwise the empty list.
      • getCommands

        List<String> getCommands​(org.bukkit.entity.Player player)
        Returns the list of commands formatted for the player.
        Parameters:
        player - The player to format the string for.
        Returns:
        the list of formatted commands, otherwise the empty list.
      • setCommands

        void setCommands​(List<String> commands)
        Sets the list of commands.
        Parameters:
        commands - the list to set.
      • getBroadcastMessage

        List<String> getBroadcastMessage()
      • setBroadcastMessage

        void setBroadcastMessage​(List<String> broadcastMessage)
      • setOpenMessage

        void setOpenMessage​(List<String> openMessage)
      • isConstant

        boolean isConstant()
        Returns whether this is a constant reward -- meaning that this reward will always be given to the player.
        Returns:
        true if the reward is constant, false otherwise.
      • setConstant

        void setConstant​(boolean bool)
        Set the constant property.
        Parameters:
        bool - the variable constant
      • isUnique

        boolean isUnique()
        Returns whether this is a unique reward.
        Returns:
        true if unique, otherwise false.
      • setUnique

        void setUnique​(boolean bool)
        Sets the unique property.
        Parameters:
        bool - the boolean to set.
      • hasPostParsing

        boolean hasPostParsing()
      • copy

        Reward copy()
        https://www.artima.com/intv/bloch13.html
        Returns:
        A copy of the reward.