so it is 2.0.0 release

This commit is contained in:
mlus 2025-05-04 18:40:39 +08:00
parent 74f348c2c4
commit 39b69424e8
3 changed files with 8 additions and 5 deletions

View File

@ -15,6 +15,7 @@ import java.net.Socket;
import java.util.Objects;
import java.util.Scanner;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -29,7 +30,7 @@ public class ChatSync {
static ServerSocket serverSocket;
static Socket clientSocket;
static Set<Socket> SocketList;
static Set<Socket> SocketList = ConcurrentHashMap.newKeySet();
static ExecutorService executorService = Executors.newCachedThreadPool();
public static void register(){

View File

@ -14,7 +14,6 @@ import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.storage.WorldData;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.OnDatapackSyncEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
@ -35,7 +34,10 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

View File

@ -1,5 +1,6 @@
package vip.fubuki.playersync.util;
import javax.annotation.Nonnull;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
@ -11,9 +12,8 @@ public class PSThreadPoolFactory implements ThreadFactory {
public PSThreadPoolFactory(String Prefix) {
threadNamePrefix = Prefix;
}
@Override
public Thread newThread(Runnable runnable) {
public Thread newThread(@Nonnull Runnable runnable) {
Thread thread = new Thread(runnable);
thread.setName(threadNamePrefix + "-thread-" + threadIdx.getAndIncrement());
return thread;