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

Spectator mode handling #37

Open
zankia opened this issue May 26, 2016 · 1 comment
Open

Spectator mode handling #37

zankia opened this issue May 26, 2016 · 1 comment

Comments

@zankia
Copy link

zankia commented May 26, 2016

Hello,

I have this error when a player in spectator mode goes to another world

[19:04:52 WARN]: java.sql.SQLException: Data truncated for column 'inv_gamemode' at row 1
[19:04:52 WARN]:        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:959)
[19:04:52 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
[19:04:52 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
[19:04:52 WARN]:        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
[19:04:52 WARN]:        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
[19:04:52 WARN]:        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
[19:04:52 WARN]:        at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1541)
[19:04:52 WARN]:        at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2605)
[19:04:52 WARN]:        at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1469)
[19:04:52 WARN]:        at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.run(SqlConnector.java:800)
[19:04:52 WARN]:        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71)
[19:04:52 WARN]:        at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[19:04:52 WARN]:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[19:04:52 WARN]:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[19:04:52 WARN]:        at java.lang.Thread.run(Thread.java:745)

There is no value SPECTATOR in inv_gamemode column in MySQL

@zankia
Copy link
Author

zankia commented Jun 3, 2016

This could be corrected with this in SqlConnector:355

"`inv_gamemode` ENUM('ADVENTURE','CREATIVE','SURVIVAL','SPECTATOR') CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL COMMENT 'ADVENTURE, CREATIVE SURVIVAL or SPECTATOR game mode.', "

note that enum in MySQL is quite bad...

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

No branches or pull requests

1 participant