mirror of
https://github.com/MiniDay/HamsterCurrency-Parent.git
synced 2025-08-22 20:25:30 +08:00
64 lines
1.5 KiB
Java
64 lines
1.5 KiB
Java
package cn.hamster3.currency.event;
|
|
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.UUID;
|
|
|
|
@SuppressWarnings("unused")
|
|
public class CurrencyChangeEvent extends Event {
|
|
private static final HandlerList handlerList = new HandlerList();
|
|
@NotNull
|
|
private final UUID playerUUID;
|
|
@NotNull
|
|
private final String currencyID;
|
|
private final double oldAmount;
|
|
private final double newAmount;
|
|
|
|
public CurrencyChangeEvent(@NotNull UUID playerUUID, @NotNull String currencyID, double oldAmount, double newAmount) {
|
|
super(true);
|
|
this.playerUUID = playerUUID;
|
|
this.currencyID = currencyID;
|
|
this.oldAmount = oldAmount;
|
|
this.newAmount = newAmount;
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlerList;
|
|
}
|
|
|
|
@NotNull
|
|
public UUID getPlayerUUID() {
|
|
return playerUUID;
|
|
}
|
|
|
|
@NotNull
|
|
public String getCurrencyID() {
|
|
return currencyID;
|
|
}
|
|
|
|
public double getOldAmount() {
|
|
return oldAmount;
|
|
}
|
|
|
|
public double getNewAmount() {
|
|
return newAmount;
|
|
}
|
|
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlerList;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "CurrencyChangeEvent{" +
|
|
"playerUUID=" + playerUUID +
|
|
", currencyID='" + currencyID + '\'' +
|
|
", oldAmount=" + oldAmount +
|
|
", newAmount=" + newAmount +
|
|
'}';
|
|
}
|
|
}
|