Class ClanBalanceUpdateEvent
java.lang.Object
org.bukkit.event.Event
net.sacredlabyrinth.phaed.simpleclans.events.ClanBalanceUpdateEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class ClanBalanceUpdateEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionClanBalanceUpdateEvent(@NotNull BankOperator updater, @NotNull Clan clan, double balance, double newBalance, @NotNull ClanBalanceUpdateEvent.Cause cause) -
Method Summary
Modifier and TypeMethodDescriptiondouble@NotNull ClanBalanceUpdateEvent.CausegetCause()@NotNull ClangetClan()static org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListdouble@NotNull BankOperatorbooleanvoidsetCancelled(boolean isCancelled) voidsetNewBalance(double newBalance) Sets the Clan's new balanceMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
ClanBalanceUpdateEvent
public ClanBalanceUpdateEvent(@NotNull @NotNull BankOperator updater, @NotNull @NotNull Clan clan, double balance, double newBalance, @NotNull @NotNull ClanBalanceUpdateEvent.Cause cause)
-
-
Method Details
-
getUpdater
- Returns:
- the balance updater
-
getClan
- Returns:
- the Clan involved
-
getBalance
public double getBalance()- Returns:
- the Clan's current balance
-
getNewBalance
public double getNewBalance()- Returns:
- the Clan's new balance
-
setNewBalance
public void setNewBalance(double newBalance) Sets the Clan's new balance- Parameters:
newBalance- the new balance- Throws:
IllegalArgumentException- if newBalance is negative
-
getCause
- Returns:
- the update cause
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean isCancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Throws:
IllegalStateException- if the cause of the event isClanBalanceUpdateEvent.Cause.REVERT
-