mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-31 21:37:57 +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) {
|
public void setCancelled(boolean cancel) {
|
||||||
cancelled = cancel;
|
cancelled = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAmount(double money) {
|
||||||
|
this.money = money;
|
||||||
|
}
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
@ -45,4 +49,4 @@ public final class JobsPaymentEvent extends Event implements Cancellable {
|
|||||||
public static HandlerList getHandlerList() {
|
public static HandlerList getHandlerList() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,6 +167,9 @@ public class BufferedEconomy {
|
|||||||
// If event is canceled, dont do anything
|
// If event is canceled, dont do anything
|
||||||
if (JobsPaymentEvent.isCancelled())
|
if (JobsPaymentEvent.isCancelled())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
double newAmount = JobsPaymentEvent.getAmount();
|
||||||
|
payment.setAmount(newAmount);
|
||||||
|
|
||||||
if (Jobs.getGCManager().UseServerAccount) {
|
if (Jobs.getGCManager().UseServerAccount) {
|
||||||
if (!hasMoney) {
|
if (!hasMoney) {
|
||||||
|
Loading…
Reference in New Issue
Block a user