diff --git a/com/gamingmesh/jobs/Jobs.java b/com/gamingmesh/jobs/Jobs.java index 975455ed..6b12287a 100644 --- a/com/gamingmesh/jobs/Jobs.java +++ b/com/gamingmesh/jobs/Jobs.java @@ -33,7 +33,6 @@ import org.bukkit.entity.Player; import com.gamingmesh.jobs.Gui.GuiManager; import com.gamingmesh.jobs.Signs.SignUtil; import com.gamingmesh.jobs.api.JobsExpGainEvent; -import com.gamingmesh.jobs.api.JobsPaymentEvent; import com.gamingmesh.jobs.commands.JobsCommands; import com.gamingmesh.jobs.config.BossBarManager; import com.gamingmesh.jobs.config.ConfigManager; @@ -751,7 +750,7 @@ public class Jobs { } if (amount == 0D && pointAmount == 0D) return; - + Jobs.getEconomy().pay(jPlayer, amount, pointAmount, 0.0); if (Jobs.getGCManager().LoggingUse) @@ -882,7 +881,7 @@ public class Jobs { Loging.recordToLog(jPlayer, info, amount, expAmount); // JobsPayment event - JobsExpGainEvent JobsExpGainEvent = new JobsExpGainEvent(jPlayer.getPlayer(), expAmount); + JobsExpGainEvent JobsExpGainEvent = new JobsExpGainEvent(jPlayer.getPlayer(), prog.getJob(), expAmount); Bukkit.getServer().getPluginManager().callEvent(JobsExpGainEvent); // If event is canceled, don't do anything if (JobsExpGainEvent.isCancelled()) diff --git a/com/gamingmesh/jobs/api/JobsExpGainEvent.java b/com/gamingmesh/jobs/api/JobsExpGainEvent.java index 39641e4d..a7874c8c 100644 --- a/com/gamingmesh/jobs/api/JobsExpGainEvent.java +++ b/com/gamingmesh/jobs/api/JobsExpGainEvent.java @@ -5,14 +5,18 @@ import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +import com.gamingmesh.jobs.container.Job; + public final class JobsExpGainEvent extends Event implements Cancellable { private static final HandlerList handlers = new HandlerList(); private OfflinePlayer offlinePlayer; private double exp; + private Job job; private boolean cancelled; - public JobsExpGainEvent(OfflinePlayer offlinePlayer, double exp) { + public JobsExpGainEvent(OfflinePlayer offlinePlayer, Job job, double exp) { this.offlinePlayer = offlinePlayer; + this.job = job; this.exp = exp; } @@ -20,6 +24,10 @@ public final class JobsExpGainEvent extends Event implements Cancellable { return this.offlinePlayer; } + public Job getJob() { + return this.job; + } + public double getExp() { return this.exp; } diff --git a/plugin.yml b/plugin.yml index 82926227..c9478987 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ name: Jobs description: Jobs Plugin for the BukkitAPI main: com.gamingmesh.jobs.JobsPlugin -version: 3.1.2 +version: 3.1.3 author: phrstbrn softdepend: [Vault, CoreProtect, MythicMobs, McMMO] commands: