Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore messages option to Account database (Resolves #575) #602

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

diegonighty
Copy link

@diegonighty diegonighty commented Jul 11, 2024

With this pr the plugin will be able to persist the option to ignore messages.


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


Copy link
Member

@Phoenix616 Phoenix616 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this with an existing setup? Because I get a lot of errors when running the command in my test server. It looks like you forgot to add the column to the database?

[21:51:13 INFO]: Phoenix616 issued server command: /cstoggle
[21:51:13 WARN]: [ChestShop] Error while getting account for 83688181-ce68-4136-918b-15e88ec2c705:
java.sql.SQLException: no such column: 'ignoreMessages'
	at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseResults.findColumn(JdbcDatabaseResults.java:102) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.field.FieldType.resultToJava(FieldType.java:848) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:62) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:109) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:398) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.Where.queryForFirst(Where.java:533) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.lambda$getAccount$0(NameManager.java:106) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.Breeze.Collection.SimpleCache.get(SimpleCache.java:34) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getAccount(NameManager.java:104) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:88) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:51:13 WARN]: [ChestShop] Error while searching for latest account of Phoenix616/83688181-ce68-4136-918b-15e88ec2c705:
java.sql.SQLException: no such column: 'ignoreMessages'
	at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseResults.findColumn(JdbcDatabaseResults.java:102) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.field.FieldType.resultToJava(FieldType.java:848) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:62) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:109) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:398) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.Where.queryForFirst(Where.java:533) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.storeUsername(NameManager.java:236) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:90) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:51:13 WARN]: [ChestShop] Error while getting account for Phoenix616:
java.sql.SQLException: no such column: 'ignoreMessages'
	at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseResults.findColumn(JdbcDatabaseResults.java:102) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.field.FieldType.resultToJava(FieldType.java:848) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:62) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:109) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:398) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.Where.queryForFirst(Where.java:533) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.lambda$getAccountFromShortName$2(NameManager.java:180) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.Breeze.Collection.SimpleCache.get(SimpleCache.java:34) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getAccountFromShortName(NameManager.java:178) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getNewShortenedName(NameManager.java:270) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.storeUsername(NameManager.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:90) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:51:13 WARN]: [ChestShop] Error while updating account com.Acrobot.ChestShop.Database.Account@381dbf7e:
java.sql.SQLException: Unable to run update stmt on object com.Acrobot.ChestShop.Database.Account@381dbf7e: UPDATE `accounts` SET `name` = ?, `uuid` = ?, `lastSeen` = ?, `ignoreMessages` = ? WHERE `shortName` = ?
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.MappedUpdate.update(MappedUpdate.java:131) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.update(StatementExecutor.java:478) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:418) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.createOrUpdate(BaseDaoImpl.java:399) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.storeUsername(NameManager.java:247) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:90) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such column: ignoreMessages)
	at org.sqlite.core.DB.newSQLException(DB.java:1179) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.DB.newSQLException(DB.java:1190) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.DB.throwex(DB.java:1150) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.NativeDB.prepare_utf8(Native Method) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.NativeDB.prepare(NativeDB.java:132) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.DB.prepare(DB.java:264) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:46) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:32) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:34) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:225) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseConnection.update(JdbcDatabaseConnection.java:294) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseConnection.update(JdbcDatabaseConnection.java:214) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.MappedUpdate.update(MappedUpdate.java:103) ~[ChestShop.jar:?]
	... 35 more
[21:51:13 ERROR]: Command exception: /cstoggle
org.bukkit.command.CommandException: Unhandled exception executing command 'cstoggle' in plugin ChestShop v3.12.3-SNAPSHOT (compiled at 2024-08-03T20:43:12Z)
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "com.Acrobot.ChestShop.Database.Account.isIgnoringMessages()" because "account" is null
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:33) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	... 27 more

@Phoenix616 Phoenix616 changed the title Add ignore messages option to Account database Add ignore messages option to Account database (Resolves #575) Aug 3, 2024
@diegonighty
Copy link
Author

Have you tested this with an existing setup? Because I get a lot of errors when running the command in my test server. It looks like you forgot to add the column to the database?

[21:51:13 INFO]: Phoenix616 issued server command: /cstoggle
[21:51:13 WARN]: [ChestShop] Error while getting account for 83688181-ce68-4136-918b-15e88ec2c705:
java.sql.SQLException: no such column: 'ignoreMessages'
	at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseResults.findColumn(JdbcDatabaseResults.java:102) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.field.FieldType.resultToJava(FieldType.java:848) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:62) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:109) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:398) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.Where.queryForFirst(Where.java:533) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.lambda$getAccount$0(NameManager.java:106) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.Breeze.Collection.SimpleCache.get(SimpleCache.java:34) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getAccount(NameManager.java:104) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:88) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:51:13 WARN]: [ChestShop] Error while searching for latest account of Phoenix616/83688181-ce68-4136-918b-15e88ec2c705:
java.sql.SQLException: no such column: 'ignoreMessages'
	at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseResults.findColumn(JdbcDatabaseResults.java:102) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.field.FieldType.resultToJava(FieldType.java:848) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:62) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:109) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:398) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.Where.queryForFirst(Where.java:533) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.storeUsername(NameManager.java:236) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:90) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:51:13 WARN]: [ChestShop] Error while getting account for Phoenix616:
java.sql.SQLException: no such column: 'ignoreMessages'
	at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseResults.findColumn(JdbcDatabaseResults.java:102) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.field.FieldType.resultToJava(FieldType.java:848) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:62) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:109) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.QueryBuilder.queryForFirst(QueryBuilder.java:398) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.Where.queryForFirst(Where.java:533) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.lambda$getAccountFromShortName$2(NameManager.java:180) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.Breeze.Collection.SimpleCache.get(SimpleCache.java:34) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getAccountFromShortName(NameManager.java:178) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getNewShortenedName(NameManager.java:270) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.storeUsername(NameManager.java:242) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:90) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:51:13 WARN]: [ChestShop] Error while updating account com.Acrobot.ChestShop.Database.Account@381dbf7e:
java.sql.SQLException: Unable to run update stmt on object com.Acrobot.ChestShop.Database.Account@381dbf7e: UPDATE `accounts` SET `name` = ?, `uuid` = ?, `lastSeen` = ?, `ignoreMessages` = ? WHERE `shortName` = ?
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.MappedUpdate.update(MappedUpdate.java:131) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.StatementExecutor.update(StatementExecutor.java:478) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:418) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.dao.BaseDaoImpl.createOrUpdate(BaseDaoImpl.java:399) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.storeUsername(NameManager.java:247) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:90) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.UUIDs.NameManager.getOrCreateAccount(NameManager.java:73) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:32) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such column: ignoreMessages)
	at org.sqlite.core.DB.newSQLException(DB.java:1179) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.DB.newSQLException(DB.java:1190) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.DB.throwex(DB.java:1150) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.NativeDB.prepare_utf8(Native Method) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.NativeDB.prepare(NativeDB.java:132) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.DB.prepare(DB.java:264) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:46) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:32) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:34) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:225) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205) ~[sqlite-jdbc-3.46.0.0.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseConnection.update(JdbcDatabaseConnection.java:294) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.jdbc.JdbcDatabaseConnection.update(JdbcDatabaseConnection.java:214) ~[ChestShop.jar:?]
	at ChestShop.jar/com.Acrobot.ChestShop.Libs.ORMlite.stmt.mapped.MappedUpdate.update(MappedUpdate.java:103) ~[ChestShop.jar:?]
	... 35 more
[21:51:13 ERROR]: Command exception: /cstoggle
org.bukkit.command.CommandException: Unhandled exception executing command 'cstoggle' in plugin ChestShop v3.12.3-SNAPSHOT (compiled at 2024-08-03T20:43:12Z)
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.jar:1.21-111-66165f7]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1536) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1513) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1506) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1465) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1472) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1317) ~[paper-1.21.jar:1.21-111-66165f7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-111-66165f7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "com.Acrobot.ChestShop.Database.Account.isIgnoringMessages()" because "account" is null
	at ChestShop.jar/com.Acrobot.ChestShop.Commands.Toggle.onCommand(Toggle.java:33) ~[ChestShop.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
	... 27 more

Woops my bad, I forgot to add the database migrations 🤣, now it should work with the existing setups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants