mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Jobs join should go after JobsJoinEvent being fired
This commit is contained in:
parent
7c7b269e7d
commit
f8d94952bd
@ -459,10 +459,6 @@ public class PlayerManager {
|
||||
if (jPlayer == null)
|
||||
return;
|
||||
|
||||
// let the user join the job
|
||||
if (!jPlayer.joinJob(job))
|
||||
return;
|
||||
|
||||
// JobsJoin event
|
||||
JobsJoinEvent jobsJoinEvent = new JobsJoinEvent(jPlayer, job);
|
||||
plugin.getServer().getPluginManager().callEvent(jobsJoinEvent);
|
||||
@ -470,6 +466,10 @@ public class PlayerManager {
|
||||
if (jobsJoinEvent.isCancelled())
|
||||
return;
|
||||
|
||||
// let the user join the job
|
||||
if (!jPlayer.joinJob(job))
|
||||
return;
|
||||
|
||||
Jobs.getJobsDAO().joinJob(jPlayer, jPlayer.getJobProgression(job));
|
||||
jPlayer.setLeftTime(job);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user