Describe the bug
Backpack contents don't save over SQL.
To Reproduce
Steps to reproduce the behavior:
Fill your backpack with certain items containing a lot of NBT.
Close your backpack. An exception will generate in console, but the player will not notice anything out of the usual.
Closing and reopening the backpack while still logged in shows the backpack contents (cached?), but if the player switches servers, or the server restarts, their backpack will be reverted to a previous state (removing their new items).
Expected behavior
The player retains their backpack contents.
[22:42:41 INFO]: [EpicBackpacks] Saving bb317801-c2c4-4e18-8e26-ee21e03f4c69 personal backpack to MySQL db
[22:42:41 WARN]: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'content' at row 1
[22:42:41 WARN]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)
[22:42:41 WARN]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
[22:42:41 WARN]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
[22:42:41 WARN]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
[22:42:41 WARN]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
[22:42:41 WARN]: at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
[22:42:41 WARN]: at EpicBackPacks_1.3.16-r5.jar//dev.lone.EpicBackpacks.main.y.run(SourceFile:128)
[22:42:41 WARN]: at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101)
[22:42:41 WARN]: at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[22:42:41 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[22:42:41 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[22:42:41 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[22:42:41 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[22:42:41 INFO]: [EpicBackpacks] [OK] Saved bb317801-c2c4-4e18-8e26-ee21e03f4c69 personal backpack to MySQL db
Here's an item with a lot of NBT. Items such as these seem to cause issues with the plugin. (generated from /paper dumpitem)
I'm able to put nine of these items into a backpack and it WILL save correctly. However, once I put any other items in after this, the exception appears and the backpack fails to save. The item itself isn't causing the problem, but the quantity of items with NBT. Unfortunately, there are a bunch of items on my server that have a lot of NBT applied to them (granted, not often as much as this), so the issue in people's backpacks being rolled back is a significant issue.
Describe the bug Backpack contents don't save over SQL.
To Reproduce Steps to reproduce the behavior:
Expected behavior The player retains their backpack contents.
Screenshots https://github.com/PluginBugs/Issues-EpicBackpacks/assets/43658058/c6f03950-bb13-4a1e-b3d7-67e8d69959d9 (An example of a backpack which didn't save)
Info (please complete the following information):
Additional context
Here's an item with a lot of NBT. Items such as these seem to cause issues with the plugin. (generated from /paper dumpitem)
I'm able to put nine of these items into a backpack and it WILL save correctly. However, once I put any other items in after this, the exception appears and the backpack fails to save. The item itself isn't causing the problem, but the quantity of items with NBT. Unfortunately, there are a bunch of items on my server that have a lot of NBT applied to them (granted, not often as much as this), so the issue in people's backpacks being rolled back is a significant issue.