Make Save PlayerData within PlayerData. More multithreaded saving

This commit is contained in:
Kam committed 2023-05-15 23:06:21 -04:00
1 parent cf82314181
commit 221f00ccf4
17 files changed
+120 -101

No files matched your search

+2 -10
View File
@@ -21,16 +21,8 @@ import java.util.Map;
public class Server {
public static boolean sendData(final EntityPlayerMP player, final EnumPacketClient enu, final Object... obs) {
ByteBuf buffer = Unpooled.buffer();
try {
if(!fillBuffer(buffer, enu, obs))
return false;
CustomNpcs.Channel.sendTo(new FMLProxyPacket(buffer, "CustomNPCs"), player);
} catch (IOException e) {
e.printStackTrace();
}
return true;
public static void sendData(final EntityPlayerMP player, final EnumPacketClient enu, final Object... obs) {
sendDataDelayed(player, enu, 0, obs);
}
public static void sendDataDelayed(final EntityPlayerMP player, final EnumPacketClient type, int delay, final Object... obs) {