frengor / UltimateAdvancementAPI

A powerful API to create custom advancements for your Minecraft server.
https://modrinth.com/plugin/ultimateadvancementapi
GNU General Public License v3.0
74 stars 5 forks source link

Error in console when player joining #52

Closed envizar closed 11 months ago

envizar commented 11 months ago
[07:13:06 ERROR]: [UltimateAdvancementAPI] [STDERR] Cannot load player Envizar:
[07:13:06 WARN]: Nag author(s): '[fren_gor, EscanorTargaryen]' of 'UltimateAdvancementAPI v2.2.6' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[07:13:06 WARN]: java.sql.SQLFeatureNotSupportedException: not implemented by SQLite JDBC driver
[07:13:06 WARN]:        at org.sqlite.jdbc3.JDBC3PreparedStatement.unsupported(JDBC3PreparedStatement.java:448)
[07:13:06 WARN]:        at org.sqlite.jdbc3.JDBC3Statement.getGeneratedKeys(JDBC3Statement.java:357)
[07:13:06 WARN]:        at UltimateAdvancementAPI-Plugin-2.2.6(1).jar//com.fren_gor.ultimateAdvancementAPI.database.impl.SQLite.loadOrRegisterPlayer(SQLite.java:179)
[07:13:06 WARN]:        at UltimateAdvancementAPI-Plugin-2.2.6(1).jar//com.fren_gor.ultimateAdvancementAPI.database.DatabaseManager.loadOrRegisterPlayer(DatabaseManager.java:270)
[07:13:06 WARN]:        at UltimateAdvancementAPI-Plugin-2.2.6(1).jar//com.fren_gor.ultimateAdvancementAPI.database.DatabaseManager.loadPlayerMainFunction(DatabaseManager.java:227)
[07:13:06 WARN]:        at UltimateAdvancementAPI-Plugin-2.2.6(1).jar//com.fren_gor.ultimateAdvancementAPI.database.DatabaseManager.lambda$commonSetUp$1(DatabaseManager.java:152)
[07:13:06 WARN]:        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
[07:13:06 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1623)

On Paper 1.20.2

frengor commented 11 months ago

This is a problem with the new version of the SQLite java driver bundled with Spigot 1.20.2, which doesn't support anymore returning the generated keys. More information can be found on the Spigot Jira issue.

This affects only new players which are not already registered in the SQLite database and moving a player into a new team (i.e. the method movePlayerInNewTeam).

Since the driver could get downgraded to the old version (which supports returning the generated keys), I think that waiting for the first stable release of Spigot 1.20.2 is the best thing to do here. In case it doesn't, a simple fix could be made and released.

frengor commented 11 months ago

The SQLite java driver has been downgraded to the old version, so this shouldn't happen anymore in the new Spigot builds.