mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-29 04:18:07 +01:00
Merge pull request #20 from HYVE-Software/master
Editable JobsPaymentEvent
This commit is contained in:
commit
dd602cbb67
@ -37,6 +37,10 @@ public final class JobsPaymentEvent extends Event implements Cancellable {
|
||||
public void setCancelled(boolean cancel) {
|
||||
cancelled = cancel;
|
||||
}
|
||||
|
||||
public void setAmount(double money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
@ -45,4 +49,4 @@ public final class JobsPaymentEvent extends Event implements Cancellable {
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -167,6 +167,9 @@ public class BufferedEconomy {
|
||||
// If event is canceled, dont do anything
|
||||
if (JobsPaymentEvent.isCancelled())
|
||||
continue;
|
||||
|
||||
double newAmount = JobsPaymentEvent.getAmount();
|
||||
payment.setAmount(newAmount);
|
||||
|
||||
if (Jobs.getGCManager().UseServerAccount) {
|
||||
if (!hasMoney) {
|
||||
|
Loading…
Reference in New Issue
Block a user