-
Notifications
You must be signed in to change notification settings - Fork 15
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
Tablist and MySQL #26
base: master
Are you sure you want to change the base?
Conversation
…essages sent from discord to game and from game to discord. The format will start to work as soon as a player has the same nickname in game and on discord and writes one chat message to the game chat.
Add possibility to show discord users in Minecraft tablist
try { | ||
Statement statement = DiscordMC.getConnection().createStatement(); | ||
String query = "INSERT INTO `DiscordMC_news`(`message`, `user`) " + | ||
"VALUES ('" + finalContent + "','" + nickname + "')"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled with a PreparedStatement to prevent SQL injection
Statement statement = null; | ||
|
||
try { | ||
connection.setAutoCommit(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not auto commit?
connection.commit(); | ||
|
||
} finally { | ||
connection.setAutoCommit(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why that?
Add posibility to have "news" channel on Discord. When user sends message to that channel, it is pushed to mysql database (to be shown on website).
Add posibility to show Discord users with set roles in the Minecraft tablist with configurable format