mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +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
@@ -77,6 +77,8 @@ import java.io.InputStream;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -94,6 +96,7 @@ public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes
|
||||
private final ModContainer modContainer = FabricLoader.getInstance()
|
||||
.getModContainer("huskhomes").orElseThrow(() -> new RuntimeException("Failed to get Mod Container"));
|
||||
private MinecraftServer minecraftServer;
|
||||
private ConcurrentHashMap<Integer, CompletableFuture<?>> tasks;
|
||||
private Map<String, Boolean> permissions;
|
||||
private Set<SavedUser> savedUsers;
|
||||
private Settings settings;
|
||||
@@ -120,6 +123,7 @@ public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes
|
||||
instance = this;
|
||||
|
||||
// Get plugin version from mod container
|
||||
this.tasks = new ConcurrentHashMap<>();
|
||||
this.permissions = new HashMap<>();
|
||||
this.savedUsers = new HashSet<>();
|
||||
this.globalPlayerList = new HashMap<>();
|
||||
@@ -470,6 +474,12 @@ public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes
|
||||
return minecraftServer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public ConcurrentHashMap<Integer, CompletableFuture<?>> getTasks() {
|
||||
return tasks;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public FabricHuskHomes getPlugin() {
|
||||
|
||||
Reference in new issue
Block a user