0

Added NoSuchFileException to file existance check

This commit is contained in:
David Panić 2019-04-07 20:53:52 +02:00
parent 0418d12414
commit 8382eb432d
No known key found for this signature in database
GPG Key ID: 0FDC88FEC4D8A110

View File

@ -12,6 +12,7 @@ import net.md_5.bungee.api.plugin.PluginManager;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.NoSuchFileException;
public class Main extends Plugin {
private File playerBanFile = new File("banned-players.json");
@ -64,7 +65,7 @@ public class Main extends Plugin {
getLogger().info("Loaded " + name + " bans!");
return false;
} catch (FileNotFoundException e) {
} catch (FileNotFoundException | NoSuchFileException e) {
getLogger().warning("Ban file (" + name + ") does not exist! Creating!");
try {