mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-02 23:43:44 +01:00
a8466e5e2f
canceled, set it to 0 and let it to do its thing. Optimize for boost permission check on each action. Calculate only every one minute if needed. Try to create points table every time, to avoid missing table.
57 lines
1.2 KiB
Java
57 lines
1.2 KiB
Java
package com.gamingmesh.jobs.api;
|
|
|
|
import org.bukkit.OfflinePlayer;
|
|
import org.bukkit.event.Cancellable;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
public final class JobsPaymentEvent extends Event implements Cancellable {
|
|
private static final HandlerList handlers = new HandlerList();
|
|
private OfflinePlayer offlinePlayer;
|
|
private double money;
|
|
private double points;
|
|
private boolean cancelled;
|
|
|
|
public JobsPaymentEvent(OfflinePlayer offlinePlayer, double money, double points) {
|
|
this.offlinePlayer = offlinePlayer;
|
|
this.money = money;
|
|
this.points = points;
|
|
}
|
|
|
|
public OfflinePlayer getPlayer() {
|
|
return this.offlinePlayer;
|
|
}
|
|
|
|
public double getAmount() {
|
|
return this.money;
|
|
}
|
|
|
|
public double getPoints() {
|
|
return this.points;
|
|
}
|
|
|
|
public void setPoints(double amount) {
|
|
this.points = amount;
|
|
}
|
|
|
|
public boolean isCancelled() {
|
|
return cancelled;
|
|
}
|
|
|
|
public void setCancelled(boolean cancel) {
|
|
cancelled = cancel;
|
|
}
|
|
|
|
public void setAmount(double money) {
|
|
this.money = money;
|
|
}
|
|
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
}
|