Interface AdvancementReward
- All Known Implementing Classes:
CommandReward, CustomLootTableReward, ExperienceReward, ItemReward, LootTableReward, PotionEffectReward
public interface AdvancementReward
Represents a benefit or action granted to a player upon the completion of an advancement.
Rewards can range from simple experience points to complex item distributions or
custom command executions.
-
Method Summary
Modifier and TypeMethodDescriptionRewardType<?> getType()Retrieves the reward type definition associated with this instance.voidgrant(org.bukkit.entity.Player player) Grants the reward to the specified player.
-
Method Details
-
getType
RewardType<?> getType()Retrieves the reward type definition associated with this instance. This is used to identify the logic and handle polymorphic serialization.- Returns:
- The
RewardTypecharacterizing this specific reward.
-
grant
void grant(org.bukkit.entity.Player player) Grants the reward to the specified player. This method is triggered automatically by the progress tracker when an advancement reaches a completed state.- Parameters:
player- ThePlayerwho completed the advancement.
-