mirror of
https://github.com/JonasunderscoreJones/BetterConsoleMC.git
synced 2025-10-24 14:19:19 +02:00
fixed error on no newline
This commit is contained in:
parent
06fc172a6b
commit
1ed05887f8
1 changed files with 4 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ public class CmdConfigHandler {
|
|||
BufferedReader reader = new BufferedReader(new FileReader(path));
|
||||
int linecount = 1;
|
||||
String linecontent = reader.readLine();
|
||||
while (linecontent != null) {
|
||||
while (!linecontent.isEmpty()) {
|
||||
if (!linecontent.startsWith("#") || linecontent.equals("\n")) {
|
||||
try {
|
||||
commands.add(preRegisterCommands(linecontent));
|
||||
|
|
@ -32,6 +32,9 @@ public class CmdConfigHandler {
|
|||
}
|
||||
}
|
||||
linecontent = reader.readLine();
|
||||
if (linecontent == null) {
|
||||
break;
|
||||
}
|
||||
linecount++;
|
||||
}
|
||||
FULLREG = commands;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue