This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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!")); |
This file contains 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
package me.ruptur.multipledatafiles; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.logging.Level; | |
import org.bukkit.Bukkit; | |
import org.bukkit.configuration.file.FileConfiguration; | |
import org.bukkit.configuration.file.YamlConfiguration; | |
import org.bukkit.entity.Player; |