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.
-
Field Summary
Fields -
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.
-
Field Details
-
CODEC
Codec for serialization.
-
-
Method Details
-
getType
RewardType<?> getType()Retrieves the reward type definition associated with this instance.- 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.
-