From 7584df32f45007b5e6672bb5f1a2fdcfa06b48ce Mon Sep 17 00:00:00 2001 From: stjn Date: Wed, 10 Nov 2021 15:59:18 +0100 Subject: [PATCH] Added sell/buy event --- .../java/com/alttd/events/SpawnShopEvent.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/main/java/com/alttd/events/SpawnShopEvent.java diff --git a/src/main/java/com/alttd/events/SpawnShopEvent.java b/src/main/java/com/alttd/events/SpawnShopEvent.java new file mode 100644 index 0000000..c1139ea --- /dev/null +++ b/src/main/java/com/alttd/events/SpawnShopEvent.java @@ -0,0 +1,62 @@ +package com.alttd.events; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; + +public final class SpawnShopEvent extends Event { + private final Player player; + private final int amount; + private final double price; + private final Material item; + private final int pointsBefore; + private final int pointsAfter; + private final boolean buy; + + public SpawnShopEvent(Player player, int amount, double price, Material item, + int pointsBefore, int pointsAfter, boolean buy) { + this.player = player; + this.amount = amount; + this.price = price; + this.item = item; + this.pointsBefore = pointsBefore; + this.pointsAfter = pointsAfter; + this.buy = buy; + } + + public Player player() { + return player; + } + + public int amount() { + return amount; + } + + public double price() { + return price; + } + + public Material item() { + return item; + } + + public int pointsBefore() { + return pointsBefore; + } + + public int pointsAfter() { + return pointsAfter; + } + + public boolean buy() { + return buy; + } + + @Override + public @NotNull HandlerList getHandlers() { + return null; + } +} +