mrnavastar / invsync Goto Github PK
View Code? Open in Web Editor NEWThis is a fabric mod for syncing inventories and player data between all of your minecraft servers! (Or as many as you choose :blush:)
License: MIT License
This is a fabric mod for syncing inventories and player data between all of your minecraft servers! (Or as many as you choose :blush:)
License: MIT License
I'm using Velocity as proxy and when i change server threw the proxy my Inventory is not getting synced. It's only getting synced when i leave the server completly.
I attempted numerous ways and it kept crashing on startup from this line not being correct. I was testing on Bisect Hosting. Since your example is clearly windows I was not sure if another way is implemented. Most people are going to be running on Linux though, so you might want to include an example for that.
This is what I have for windows which works fine, however, I would not know the linux drive on a host.
"Database_Directory": "C:/Users/Trent87/Downloads/AoF3_2.7.0_dev.alloffabric.com"
Here are some of the things I tried.
"Database_Directory": "root"
"Database_Directory": "/"
"Database_Directory": "root/"
"Database_Directory": ""
"Database_Directory": "root"
hey, this isnt an issue its more so support but whenever i start the server i get a permission denied and it crashes. i set the sqlite path to /var/www/mounts and im pretty sure thats a root path so im wondering if theres any paths i can set it to that wont get me permission denied. so sorry i have to ask this way i just cant find help anywhere else
https://modrinth.com/mod/travelersbackpack
When the backpack is equipped, it does not sync
The server log shows that the database is saved when the player leaves the world. However, when using Velocity in a game, the information is not guaranteed to be synchronized.
minecraft: 1.16.5
invSync: invsync-v1.1.1
This doesnt seem specific to any particular player but not sure what is causing this crash.
[04:46:03] [Server thread/ERROR]: Encountered an unexpected exception java.lang.AssertionError: null at com.google.gson.internal.bind.JsonTreeReader.peek(JsonTreeReader.java:146) ~[gson-2.8.9.jar:?] at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:161) ~[gson-2.8.9.jar:?] at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[gson-2.8.9.jar:?] at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:285) ~[gson-2.8.9.jar:?] at net.minecraft.class_2985.INVSYNC$load(class_2985.java:3581) ~[server-intermediary.jar:?] at mrnavastar.invsync.util.Converter.updatePlayerData(Converter.java:55) ~[_added-invsync-v2.3.1.jar:?] at mrnavastar.invsync.InvSync.lambda$onInitialize$0(InvSync.java:64) ~[_added-invsync-v2.3.1.jar:?] at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$2(ServerPlayConnectionEvents.java:48) ~[fabric-networking-api-v1-1.1.0+442de8b8a9-4071c58cedb5d399.jar:?] at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.onClientReady(ServerPlayNetworkAddon.java:65) ~[fabric-networking-api-v1-1.1.0+442de8b8a9-4071c58cedb5d399.jar:?] at net.minecraft.class_3324.handler$cka000$handlePlayerConnection(class_3324.java:10492) ~[server-intermediary.jar:?] at net.minecraft.class_3324.method_14570(class_3324.java:197) ~[server-intermediary.jar:?] at net.minecraft.class_3248.method_33800(class_3248.java:140) ~[server-intermediary.jar:?] at net.minecraft.class_3248.method_14384(class_3248.java:127) ~[server-intermediary.jar:?] at net.minecraft.class_3248.redirect$ckb000$handlePlayerJoin(class_3248.java:563) ~[server-intermediary.jar:?] at net.minecraft.class_3248.method_18785(class_3248.java:77) ~[server-intermediary.jar:?] at net.minecraft.class_2535.method_10754(class_2535.java:242) ~[server-intermediary.jar:?] at net.minecraft.class_3242.method_14357(class_3242.java:182) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:886) ~[server-intermediary.jar:?] at net.minecraft.class_3176.method_3813(class_3176.java:289) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:258) ~[server-intermediary.jar:?] at java.lang.Thread.run(Thread.java:833) [?:?]
I just wish you my thanks for this mod and the big work on him.
Im using it on survival server with one server is using terralith as world gen datapack and the other using William's overhauled. It's just perfect !
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
gradle.properties
settings.gradle
build.gradle
fabric-loom 0.12.55
gradle/wrapper/gradle-wrapper.properties
gradle 7.5
Not a bug but still can be an issue. Also This mod size of huge, I know it's because sql library but maybe you can cut unused parts of it?
I noticed another serious error, when restarting the server, things from the players' inventories disappear.
How about syncing statistics? :)
https://minecraft.fandom.com/wiki/Statistics
Statistics are stored in .minecraft/saves//stats/.json (/stats/.json on servers). They keep track of these stats. The file structure is JSON based.
It would be great to add support FTB mods to sync quests and teams
Actually the problem is when running the last compiled version v2.1 - 1.18.
Is it because I use MariaBD?
> [21:36:50] [main/INFO]: [InvSync] Initializing...
> [21:36:51] [ForkJoinPool.commonPool-worker-1/INFO]: Essential Commands is up to date!
> [21:36:51] [main/INFO]: [STDERR]: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXCLUSIVE' at line 1
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:768)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:653)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.beginTransaction(SqlManager.java:50)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.beginTransaction(Table.java:49)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.addToDatabase(Table.java:28)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.Database.add(Database.java:25)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.Database.createTable(Database.java:32)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.onInitialize(InvSync.java:42)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62)
> [21:36:51] [main/INFO]: [STDERR]: at net.minecraft.server.Main.main(Main.java:102)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:599)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:66)
> [21:36:51] [main/INFO]: [STDERR]: java.sql.SQLSyntaxErrorException: BLOB/TEXT column 'ID' used in key specification without a key length
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1031)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.createTable(SqlManager.java:74)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.addToDatabase(Table.java:29)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.Database.add(Database.java:25)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.Database.createTable(Database.java:32)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.onInitialize(InvSync.java:42)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62)
> [21:36:51] [main/INFO]: [STDERR]: at net.minecraft.server.Main.main(Main.java:102)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:599)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:66)
> [21:36:51] [main/INFO]: [STDERR]: java.sql.SQLSyntaxErrorException: Table 'Minecraft.PlayerData' doesn't exist
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
> [21:36:51] [main/INFO]: [STDERR]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1009)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.listIds(SqlManager.java:110)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.getIds(Table.java:66)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.addToDatabase(Table.java:31)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.Database.add(Database.java:25)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.Database.createTable(Database.java:32)
> [21:36:51] [main/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.onInitialize(InvSync.java:42)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62)
> [21:36:51] [main/INFO]: [STDERR]: at net.minecraft.server.Main.main(Main.java:102)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:599)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [21:36:51] [main/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> [21:36:51] [main/INFO]: [STDERR]: at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:66)
> [21:36:51] [main/INFO]: [InvSync] Complete!
>
When InvSync is added to an existed server, player data will be cleared since there's nothing in the database.
So please add checks to protect existed player data when FETCH.
It seems that if (playerData != null)
in FETCH doesn't work?
Trying to get the latest build working on my 1.18.1 Fabric server.
I haven't been able to get the SQL script to create the tables. Do you have a list of tables needed in MYSQL to work? Or a possible workaround? Ik there is SQLITE but I can't even get the server to start when set to SQLite.
latest (1).log
When I join the B server,the player data in A server didn't save yet,so I will read the old player data in B server
The way this mod works with MySQL, does it also sync up with spigot plugins such as HuskSync or InventorySaver?
It would be very helpful if you could build a release for Minecraft version 1.19.4
Cheers!
[16:36:51] [Server thread/INFO]: [STDERR]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: PlayerData)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.newSQLException(DB.java:1012)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.newSQLException(DB.java:1024)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.throwex(DB.java:989)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.NativeDB.prepare(NativeDB.java:134)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.prepare(DB.java:257)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.jdbc3.JDBC3Statement.executeQuery(JDBC3Statement.java:66)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.sql.SQLHandler.executeStatementAndReturn(SQLHandler.java:58)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.sql.SQLHandler.loadString(SQLHandler.java:94)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.sql.Table.get(Table.java:67)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.conversion.PlayerDataConversion.sqlToNbt(PlayerDataConversion.java:111)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.setup.PlayerDataSetup.lambda$start$0(PlayerDataSetup.java:20)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.api.event.PlayerJoinCallback.lambda$static$0(PlayerJoinCallback.java:12)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3324.handler$zie000$onPlayerJoin(class_3324.java:2422)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3324.method_14570(class_3324.java:273)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.method_33800(class_3248.java:129)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.method_14384(class_3248.java:117)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.handler$zgi000$overwriteAcceptPlayer(class_3248.java:554)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.method_18785(class_3248.java:67)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2535.method_10754(class_2535.java:234)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3242.method_14357(class_3242.java:183)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:904)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3176.method_3813(class_3176.java:334)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:833)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:692)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:274)
[16:36:51] [Server thread/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:831)
[16:36:51] [Server thread/INFO]: [STDERR]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: PlayerData)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.newSQLException(DB.java:1012)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.newSQLException(DB.java:1024)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.throwex(DB.java:989)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.NativeDB.prepare(NativeDB.java:134)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.core.DB.prepare(DB.java:257)
[16:36:51] [Server thread/INFO]: [STDERR]: at org.sqlite.jdbc3.JDBC3Statement.executeQuery(JDBC3Statement.java:66)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.sql.SQLHandler.executeStatementAndReturn(SQLHandler.java:58)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.sql.SQLHandler.loadString(SQLHandler.java:94)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.sql.Table.get(Table.java:67)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.conversion.PlayerDataConversion.sqlToNbt(PlayerDataConversion.java:116)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.setup.PlayerDataSetup.lambda$start$0(PlayerDataSetup.java:20)
[16:36:51] [Server thread/INFO]: [STDERR]: at com.mrnavastar.invsync.api.event.PlayerJoinCallback.lambda$static$0(PlayerJoinCallback.java:12)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3324.handler$zie000$onPlayerJoin(class_3324.java:2422)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3324.method_14570(class_3324.java:273)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.method_33800(class_3248.java:129)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.method_14384(class_3248.java:117)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.handler$zgi000$overwriteAcceptPlayer(class_3248.java:554)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3248.method_18785(class_3248.java:67)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2535.method_10754(class_2535.java:234)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3242.method_14357(class_3242.java:183)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:904)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3176.method_3813(class_3176.java:334)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:833)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:692)
[16:36:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:274)
[16:36:51] [Server thread/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:831)
[16:36:51] [Server thread/INFO]: [invsync] Getting Player Data From database
When trying the mod on a fresh server, I have a database connection closed
error message when a player disconnect.
It happens if the player connect and disconnect before the saveAll method is called.
I'm using SQLite, it correctly generates the database but it can't write the player infos in it.
After investigations, it seems to be caused by these lines in InvSync.java:
if (playerDataContainer == null) {
playerDataContainer = playerData.createDataContainer(player.getUuid());
playerData.put(playerDataContainer);
}
When looking at the methods in Table class of SQLib, we can see that the call to put
with the playerDataContainer
will call this.drop
. But in the drop
method there is a call to this.database.disconnect()
. So when we return in the put
method, the call to SqlManager.createRow
failed because the connection was disconnected in drop
.
public DataContainer createDataContainer(String id) {
DataContainer dataContainer = new DataContainer(id);
this.put(dataContainer);
return dataContainer;
}
public void put(DataContainer dataContainer) {
if (!this.isInTransaction) this.database.connect();
if (this.get(dataContainer.getId()) != null) this.drop(dataContainer);
SqlManager.createRow(this.name, dataContainer.getId());
this.dataContainers.add(dataContainer);
dataContainer.link(this, this.database);
if (!this.isInTransaction) this.database.disconnect();
}
public void drop(DataContainer dataContainer) {
if (!this.isInTransaction) this.database.connect();
SqlManager.deleteRow(this.getName(), dataContainer.getId());
dataContainer.link(null, null);
this.dataContainers.remove(dataContainer);
if (!this.isInTransaction) this.database.disconnect();
}
The call to playerData.put(playerDataContainer);
doesn't seems necessary since it's already done in the createDataContainer
method.
But maybe it's something which should be fixed in the SQLite library.
Don't know exactly :)
Here is the full log of the server when it fails
Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[16:41:06] [main/INFO]: Loading Minecraft 1.19.3 with Fabric Loader 0.14.12
[16:41:06] [ForkJoinPool-1-worker-3/WARN]: Mod invsync uses the version v2.3.2 which isn't compatible with Loader's extended semantic version format (Could not parse version number component 'v2'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[16:41:07] [main/INFO]: Loading 46 mods:
- fabric-api 0.72.0+1.19.3
- fabric-api-base 0.4.20+afca2f3e85 via fabric-api
- fabric-api-lookup-api-v1 1.6.19+49abcf7e85 via fabric-api
- fabric-biome-api-v1 12.1.0+b5d379b085 via fabric-api
- fabric-block-api-v1 1.0.4+e022e5d185 via fabric-api
- fabric-command-api-v1 1.2.21+f71b366f85 via fabric-api
- fabric-command-api-v2 2.2.0+3fc4752e85 via fabric-api
- fabric-commands-v0 0.2.38+df3654b385 via fabric-api
- fabric-containers-v0 0.1.46+df3654b385 via fabric-api
- fabric-content-registries-v0 3.5.0+1d37d50285 via fabric-api
- fabric-convention-tags-v1 1.2.1+8e4e694f85 via fabric-api
- fabric-crash-report-info-v1 0.2.13+aeb40ebe85 via fabric-api
- fabric-data-generation-api-v1 11.1.4+1134c5b885 via fabric-api
- fabric-dimensions-v1 2.1.40+48349a3f85 via fabric-api
- fabric-entity-events-v1 1.5.6+b83334a085 via fabric-api
- fabric-events-interaction-v0 0.4.39+3baeb27a85 via fabric-api
- fabric-events-lifecycle-v0 0.2.42+df3654b385 via fabric-api
- fabric-game-rule-api-v1 1.0.29+99f9db8085 via fabric-api
- fabric-item-api-v1 2.1.8+1134c5b885 via fabric-api
- fabric-item-group-api-v1 2.1.11+1134c5b885 via fabric-api
- fabric-lifecycle-events-v1 2.2.9+23a79c8a85 via fabric-api
- fabric-loot-api-v2 1.1.19+75e9821185 via fabric-api
- fabric-loot-tables-v1 1.1.23+9e7660c685 via fabric-api
- fabric-message-api-v1 5.0.13+6ede1da985 via fabric-api
- fabric-mining-level-api-v1 2.1.30+49abcf7e85 via fabric-api
- fabric-networking-api-v1 1.2.16+4017a8cb85 via fabric-api
- fabric-networking-v0 0.3.33+df3654b385 via fabric-api
- fabric-object-builder-api-v1 5.3.0+85f102ee85 via fabric-api
- fabric-particles-v1 1.0.19+f1e4495b85 via fabric-api
- fabric-recipe-api-v1 1.0.0+5176f73d85 via fabric-api
- fabric-registry-sync-v0 2.0.4+1134c5b885 via fabric-api
- fabric-rendering-data-attachment-v1 0.3.24+afca2f3e85 via fabric-api
- fabric-rendering-fluids-v1 3.0.17+f1e4495b85 via fabric-api
- fabric-resource-conditions-api-v1 2.2.2+1134c5b885 via fabric-api
- fabric-resource-loader-v0 0.10.4+a91e48b785 via fabric-api
- fabric-screen-handler-api-v1 1.3.12+99f9db8085 via fabric-api
- fabric-transfer-api-v1 2.1.14+ccd377ba85 via fabric-api
- fabric-transitive-access-wideners-v1 2.3.0+5b9a588b85 via fabric-api
- fabricloader 0.14.12
- invsync v2.3.2
- java 17
- microconfig 2.2.1 via invsync
- minecraft 1.19.3
- mysql_mysql-connector-java 8.0.30 via sqlib
- org_xerial_sqlite-jdbc 3.36.0.3 via sqlib
- sqlib 1.3.2 via invsync
[16:41:07] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/home/raveh/Minecraft%20Servers/Fabric%20Test/libraries/net/fabricmc/sponge-mixin/0.11.4+mixin.0.8.5/sponge-mixin-0.11.4+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[16:41:07] [main/INFO]: Compatibility level set to JAVA_16
[16:41:07] [main/INFO]: Compatibility level set to JAVA_17
[16:41:13] [main/INFO]: Building unoptimized datafixer
[16:41:15] [main/INFO]: [InvSync] Initializing...
[16:41:15] [main/INFO]: [InvSync] Database initialized successfully!
[16:41:15] [main/INFO]: [InvSync] Complete!
[16:41:15] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[16:41:16] [main/INFO]: Found new data pack fabric, loading it automatically
[16:41:18] [main/INFO]: Loaded 7 recipes
[16:41:18] [main/INFO]: Loaded 1179 advancements
[16:41:19] [main/INFO]: Applied 0 biome modifications to 0 of 63 new biomes in 4.531 ms
[16:41:19] [Server thread/INFO]: Starting minecraft server version 1.19.3
[16:41:19] [Server thread/INFO]: Loading properties
[16:41:19] [Server thread/INFO]: Default game type: SURVIVAL
[16:41:19] [Server thread/INFO]: Generating keypair
[16:41:19] [Server thread/INFO]: Starting Minecraft server on *:30067
[16:41:19] [Server thread/INFO]: Using epoll channel type
[16:41:19] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[16:41:19] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[16:41:19] [Server thread/WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
[16:41:19] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[16:41:19] [Server thread/INFO]: Preparing level "world"
[16:41:26] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[16:41:28] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[16:41:28] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[16:41:28] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[16:41:28] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[16:41:28] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[16:41:29] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[16:41:29] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[16:41:30] [Worker-Main-3/INFO]: Preparing spawn area: 1%
[16:41:30] [Worker-Main-2/INFO]: Preparing spawn area: 2%
[16:41:31] [Worker-Main-3/INFO]: Preparing spawn area: 3%
[16:41:31] [Worker-Main-2/INFO]: Preparing spawn area: 4%
[16:41:32] [Worker-Main-1/INFO]: Preparing spawn area: 5%
[16:41:32] [Worker-Main-2/INFO]: Preparing spawn area: 6%
[16:41:33] [Worker-Main-1/INFO]: Preparing spawn area: 6%
[16:41:33] [Worker-Main-1/INFO]: Preparing spawn area: 8%
[16:41:34] [Worker-Main-3/INFO]: Preparing spawn area: 9%
[16:41:34] [Worker-Main-3/INFO]: Preparing spawn area: 10%
[16:41:35] [Worker-Main-2/INFO]: Preparing spawn area: 11%
[16:41:35] [Worker-Main-3/INFO]: Preparing spawn area: 13%
[16:41:36] [Worker-Main-1/INFO]: Preparing spawn area: 15%
[16:41:36] [Worker-Main-1/INFO]: Preparing spawn area: 16%
[16:41:37] [Worker-Main-3/INFO]: Preparing spawn area: 17%
[16:41:37] [Worker-Main-1/INFO]: Preparing spawn area: 20%
[16:41:38] [Worker-Main-1/INFO]: Preparing spawn area: 22%
[16:41:38] [Worker-Main-3/INFO]: Preparing spawn area: 23%
[16:41:39] [Worker-Main-3/INFO]: Preparing spawn area: 25%
[16:41:39] [Worker-Main-1/INFO]: Preparing spawn area: 26%
[16:41:40] [Worker-Main-3/INFO]: Preparing spawn area: 28%
[16:41:40] [Worker-Main-1/INFO]: Preparing spawn area: 31%
[16:41:41] [Worker-Main-2/INFO]: Preparing spawn area: 32%
[16:41:41] [Worker-Main-3/INFO]: Preparing spawn area: 34%
[16:41:44] [Worker-Main-1/INFO]: Preparing spawn area: 35%
[16:41:44] [Worker-Main-1/INFO]: Preparing spawn area: 35%
[16:41:44] [Worker-Main-1/INFO]: Preparing spawn area: 35%
[16:41:44] [Worker-Main-1/INFO]: Preparing spawn area: 35%
[16:41:44] [Worker-Main-1/INFO]: Preparing spawn area: 36%
[16:41:44] [Worker-Main-1/INFO]: Preparing spawn area: 38%
[16:41:45] [Worker-Main-2/INFO]: Preparing spawn area: 40%
[16:41:45] [Worker-Main-3/INFO]: Preparing spawn area: 42%
[16:41:46] [Worker-Main-3/INFO]: Preparing spawn area: 44%
[16:41:46] [Worker-Main-3/INFO]: Preparing spawn area: 46%
[16:41:47] [Worker-Main-2/INFO]: Preparing spawn area: 49%
[16:41:47] [Worker-Main-2/INFO]: Preparing spawn area: 51%
[16:41:48] [Worker-Main-1/INFO]: Preparing spawn area: 54%
[16:41:48] [Worker-Main-2/INFO]: Preparing spawn area: 55%
[16:41:49] [Worker-Main-2/INFO]: Preparing spawn area: 56%
[16:41:49] [Worker-Main-3/INFO]: Preparing spawn area: 58%
[16:41:50] [Worker-Main-3/INFO]: Preparing spawn area: 61%
[16:41:50] [Worker-Main-2/INFO]: Preparing spawn area: 63%
[16:41:51] [Worker-Main-2/INFO]: Preparing spawn area: 66%
[16:41:51] [Worker-Main-1/INFO]: Preparing spawn area: 68%
[16:41:52] [Worker-Main-1/INFO]: Preparing spawn area: 70%
[16:41:52] [Worker-Main-1/INFO]: Preparing spawn area: 72%
[16:41:53] [Worker-Main-2/INFO]: Preparing spawn area: 75%
[16:41:53] [Worker-Main-1/INFO]: Preparing spawn area: 77%
[16:41:54] [Worker-Main-2/INFO]: Preparing spawn area: 80%
[16:41:54] [Worker-Main-1/INFO]: Preparing spawn area: 83%
[16:41:55] [Worker-Main-3/INFO]: Preparing spawn area: 84%
[16:41:55] [Worker-Main-2/INFO]: Preparing spawn area: 86%
[16:41:56] [Worker-Main-3/INFO]: Preparing spawn area: 88%
[16:41:56] [Worker-Main-2/INFO]: Preparing spawn area: 91%
[16:41:57] [Worker-Main-2/INFO]: Preparing spawn area: 94%
[16:41:57] [Worker-Main-2/INFO]: Preparing spawn area: 97%
[16:41:58] [Server thread/INFO]: Time elapsed: 31447 ms
[16:41:58] [Server thread/INFO]: Done (38.828s)! For help, type "help"
[16:42:02] [Server thread/INFO]: XXXXXX[/127.0.0.1:37534] logged in with entity id 189 at (6.5, 78.0, -20.5)
[16:42:02] [Server thread/INFO]: XXXXXX joined the game
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: java.sql.SQLException: database connection closed
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.SQLiteConnection.checkOpen(SQLiteConnection.java:399)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:32)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.createRow(SqlManager.java:97)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.put(Table.java:100)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.lambda$onInitialize$3(InvSync.java:78)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$4(ServerPlayConnectionEvents.java:59)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.invokeDisconnectEvent(ServerPlayNetworkAddon.java:140)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.AbstractNetworkAddon.handleDisconnect(AbstractNetworkAddon.java:131)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.minecraft.class_2535.handler$zdi000$handleDisconnect(class_2535.java:593)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.minecraft.class_2535.channelInactive(class_2535.java)
[16:42:09] [Server thread/INFO]: XXXXXX lost connection: Disconnected
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Server thread/INFO]: XXXXXX left the game
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:401)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:366)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:401)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:366)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:401)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:366)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.timeout.IdleStateHandler.channelInactive(IdleStateHandler.java:277)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: java.sql.SQLException: ResultSet closed
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.core.CoreResultSet.checkOpen(CoreResultSet.java:76)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:39)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at org.sqlite.jdbc3.JDBC3ResultSet.getString(JDBC3ResultSet.java:446)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.readJson(SqlManager.java:143)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.api.DataContainer.getFromDatabase(DataContainer.java:76)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.api.DataContainer.put(DataContainer.java:120)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.invsync.services.CoreSyncProcedures.lambda$init$1(CoreSyncProcedures.java:21)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.invsync.api.ServerSyncEvents.lambda$static$2(ServerSyncEvents.java:20)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.lambda$onInitialize$3(InvSync.java:82)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$4(ServerPlayConnectionEvents.java:59)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.invokeDisconnectEvent(ServerPlayNetworkAddon.java:140)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.AbstractNetworkAddon.handleDisconnect(AbstractNetworkAddon.java:131)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.minecraft.class_2535.handler$zdi000$handleDisconnect(class_2535.java:593)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at net.minecraft.class_2535.channelInactive(class_2535.java)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:401)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:366)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:401)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:366)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:401)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:366)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.handler.timeout.IdleStateHandler.channelInactive(IdleStateHandler.java:277)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[16:42:09] [Netty Epoll Server IO #2/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833)
Is it possible to sync achievements?
I have not noticed any achievements in config.
Tried to manually create schema for MySQL provider. Works ok. Sometimes got log spam with these. Propable solution is to keep connection openned.
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:73)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1648)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1564)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.readJson(SqlManager.java:137)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at mrnavastar.sqlib.api.DataContainer.putIntoDatabase(DataContainer.java:56)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at mrnavastar.sqlib.api.DataContainer.put(DataContainer.java:116)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at mrnavastar.invsync.util.Converter.savePlayerData(Converter.java:101)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.lambda$onInitialize$1(InvSync.java:57)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$4(ServerPlayConnectionEvents.java:59)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.invokeDisconnectEvent(ServerPlayNetworkAddon.java:140)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.AbstractNetworkAddon.handleDisconnect(AbstractNetworkAddon.java:131)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at net.minecraft.class_2535.handler$cpg000$handleDisconnect(class_2535.java:1089)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at net.minecraft.class_2535.channelInactive(class_2535.java)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.handler.timeout.IdleStateHandler.channelInactive(IdleStateHandler.java:277)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:831)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Unknown Source)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: Caused by: com.mysql.cj.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.NativeSession.checkClosed(NativeSession.java:762)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:568)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1579)
[16:44:55] [Netty Epoll Server IO #4/INFO]: [STDERR]: ... 45 more
While the current intent is for this to be used on Fabric servers, as an SSP mod, this allows the game to have functions similar to Terraria. However, unlike Terraria, you can only have one instance of your player. Would be neat to be able to create multiple invsync instances, all with different inventories, which you can change between either by a mod menu config, or upon loading a world.
Pls, add names for servers and rules: Example: I have 5 servers: Lobby, 2 survivel server (Overworld and Nether) for Classic and 2 survivel for mod
s.
Items from & to Lobby - not sync, 2 classic - sync all in pair, but not from & to mod`s...
In config for Lobby:
[main]
DATABASE_TYPE=MYSQL
DATABASE_NAME=InvSync
SQLITE_DIRECTORY=/path/to/folder
MYSQL_ADDRESS=ip
MYSQL_PORT=port
MYSQL_USERNAME=invsync
MYSQL_PASSWORD=password
SERVER_NAME=survival_classic_nether
[default]
SYNC_CREATIVE_MODE=false
SYNC_INVENTORY=false
SYNC_ENDER_CHEST=false
SYNC_HEALTH=false
SYNC_FOOD_LEVEL=false
SYNC_XP_LEVEL=false
SYNC_SCORE=false
SYNC_STATUS_EFFECTS=false
SYNC_ADVANCEMENTS=true
[survival_classic_overvorld]
SYNC_CREATIVE_MODE=false
SYNC_INVENTORY=true
SYNC_ENDER_CHEST=true
SYNC_HEALTH=true
SYNC_FOOD_LEVEL=true
SYNC_XP_LEVEL=true
SYNC_SCORE=true
SYNC_STATUS_EFFECTS=true
SYNC_ADVANCEMENTS=true
As i see in code synchronization happens only on player disconnect. If server crashed or stopped data could be lost.
How to configure profiles?
I use mysql
Sorry my English is not good (Google Translate)
The Mod does not create the table correctly. I had to add the following table to the database:
CREATE TABLE InvSyncPlayerData (
ID text,
STRINGS text,
INTS text,
FLOATS text,
DOUBLES text,
JSON text,
NBT text
);
After this the SQLite Database worked, but the mysql version does not work:
[STDERR]: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXCLUSIVE' at line 1
[STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
[STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[STDERR]: at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:768)
[STDERR]: at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:653)
[STDERR]: at mrnavastar.sqlib.util.SqlManager.beginTransaction(SqlManager.java:50)
[STDERR]: at mrnavastar.sqlib.api.Table.beginTransaction(Table.java:49)
[STDERR]: at mrnavastar.sqlib.api.Table.addToDatabase(Table.java:28)
[STDERR]: at mrnavastar.sqlib.api.databases.Database.add(Database.java:25)
[STDERR]: at mrnavastar.sqlib.api.databases.Database.createTable(Database.java:32)
[STDERR]: at mrnavastar.invsync.InvSync.onInitialize(InvSync.java:42)
Or after a player leaves:
[STDERR]: java.sql.SQLException: Illegal operation on empty result set.
[STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[STDERR]: at com.mysql.cj.jdbc.result.ResultSetImpl.checkRowPos(ResultSetImpl.java:517)
[STDERR]: at com.mysql.cj.jdbc.result.ResultSetImpl.getString(ResultSetImpl.java:870)
[STDERR]: at com.mysql.cj.jdbc.result.ResultSetImpl.getString(ResultSetImpl.java:888)
[STDERR]: at mrnavastar.sqlib.util.SqlManager.readJson(SqlManager.java:128)
[STDERR]: at mrnavastar.sqlib.api.DataContainer.putIntoDatabase(DataContainer.java:56)
[STDERR]: at mrnavastar.sqlib.api.DataContainer.put(DataContainer.java:92)
[STDERR]: at mrnavastar.invsync.util.Converter.savePlayerData(Converter.java:80)
[STDERR]: at mrnavastar.invsync.InvSync.lambda$onInitialize$1(InvSync.java:60)
Is this caused by a newer Mysql version? This might belong into the sqlib repository.
Or is this only occuring on my end?
1.20.1 Support please!
Is this mod working in a single-player world, what I mean is syncing inventory between two or more different worlds from separate devices. For example, two worlds in two separate devices with two different users and MC accounts frequently join each other world via LAN or "LAN" with third-party mod while bringing their own inventory/playerdata. Is it works like that?
Using this as an SSP mod is great and allows the game to be played similarly to Terraria in that you can have multiple worlds and haul your items around all of them, however the items are carried even between creative mode. Would be useful/helpful to have the option to ignore Creative mode items.
Hello MrNavaStar,
sadly I have the problems with my server. (It crashes once a while)
When It crashes it reverts the players inventory to when he/she logged on.
Can you add an option to save at intervals in stead of only when logging in/out.
Thank you in advance.
Maybe because writeAdvancementData
modifies advancementToProgress
(or other LinkedHashMap
s) while PlayerAdvancementTracker/sendUpdate
is reading it with iterator.
Caused
Description: Ticking entity
java.util.ConcurrentModificationException
at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756)
at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:778)
at net.minecraft.class_2985.method_12876(class_2985.java:285)
at net.minecraft.class_3222.method_5773(class_3222.java:428)
at net.minecraft.class_3218.method_18762(class_3218.java:621)
at net.minecraft.class_1937.method_18472(class_1937.java:561)
at net.minecraft.class_3218.method_18765(class_3218.java:411)
at net.minecraft.server.MinecraftServer.redirect$zkm000$ficUpdateSuppressionCrashTick(MinecraftServer.java:3711)
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:871)
at net.minecraft.class_3176.method_3813(class_3176.java:312)
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:811)
at net.minecraft.server.MinecraftServer.handler$zbc000$modifiedRunLoop(MinecraftServer.java:2810)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:651)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
at java.base/java.lang.Thread.run(Thread.java:833)
Just hit a fatal issue when switching servers: (via /server )
[18:54:05] [Netty Server IO #2/ERROR]: [SQLib] Failed to connect to database! Is there already a connection open?
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: java.sql.SQLNonTransientConnectionException: Too many connections
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:683)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.util.SqlManager.connectMYSQL(SqlManager.java:29)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.api.databases.MySQLDatabase.connect(MySQLDatabase.java:28)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at mrnavastar.sqlib.api.Table.beginTransaction(Table.java:48)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at mrnavastar.invsync.InvSync.lambda$onInitialize$1(InvSync.java:72)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$4(ServerPlayConnectionEvents.java:59)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.invokeDisconnectEvent(ServerPlayNetworkAddon.java:140)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at net.fabricmc.fabric.impl.networking.AbstractNetworkAddon.handleDisconnect(AbstractNetworkAddon.java:131)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at net.minecraft.class_2535.handler$zna000$handleDisconnect(class_2535.java:1593)
[18:54:05] [Netty Server IO #2/INFO]: [STDERR]: at net.minecraft.class_2535.channelInactive(class_2535.java)
and not I can't even log into the Lobby
I have both server configured identically (copy pasted the file from one to the other)
MC version: 1.19.2
Fabric API: fabric-api 0.62.0+1.19.2
invsync v2.3.1
Fabric 0.14.9
Anything else that will help let me know.
It seems that because of this decision with sleep
on every connection server just freeze for 1 second and have TPS drops.
status effects only get added - never removed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.