Sikom

Untitled

Feb 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. package org.spigotmc.CureBeatz.ChaoticDeaths;
  2.  
  3. import java.util.logging.Logger;
  4.  
  5. import org.bukkit.plugin.PluginDescriptionFile;
  6. import org.bukkit.plugin.PluginManager;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class Main extends JavaPlugin {
  10.  
  11.     public void onEnable() {
  12.         PluginDescriptionFile pdfFile = getDescription();
  13.         Logger logger = Logger.getLogger("Minecraft");
  14.        
  15.         registerEvents();
  16.         registerConfig();
  17.  
  18.         logger.info(pdfFile.getName() + " Has been enabled! " + pdfFile.getVersion() + ")");
  19.     }
  20.  
  21.     public void onDisabled() {
  22.         PluginDescriptionFile pdfFile = getDescription();
  23.         Logger logger = Logger.getLogger("Minecraft");
  24.  
  25.         logger.info(pdfFile.getName() + " Has been Disabled! " + pdfFile.getVersion() + ")");
  26.     }  
  27.    
  28.     public void registerEvents() {
  29.         PluginManager pm = getServer().getPluginManager();
  30.        
  31.         pm.registerEvents(new onDeath(), this);
  32.     }
  33.    
  34.     private void registerConfig() {
  35.         saveDefaultConfig();
  36.     }
  37. }
Add Comment
Please, Sign In to add comment