aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/events/CriterionEvent.java
blob: 8148b9bc0cc01f2dd7f5bdb6cb4b0dcb105a5433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.
 * <br>
 * This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.<br>
 * <br>
 * This event does not have a result. {@link HasResult}<br>
 * <br>
 * 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;
	}
}