-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed MysqlDataTruncation error when logging custom skull data
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |