From 9a6bfa143a2cf0f1160b8f21e44ae75b0d7eabab Mon Sep 17 00:00:00 2001 From: Alastair Date: Fri, 5 Jan 2018 20:56:09 +0000 Subject: [PATCH] removed all bukkit references --- src/com/sekwah/advancedportals/core/util/Lang.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/com/sekwah/advancedportals/core/util/Lang.java b/src/com/sekwah/advancedportals/core/util/Lang.java index c480d49..73383f5 100644 --- a/src/com/sekwah/advancedportals/core/util/Lang.java +++ b/src/com/sekwah/advancedportals/core/util/Lang.java @@ -1,10 +1,9 @@ package com.sekwah.advancedportals.core.util; -import com.google.common.collect.Maps; import com.sekwah.advancedportals.core.AdvancedPortalsCore; - import java.io.IOException; import java.io.InputStream; +import java.util.HashMap; import java.util.Map; import java.util.Scanner; @@ -21,7 +20,7 @@ import java.util.Scanner; public class Lang { private static final Lang instance = new Lang(); - private final Map languageMap = Maps.newHashMap(); + private final HashMap languageMap = new HashMap<>(); private final String DEFAULT_LANG = "en_GB"; public Lang() { @@ -84,7 +83,7 @@ public class Lang { private Map parseLang(InputStream inputStream) { Scanner scanner = new Scanner(inputStream, "UTF-8"); String line = getNextLine(scanner); - Map newMap = Maps.newHashMap(); + HashMap newMap = new HashMap<>(); while (scanner != null && line != null) { //System.out.println(line); if (!line.startsWith("#") && line.indexOf('=') > -1) { @@ -94,7 +93,6 @@ public class Lang { newMap.put(key, value); } line = getNextLine(scanner); - // TODO add split code at the first = and also conversion of strings/codes which are constants like colors. } try { inputStream.close();