Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
Added BackpackSellEvent
  • Loading branch information
Drawethree committed Feb 16, 2022
1 parent 772be4a commit a18cae5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>ultrabackpacks-api</artifactId>
<name>UltraBackpacks API</name>
<packaging>jar</packaging>
<version>1.1.1</version>
<version>1.1.2</version>

<build>
<finalName>UltraBackpacksAPI-${project.version}</finalName>
Expand Down
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;
}
}

0 comments on commit a18cae5

Please sign in to comment.