Ban Management

Ban Management

193k Downloads

Muting/Banning offline players

TPNils opened this issue · 5 comments

commented

When i am trying to do something with offline players, an error will always be thrown.
Our server has minecraft version 1.7.10, using Cauldron and hooked into bungee, using the latest public build 5.4.1.

[12:18:57] [Craft Scheduler Thread - 49/INFO]: [BanManager] Requesting UUIDs for Psycho2890
[12:18:58] [Craft Scheduler Thread - 49/WARN]: java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerData@50c00a3f: INSERT INTO bm_players (id ,name ,ip ,lastSeen ) VALUES (?,?,?,?)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.storage.PlayerStorage.retrieve(PlayerStorage.java:195)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.commands.BanCommand$1.run(BanCommand.java:102)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at java.lang.Thread.run(Thread.java:745)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '\xD1\xE5\xA8\xD6\x94\xF5L\x83\xBE\xA6~\x1C&\xA8\xAC\xD5' for key 'PRIMARY'
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:382)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
[12:18:58] [Craft Scheduler Thread - 49/WARN]: ... 9 more
[12:18:58] [Craft Scheduler Thread - 49/INFO]: �[0;31;1mPsycho2890 not found, are you sure they exist?�[m

commented

The server.properties is using offline mode, spigot has bungee enabled which should convert to back to online mode (i dont know why they made it that complaicated... bungee wont conect to online mode servers)

"using the latest public build 5.4.1", i am using the 5.4.1 version of BanManager, sorry if i was not clear on that part

commented

Are you running in offline mode? Which version of BanManager are you using?

commented

Can you run a query on your bm_players table for the name Psycho2890 and check how many results return? From the stack trace, I'm going to assume more than one.

commented

Yes it does. This is an issue we have created ourselves then. Thank you to help me out.

In case you wonder, for some reason one of our servers is in offline mode (even with bungee) while all the others are in online mode. Its 100% our fault, sorry to bother you with it

commented

No worries, I'm glad you got it fixed :)