File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/xyz/jadonfowler/phasebot Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ else if (line.startsWith("Password: ")) { // Password:Derp
102102 PASSWORD = line .split (": " )[1 ];
103103 }
104104 else if (line .startsWith ("Server: " )) { // Server:minecraft.net:25565
105- HOST = line .split (": " )[1 ];
106- PORT = Integer .parseInt (line .split (":" )[2 ]);
105+ HOST = line .split (": " )[1 ]. split ( ":" )[ 0 ] ;
106+ PORT = Integer .parseInt (line .split (": " )[1 ]. split ( ":" )[ 1 ]);
107107 }
108108 else if (line .startsWith ("Proxy" )) { // Proxy:123.456.789:860
109109 PROXY = new Proxy (Proxy .Type .HTTP ,
@@ -143,7 +143,12 @@ public static void reloadScripts() {
143143
144144 public static ArrayList <File > getFiles (String directoryName ) {
145145 File directory = new File (directoryName );
146+
146147 ArrayList <File > files = new ArrayList <File >();
148+ if (!directory .isDirectory ()){
149+ console .println ("No files found in " + directoryName );
150+ return files ;
151+ }
147152 // Get all the files from a directory
148153 File [] fList = directory .listFiles ();
149154 for (File file : fList ) {
You can’t perform that action at this time.
0 commit comments