Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 25th, 2011  |  syntax: Java  |  size: 1.30 KB  |  views: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package enji.lep;
  2.  
  3. import java.util.logging.Logger;
  4.  
  5. import org.bukkit.ChatColor;
  6. import org.bukkit.entity.Player;
  7. import org.bukkit.plugin.PluginDescriptionFile;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Msg extends JavaPlugin {
  11.         Logger logger = Logger.getLogger("Minecraft");
  12.        
  13.         //Commonly used msgs
  14.         public static String np = ChatColor.RED + "You are not allowed to use this command.";
  15.         public static String oig = "At the moment this is only a in-game command!";
  16.         public static String tti = " tried to issue the command /";
  17.         public static String oeli = "Lightweight Essential Plugin - ";
  18.        
  19.         public void log(String m) {
  20.                 logger.info(m);
  21.         }
  22.        
  23.         public void logEnable(String pn, String pv) {
  24.                 log(Msg.oeli + pn + " Edition " + pv + " enabled.");
  25.         }
  26.        
  27.         public void logDisable(String pn, String pv) {
  28.                 log(Msg.oeli + pn + " Edition " + pv + " disabled.");
  29.         }
  30.        
  31.         public void noPerm(Player p, String cmd) {
  32.                 log(p + "tried to issue the command /" + cmd);
  33.         }
  34.        
  35.         @Override
  36.         public void onEnable() {
  37.                 PluginDescriptionFile pdfFile = this.getDescription();
  38.                 logEnable(pdfFile.getName(), pdfFile.getVersion());
  39.         }
  40.        
  41.         @Override
  42.         public void onDisable() {
  43.                 PluginDescriptionFile pdfFile = this.getDescription();
  44.                 logDisable(pdfFile.getName(), pdfFile.getVersion());
  45.         }
  46. }
  47.  
  48.  
clone this paste RAW Paste Data