Fixed wrong line in Error Code

Fixed an issue where the wrong line was showing in the Error Code
This commit is contained in:
J-onasJones 2023-09-26 23:31:46 +02:00
parent a4d242b6ef
commit 2f759e2edf

View file

@ -20,11 +20,10 @@ public class CmdConfigHandler {
public static void getCommands(String path) throws IOException {
List<CommandPreRegistry> commands = new ArrayList<CommandPreRegistry>();
BufferedReader reader = new BufferedReader(new FileReader(path));
int linecount = 0;
int linecount = 1;
String linecontent = reader.readLine();
while (linecontent != null) {
if (!linecontent.startsWith("#") || linecontent.equals("")) {
System.out.println(linecontent);
if (!linecontent.startsWith("#") || linecontent.equals("\n")) {
try {
commands.add(preRegisterCommands(linecontent));
} catch (Exception e) {