mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Fix bad task scheduling ID tracking logic, Close #405
This commit is contained in:
1 parent
4e3bb785d8
commit
f05896c8bb
6 files changed
+68
-40
No files matched your search
@@ -47,10 +47,7 @@ import net.william278.huskhomes.user.ConsoleUser;
|
||||
import net.william278.huskhomes.user.OnlineUser;
|
||||
import net.william278.huskhomes.user.SavedUser;
|
||||
import net.william278.huskhomes.user.SpongeUser;
|
||||
import net.william278.huskhomes.util.SpongeSafetyResolver;
|
||||
import net.william278.huskhomes.util.SpongeTaskRunner;
|
||||
import net.william278.huskhomes.util.UnsafeBlocks;
|
||||
import net.william278.huskhomes.util.Validator;
|
||||
import net.william278.huskhomes.util.*;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bstats.sponge.Metrics;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -79,6 +76,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -108,6 +106,7 @@ public class SpongeHuskHomes implements HuskHomes, SpongeTaskRunner, SpongeSafet
|
||||
@Inject
|
||||
private Metrics.Factory metricsFactory;
|
||||
|
||||
private ConcurrentHashMap<Integer, CancellableRunnable> tasks;
|
||||
private Set<SavedUser> savedUsers;
|
||||
private Settings settings;
|
||||
private Locales locales;
|
||||
@@ -131,6 +130,7 @@ public class SpongeHuskHomes implements HuskHomes, SpongeTaskRunner, SpongeSafet
|
||||
instance = this;
|
||||
|
||||
// Get plugin version from mod container
|
||||
this.tasks = new ConcurrentHashMap<>();
|
||||
this.savedUsers = new HashSet<>();
|
||||
this.globalPlayerList = new HashMap<>();
|
||||
this.currentlyOnWarmup = new HashSet<>();
|
||||
@@ -496,6 +496,12 @@ public class SpongeHuskHomes implements HuskHomes, SpongeTaskRunner, SpongeSafet
|
||||
return channel;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ConcurrentHashMap<Integer, CancellableRunnable> getTasks() {
|
||||
return tasks;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SpongeHuskHomes getPlugin() {
|
||||
|
||||
Reference in new issue
Block a user