1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +01:00

Fixed when players job joining was not completed

Closes #1057
This commit is contained in:
montlikadani 2021-01-13 09:28:14 +01:00
parent d335f01e22
commit a2bd1804d7
3 changed files with 3 additions and 4 deletions

View File

@ -393,7 +393,7 @@ public class PlayerManager {
if (jobsjoinevent.isCancelled())
return;
Bukkit.getScheduler().runTaskAsynchronously(Jobs.getInstance(), () -> Jobs.getJobsDAO().joinJob(jPlayer, jPlayer.getJobProgression(job)));
Jobs.getJobsDAO().joinJob(jPlayer, jPlayer.getJobProgression(job));
jPlayer.setLeftTime(job);
PerformCommands.performCommandsOnJoin(jPlayer, job);

View File

@ -166,6 +166,7 @@ public class Job {
public void updateTotalPlayers() {
totalPlayers = Jobs.getJobsDAO().getTotalPlayerAmountByJobName(jobName);
if (totalPlayers <= 0) {
totalPlayers = Jobs.getJobsDAO().getTotalPlayerAmountByJobName(fullName);
}

View File

@ -40,7 +40,6 @@ import com.gamingmesh.jobs.container.blockOwnerShip.BlockTypes;
import com.gamingmesh.jobs.dao.JobsDAO;
import com.gamingmesh.jobs.economy.PaymentData;
import com.gamingmesh.jobs.resources.jfep.Parser;
import com.gamingmesh.jobs.stuff.Debug;
import com.gamingmesh.jobs.stuff.TimeManage;
public class JobsPlayer {
@ -343,8 +342,7 @@ public class JobsPlayer {
}
public int getLimit(CurrencyType type) {
Integer value = type == null ? 0 : limits.get(type);
return value;
return type == null ? 0 : limits.get(type);
}
public void resetPaymentLimit() {