rendered paste body public void loadCommand(String sender){ c = c.substring(1); String line = ""; String token = ""; String token2 = ""; String token2_2 = ""; String[] token3 = new String[10]; boolean EndOfFile = false; int ReadMode = 0; BufferedReader characterfile = null; System.out.println(c); try { characterfile = new BufferedReader(new FileReader("./Commands/"+c+".txt")); } catch(FileNotFoundException fileex) { } try { line = characterfile.readLine(); } catch(IOException ioexception) { } while(EndOfFile == false && line != null) { if (!line.equals("[END]")) { if(token3[1].equalsIgnoreCase("msg") || token3[1].equalsIgnoreCase("message")) { sendMessage(sender,token3[2]); } else if(token3[1].equalsIgnoreCase("action")) { sendAction(sender,token3[2]); } else if(token3[1].equalsIgnoreCase("notice")) { sendNotice(sender,token3[2]); } }else if(line.equals("[END]")) { try { characterfile.close(); } catch(IOException ioexception) { } } try { line = characterfile.readLine(); } catch(IOException ioexception1) { EndOfFile = true; } } try { characterfile.close(); } catch(IOException ioexception) { } }