Class InterestEvent
java.lang.Object
org.bukkit.event.Event
us.teaminceptus.novaconomy.api.events.InterestEvent
- All Implemented Interfaces:
Cancellable
Called when Interest happens
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionInterestEvent(Map<NovaPlayer, Map<Economy, Double>> previousBalances, Map<NovaPlayer, Map<Economy, Double>> interestAmount) Constructs an InterestEvent. -
Method Summary
Modifier and TypeMethodDescriptionFetch a Map of what players were affected to how much was added to each balanceFetch a Map of what players were affected to their new balances.Fetch a Map of what players were affected to their previous balances.static HandlerListFetch the Event Handlers.Utility Method to get the values affected from this player and the amount added to their balanceUtility Method to get the values affected from this player and their new balancesUtility Method to get the values affected from this player and their previous balancesbooleanvoidsetCancelled(boolean cancelled) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
InterestEvent
public InterestEvent(Map<NovaPlayer, Map<Economy, Double>> previousBalances, Map<NovaPlayer, Map<Economy, Double>> interestAmount) - Parameters:
previousBalances- A Map of Players to the economies affected and their previous balancesinterestAmount- A Map of Players to the economies affected and the amount added
-
-
Method Details
-
getAllPreviousBalances
Fetch a Map of what players were affected to their previous balances.- Returns:
- Map of Previous Balances
-
getPreviousBalance
Utility Method to get the values affected from this player and their previous balances- Parameters:
np- Player to use- Returns:
- Map of Economies to their Previous Balances
- Throws:
IllegalArgumentException- if player is null
-
getAllNewBalances
Fetch a Map of what players were affected to their new balances.- Returns:
- Map of New Balances
-
getNewBalance
Utility Method to get the values affected from this player and their new balances- Parameters:
np- Player to use- Returns:
- Map of Economies to their New Balances
- Throws:
IllegalArgumentException- if player is null
-
getAllInterestAmounts
Fetch a Map of what players were affected to how much was added to each balance- Returns:
- Map of Interest Amount
-
getInterestAmount
Utility Method to get the values affected from this player and the amount added to their balance- Parameters:
np- Player to use- Returns:
- Map of Economies to their additions
- Throws:
IllegalArgumentException- if player is null
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceCancellable
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHanderList
Fetch the Event Handlers.- Returns:
- Event Handlers
- See Also:
-