Moderator commands not working
cameronlattz opened this issue · 11 comments
Everything starts up fine.
[03:56:41] [Server thread/INFO]: [BanManager] Enabling BanManager v5.9.0-SNAPSHOT
[03:56:41] [Server thread/WARN]: 45 [Server thread] INFO me.confuser.banmanager.internal.hikari.HikariDataSource - HikariPool-0 - is starting.
[03:56:41] [Server thread/INFO]: [BanManager] Loaded 0 bans into memory
[03:56:41] [Server thread/INFO]: [BanManager] Loaded 0 mutes into memory
[03:56:41] [Server thread/INFO]: [BanManager] Loaded 0 ip bans into memory
[03:56:41] [Server thread/INFO]: [BanManager] Loaded 0 ip mutes into memory
[03:56:41] [Server thread/INFO]: [BanManager] Loaded 0 ip range bans into memory
And I can import my vanilla ban files (this is definitely working as the database files became larger in bytes):
[04:30:50] [Server thread/INFO]: NonprofitProphet issued server command: /bmimport player
[04:30:50] [Craft Scheduler Thread - 42/INFO]: [BanManager] §aPlayer ban import started
[04:30:50] [Craft Scheduler Thread - 42/INFO]: [BanManager] §aPlayer ban import finished
But when I try to run most commands, nothing happens. From my testing, only /mute throws an error at all:
[04:32:16] [Server thread/INFO]: NonprofitProphet issued server command: /mute astonewow test
[04:32:16] [Craft Scheduler Thread - 33/WARN]: java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerMuteData@2b3f6fbe: INSERT INTO `bm_player_mutes` (`player_id` ,`reason` ,`actor_id` ,`created` ,`updated` ,`expires` ,`soft` ) VALUES (?,?,?,?,?,?,?)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.storage.PlayerMuteStorage.mute(PlayerMuteStorage.java:120)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.commands.MuteCommand$1.run(MuteCommand.java:153)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.lang.Thread.run(Thread.java:745)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'actor_id' cannot be null
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:382)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: ... 9 more
[04:32:16] [Server thread/INFO]: NonprofitProphet issued server command: /mute astonewow test
[04:32:16] [Craft Scheduler Thread - 33/WARN]: java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerMuteData@2b3f6fbe: INSERT INTO `bm_player_mutes` (`player_id` ,`reason` ,`actor_id` ,`created` ,`updated` ,`expires` ,`soft` ) VALUES (?,?,?,?,?,?,?)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.storage.PlayerMuteStorage.mute(PlayerMuteStorage.java:120)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.commands.MuteCommand$1.run(MuteCommand.java:153)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.lang.Thread.run(Thread.java:745)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'actor_id' cannot be null
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:382)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
[04:32:16] [Craft Scheduler Thread - 33/WARN]: ... 9 more
Finally, what mysql's SHOW GRANTS command returns:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY <password removed ofc> WITH GRANT OPTION
I'm running the latest snapshot of Spigot.
Any ideas? I would love to have this plugin
No, I don't have any plugin managers, I just drop the jar file into the plugins folder and restart my server. I can provide a list of plugins if necessary but I doubt there is a conflict, I have no similar plugins except Essentials and from a cursory Google search they seem to work together fine.
Is this still an issue @cameronlattz? Have you cleared your players table at all, or deleted anything manually?
I deleted the plugin because the bug didn't allow me to do bans and mutes and I need those commands. I'm just using Essentials for now, but I would love to have Ban Manager so that I can keep better track of who was punished.
I have not cleared my players table or deleted anything manually. All I did was install the plugin and then import players and IPs. From then on, only the import command did anything (I did not test the other commands before I imported so it's probable the commands didn't work even before the import).
Could you confirm if BM works before an import? If it does, I'd be interested in seeing your banned-players.txt file to see what is causing this.
Well, to my surprise it did work before importing!
Here are the banned players and IPs files, I had to zip them up because mine are JSON files (not TXT) and GitHub doesn't allow uploading JSON.
If the previous bans will still be in place (I assume they will be), I don't really need to import anything.
Thanks. Apologies I meant the JSON
files. My initial thoughts are it may be due to §f[§5Mod§f]
. I'll try and reproduce at the weekend.
Thanks! Will the bans I made with Essentials still be enforced without importing anything?
Also, I can easily do a find-and-replace on the JSON file to take those out, I'll try that out when my server is getting less players.
By the way, the tab completion no longer seems to work. This isn't a dealbreaker but it is inconvenient :(
Yes, Essentials manages it's own bans, BM doesn't affect other ban plugins.
Can you run the following query on your database and let me know the results?
SELECT * FROM `bm_players` WHERE name = 'NonprofitProphet'
Replace bm_players
obviously with whatever the name of the table is, as defined in your config.yml
file
I deleted the database when I reinstalled BM without importing, but I can run it again on a test server later today.
Were you able to test this again @cameronlattz?