Skip to content

Instantly share code, notes, and snippets.

View ScRaizer's full-sized avatar

Rupt ScRaizer

View GitHub Profile
@ScRaizer
ScRaizer / 0_reuse_code.js
Last active September 19, 2015 10:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ScRaizer
ScRaizer / ExtraConfigs.java
Created April 8, 2015 23:30
Creating a new file
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!"));
@ScRaizer
ScRaizer / MultipleDataFiles.java
Last active November 27, 2016 19:53
Example java class in creating multiple config files on bukkit.
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;