aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/events/CriterionEvent.java
blob: fe20cec014bb3fa990e2a296f07591d80b8d6521 (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.PlayerEvent;
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 PlayerEvent
{
	private final Advancement advancement;
	private final String criterionKey;

	public CriterionEvent(PlayerEntity player, Advancement advancement, String criterionKey)
	{
		super(player);
		this.advancement = advancement;
		this.criterionKey = criterionKey;
	}

	public Advancement getAdvancement()
	{
		return advancement;
	}

	public String getCriterionKey()
	{
		return criterionKey;
	}
}