1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-27 03:17:49 +01:00

This needs to be here. Fix for BP with -1 payments

This commit is contained in:
Zrips 2024-10-17 11:03:34 +03:00
parent 8282af2242
commit 0c0c0ff9ba
2 changed files with 6 additions and 2 deletions

View File

@ -1047,9 +1047,8 @@ public final class Jobs extends JavaPlugin {
List<JobProgression> progression = jPlayer.getJobProgression();
int numjobs = progression.size();
if (!Jobs.getGCManager().useBlockProtectionBlockTracker && !Jobs.getExploitManager().isProtectionValidAddIfNotExists(jPlayer, info, block, true)) {
if (!Jobs.getGCManager().useBlockProtectionBlockTracker && !Jobs.getExploitManager().isProtectionValidAddIfNotExists(jPlayer, info, block, true))
return;
}
// no job
if (numjobs == 0) {

View File

@ -284,6 +284,11 @@ public class ExploitProtectionManager {
if (exploitProtection.getProtectedUntil() != 0) {
long time = exploitProtection.getProtectedUntil();
if (time == -1L) {
remove(block);
return false;
}
if (time < System.currentTimeMillis()) {
remove(block);
return true;