aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/events/ItemPriceUpdateEvent.java
blob: f6415096461c1294f729561d8af0d543804e3cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package de.hysky.skyblocker.events;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;

@FunctionalInterface
@Environment(EnvType.CLIENT)
public interface ItemPriceUpdateEvent {
	void onPriceUpdate();

	/**
	 * An event that is fired when all prices are updated.
	 */
	Event<ItemPriceUpdateEvent> ON_PRICE_UPDATE = EventFactory.createArrayBacked(ItemPriceUpdateEvent.class, listeners -> () -> {
		for (ItemPriceUpdateEvent listener : listeners) {
			listener.onPriceUpdate();
		}
	});
}