Class PlayerMoneyGainEvent
java.lang.Object
org.bukkit.event.Event
com.tomkeuper.bedwars.api.events.player.PlayerMoneyGainEvent
public class PlayerMoneyGainEvent
extends org.bukkit.event.Event
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Lets you know why did the player received money.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerMoneyGainEvent
(org.bukkit.entity.Player player, int amount, PlayerMoneyGainEvent.MoneySource moneySource) Called when a player receives money. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the amount of money received.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
Get xp sourceorg.bukkit.entity.Player
Get the player that have received money.boolean
Check if event was cancelledvoid
setAmount
(int amount) Set a custom amount on the money received This can be used for boostersvoid
setCancelled
(boolean cancelled) Cancel eventMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerMoneyGainEvent
public PlayerMoneyGainEvent(org.bukkit.entity.Player player, int amount, PlayerMoneyGainEvent.MoneySource moneySource) Called when a player receives money. This only works when an economy system is found.- Parameters:
player
- - target player.amount
- - amount of xp.moneySource
- - where did the player receive money from.
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Get the player that have received money. -
getAmount
public int getAmount()Get the amount of money received. -
setAmount
public void setAmount(int amount) Set a custom amount on the money received This can be used for boosters- Parameters:
amount
- - amount of xp
-
getMoneySource
Get xp source -
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()Check if event was cancelled -
setCancelled
public void setCancelled(boolean cancelled) Cancel event
-