diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 8 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index b0c2156a..3be51746 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -5,6 +5,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -76,8 +77,6 @@ import net.minecraft.server.EntityTracker; import net.minecraft.server.EnumDifficulty; import net.minecraft.server.EnumGamemode; import net.minecraft.server.ExceptionWorldConflict; -import net.minecraft.server.GameProfileBanEntry; -import net.minecraft.server.GameProfileBanList; import net.minecraft.server.Items; import net.minecraft.server.JsonListEntry; import net.minecraft.server.PlayerList; @@ -144,7 +143,6 @@ import org.bukkit.craftbukkit.updater.BukkitDLUpdaterService; import org.bukkit.craftbukkit.util.CraftIconCache; import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.DatFileFilter; -import org.bukkit.craftbukkit.util.MojangNameLookup; import org.bukkit.craftbukkit.util.Versioning; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; @@ -263,7 +261,7 @@ public final class CraftServer implements Server { configuration = YamlConfiguration.loadConfiguration(getConfigFile()); configuration.options().copyDefaults(true); - configuration.setDefaults(YamlConfiguration.loadConfiguration(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"))); + configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8))); ConfigurationSection legacyAlias = null; if (!configuration.isString("aliases")) { legacyAlias = configuration.getConfigurationSection("aliases"); @@ -275,7 +273,7 @@ public final class CraftServer implements Server { } commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile()); commandsConfiguration.options().copyDefaults(true); - commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"))); + commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8))); saveCommandsConfig(); // Migrate aliases from old file and add previously implicit $1- to pass all arguments diff --git a/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java b/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java index 60b8cbc8..60a6221b 100644 --- a/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java +++ b/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java @@ -6,8 +6,11 @@ import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.help.HelpTopic; +import com.google.common.base.Charsets; + import java.io.File; import java.io.IOException; +import java.io.InputStreamReader; import java.util.LinkedList; import java.util.List; import java.util.logging.Level; @@ -25,7 +28,7 @@ public class HelpYamlReader { this.server = server; File helpYamlFile = new File("help.yml"); - YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration(getClass().getClassLoader().getResourceAsStream("configurations/help.yml")); + YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/help.yml"), Charsets.UTF_8)); try { helpYaml = YamlConfiguration.loadConfiguration(helpYamlFile); |