CrucibleMC / Crucible

Crucible, a fork of Thermos, is a CraftBukkit and Forge server implementation for 1.7.10, providing the ability to load both Forge mods and Bukkit plugins alongside each other.
https://discord.gg/jWSTJ4d
GNU General Public License v3.0
184 stars 63 forks source link

Unicode character support #98

Closed sourcepowered closed 2 years ago

sourcepowered commented 2 years ago

There must be no Unicode characters in the configuration file, otherwise it will not load.

[23:30:18] [Server thread/ERROR]: Cannot load plugins\ClearLag\config.yml
org.bukkit.configuration.InvalidConfigurationException: unacceptable character '�' (0xFFFD) special characters are not allowed
in "<string>", position 12589
    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57) ~[YamlConfiguration.class:1.7.10-dev-ac4ba06]
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:226) ~[FileConfiguration.class:1.7.10-dev-ac4ba06]
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:169) ~[FileConfiguration.class:1.7.10-dev-ac4ba06]
    at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:180) [YamlConfiguration.class:1.7.10-dev-ac4ba06]
    at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:183) [JavaPlugin.class:1.7.10-dev-ac4ba06]
    at me.minebuilders.clearlag.config.ConfigHandler.<init>(ConfigHandler.java:64) [Clearlag.jar:?]
    at me.minebuilders.clearlag.Clearlag.onEnable(Clearlag.java:58) [Clearlag.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [JavaPlugin.class:1.7.10-dev-ac4ba06]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:362) [JavaPluginLoader.class:1.7.10-dev-ac4ba06]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:409) [SimplePluginManager.class:1.7.10-dev-ac4ba06]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:402) [CraftServer.class:1.7.10-dev-ac4ba06]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:336) [CraftServer.class:1.7.10-dev-ac4ba06]
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:514) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:488) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:448) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:336) [lt.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:640) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_311]
Caused by: org.yaml.snakeyaml.reader.ReaderException: special characters are not allowed
    at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:70) ~[StreamReader.class:?]
    at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:50) ~[StreamReader.class:?]
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:399) ~[Yaml.class:?]
    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) ~[YamlConfiguration.class:1.7.10-dev-ac4ba06]
    ... 17 more
EverNife commented 2 years ago

Can you give us the "plugins\ClearLag\config.yml" file ?

sourcepowered commented 2 years ago

It has some Chinese characters.

spannerman79 commented 2 years ago

What is your full start arg for Cruible?

sourcepowered commented 2 years ago
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=20 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=true -Daikars.new.flags=true -XX:+AggressiveOpts -XX:+UseCompressedOops -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true -noverify
spannerman79 commented 2 years ago

Add -Dfile.encoding=UTF-8 to your start arg.

EverNife commented 2 years ago

Try adding

-Dfile.encoding=UTF-8

EverNife commented 2 years ago

Add -Dfile.encoding=UTF-8 to your start arg.

ops