package com.anthonyhilyard.iceberg.events;
import net.minecraftforge.event.entity.player.AdvancementEvent;
import net.minecraft.advancements.Advancement;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.common.MinecraftForge;
/**
* This event is fired when a player is granted an advancement criterion.
*
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
*
* This event does not have a result. {@link HasResult}
*
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*/
public class CriterionEvent extends AdvancementEvent
{
private final Advancement advancement;
private final String criterionKey;
public CriterionEvent(PlayerEntity player, Advancement advancement, String criterionKey)
{
super(player, advancement);
this.advancement = advancement;
this.criterionKey = criterionKey;
}
public Advancement getAdvancement()
{
return advancement;
}
public String getCriterionKey()
{
return criterionKey;
}
}