Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on April 9, 2015 at 04:38 AM

Section 1 (Java)

package bukkit.Eggspurt.me.Classes;
 
import java.io.File;
import java.io.IOException;
import java.util.UUID;

import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;

import bukkit.Eggspurt.me.Commands.ExchangePoints;
 
 
public class Main extends JavaPlugin implements Listener{ //Extending JavaPlugin so that Bukkit knows its the main class...
	public File pluginfile;
	public static FileConfiguration stats;
    private static Plugin plugin;
   
    public void onEnable() {
        plugin = this;
        registerEvents(this, new PointGiver());
       getCommand("epoints").setExecutor(new ExchangePoints());
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
    }
   
    public void onDisable() {
       
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
    	UUID uuid = event.getPlayer().getUniqueId();
    	File pluginfile = new File("plugins/CRStats/"+uuid+".yml");
		stats = YamlConfiguration.loadConfiguration(pluginfile);
        if (!pluginfile.exists()){
            try {
                pluginfile.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    //Much eaisier then registering events in 10 diffirent methods
    public static void registerEvents(org.bukkit.plugin.Plugin plugin, Listener... listeners) {
        for (Listener listener : listeners) {
            Bukkit.getServer().getPluginManager().registerEvents(listener, plugin);
        }
    }
   
    //To access the plugin variable from other classes
    public static Plugin getPlugin() {
        return plugin;
    }
}