All pastes #2054909 Raw Edit

Stuff

public java v1 · immutable
#2054909 ·published 2011-05-07 17:13 UTC
rendered paste body
package com.juze.JuzePlugin;import java.io.File;import java.io.IOException;import java.util.logging.Logger;import org.bukkit.plugin.PluginDescriptionFile;import org.bukkit.plugin.java.JavaPlugin;import org.bukkit.util.config.Configuration;public class JuzePlugin extends JavaPlugin {		public Configuration config;		public final Logger log = Logger.getLogger( "Minecraft" );    private PluginDescriptionFile pdfFile;	private final String LOG_PREFIX = "[JuzePlugin] ";    	public void onEnable(){		File yml = new File( getDataFolder() + "/config.yml" );		if( !yml.exists() )		{		new File( getDataFolder().toString() ).mkdir();		try		{		yml.createNewFile();		}		catch( IOException e )		{		log.warning( LOG_PREFIX + "Exception: " + e.getMessage() );		log.warning( LOG_PREFIX + "Could not create a configuration file, disabling " + pdfFile.getName());		}		}		        log.info( pdfFile.getName() + " v" + pdfFile.getVersion() + " enabled." );	}	    public void onDisable() {        log.info( pdfFile.getName() + " v" + pdfFile.getVersion() + " disabled." );    }}