forked from zhdev/griefus
Fixed MysqlDataTruncation error when logging custom skull data
This commit is contained in:
parent
377a6f55b9
commit
d18a023e73
3 changed files with 41 additions and 2 deletions
31
src/main/java/net/coreprotect/patch/script/__2_23_0.java
Normal file
31
src/main/java/net/coreprotect/patch/script/__2_23_0.java
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package net.coreprotect.patch.script;
|
||||
|
||||
import java.sql.Statement;
|
||||
|
||||
import net.coreprotect.config.Config;
|
||||
import net.coreprotect.config.ConfigHandler;
|
||||
import net.coreprotect.language.Phrase;
|
||||
import net.coreprotect.language.Selector;
|
||||
import net.coreprotect.utility.Chat;
|
||||
|
||||
public class __2_23_0 {
|
||||
|
||||
protected static boolean patch(Statement statement) {
|
||||
try {
|
||||
if (Config.getGlobal().MYSQL) {
|
||||
try {
|
||||
statement.executeUpdate("ALTER TABLE " + ConfigHandler.prefix + "skull MODIFY owner VARCHAR(255);");
|
||||
}
|
||||
catch (Exception e) {
|
||||
Chat.console(Phrase.build(Phrase.PATCH_SKIP_UPDATE, ConfigHandler.prefix + "skull", Selector.FIRST, Selector.FIRST));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue