real gamers use bufferedreader

This commit is contained in:
EvilSourcerer 2019-01-06 19:49:58 -05:00 committed by Brady
parent 8b6d621d20
commit 76427b8ecb

View File

@ -23,9 +23,14 @@ import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import java.awt.*; import java.awt.*;
import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.util.*; import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -37,9 +42,9 @@ public class SettingsUtil {
private static final Map<Class<?>, SettingsIO> map; private static final Map<Class<?>, SettingsIO> map;
public static void readAndApply(Settings settings) { public static void readAndApply(Settings settings) {
try (Scanner scan = new Scanner(settingsFile)) { try (BufferedReader scan = new BufferedReader(new FileReader(settingsFile))) {
while (scan.hasNextLine()) { String line;
String line = scan.nextLine(); while ((line = scan.readLine()) != null) {
if (line.isEmpty()) { if (line.isEmpty()) {
continue; continue;
} }