-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/dev/drawethree/ultrabackpacks/api/event/BackpackSellEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package dev.drawethree.ultrabackpacks.api.event; | ||
|
||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
|
||
public class BackpackSellEvent extends Event { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
|
||
private final Player player; | ||
private double moneyToDeposit; | ||
|
||
/** | ||
* Event fired when player sells the backpack. | ||
* @param player Player | ||
* @param moneyToDeposit original amount to deposit | ||
*/ | ||
public BackpackSellEvent(Player player, double moneyToDeposit) { | ||
this.player = player; | ||
this.moneyToDeposit = moneyToDeposit; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public void setMoneyToDeposit(double moneyToDeposit) { | ||
this.moneyToDeposit = moneyToDeposit; | ||
} | ||
|
||
public Player getPlayer() { | ||
return player; | ||
} | ||
} |