Update MCOptionUtils.java

This commit is contained in:
ArtDev 2021-07-01 23:51:59 +03:00 committed by GitHub
parent 2adc410ef8
commit b601dc3ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,12 +38,15 @@ public class MCOptionUtils
public static String get(String key){
if(mLineList.isEmpty()) load();
String searchedLine=null;
for(String line : mLineList){
if(line.startsWith(key + ":"))
return line.substring(line.indexOf(':') + 1);
if(line.startsWith(key + ":")) {
searchedLine = line;
break;
}
}
return null;
if(searchedLine != null) return searchedLine.substring(searchedLine.indexOf(':') + 1);
else return null;
}
public static void save() {