Created
April 8, 2015 23:30
-
-
Save ScRaizer/0cb1a73d1aec483bc789 to your computer and use it in GitHub Desktop.
Creating a new file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FileConfiguration data = null; | |
try { | |
data = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "data.yml").exists() ? (new File(getDataFolder(), "data.yml").createNewFile() ? new File(getDataFolder(), "data.yml") : null ) : new File(getDataFolder(), "data.yml")); | |
} catch (IOException ignored) {} | |
getLogger().log(data == null ? Level.SEVERE : Level.INFO, "[FILES]" + (data == null ? "Unable to create data file" : "Data file created sucessfully!")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment