Class ExperienceReward
java.lang.Object
com.github.darksoulq.abyssallib.world.advancement.reward.ExperienceReward
- All Implemented Interfaces:
AdvancementReward
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<ExperienceReward> static final RewardType<ExperienceReward> -
Constructor Summary
Constructors -
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
-
TYPE
-
-
Constructor Details
-
ExperienceReward
public ExperienceReward(int amount)
-
-
Method Details
-
getType
Description copied from interface:AdvancementRewardRetrieves the reward type definition associated with this instance. This is used to identify the logic and handle polymorphic serialization.- Specified by:
getTypein interfaceAdvancementReward- Returns:
- The
RewardTypecharacterizing this specific reward.
-
grant
public void grant(org.bukkit.entity.Player player) Description copied from interface:AdvancementRewardGrants the reward to the specified player. This method is triggered automatically by the progress tracker when an advancement reaches a completed state.- Specified by:
grantin interfaceAdvancementReward- Parameters:
player- ThePlayerwho completed the advancement.
-