gordyknows

DeviantSchematics.java

Mar 5th, 2012
30
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class DeviantSchematics extends JavaPlugin
  2. /*     */ {
  3. /*     */   public static final String loggername = "DESchematics";
  4. /*     */   public static File signsfolder;
  5. /*  24 */   private static List<BaseCommand> commands = new ArrayList();
  6. /*  25 */   public static Map<Player, String> creatingDSignPlayers = new HashMap();
  7. /*  26 */   public static Method method = null;
  8. /*     */
  9. /*  28 */   private static DSchematicSignsConfig signConfig = new DSchematicSignsConfig();
  10. /*     */
  11. /*     */   public void onDisable()
  12. /*     */   {
  13. /*  32 */     method = null;
  14. /*     */     try {
  15. /*  34 */       getSignConfig().saveAllSchematicSigns();
  16. /*     */     } catch (IOException ex) {
  17. /*  36 */       Log.severe("DESchematics", "Could not save Schematics! " + ex);
  18. /*     */     }
  19. /*  38 */     Log.info("DESchematics", "Disabled successfully.");
  20. /*     */   }
  21. /*     */
  22. /*     */   public void onEnable()
  23. /*     */   {
  24. /*  43 */     signsfolder = new File(getDataFolder() + "\\signs");
  25. /*  44 */     PluginManager pm = getServer().getPluginManager();
  26. /*  45 */     setUpDE(pm.getPlugin("DECore"));
  27. /*  46 */     setUpMethod(pm.getPlugin("iConomy"));
  28. /*     */
  29. /*  48 */     commands.add(new BuyCommand());
  30. /*  49 */     commands.add(new ConfigCommand());
  31. /*  50 */     commands.add(new CreateCommand());
  32. /*  51 */     commands.add(new DeleteCommand());
  33. /*  52 */     commands.add(new HelpCommand());
  34. /*  53 */     commands.add(new InfoCommand());
  35. /*  54 */     commands.add(new SetCommand());
  36. /*     */
  37. /*  56 */     getServer().getPluginManager().registerEvents(new RegisterStuffListener(this), this);
  38. /*  57 */     getServer().getPluginManager().registerEvents(new SignEditPermissionsListener(), this);
  39. /*  58 */     getServer().getPluginManager().registerEvents(new BreakBoardListener(), this);
  40. /*  59 */     getServer().getPluginManager().registerEvents(new SelectionListener(), this);
  41. /*  60 */     getServer().getPluginManager().registerEvents(new WritingListener(), this);
  42. /*     */
  43. /*  62 */     getSignConfig().loadSchematicSigns();
  44. /*  63 */     Log.info("DESchematics", "Enabled successfully.");
  45. /*     */   }
  46. ...
RAW Paste Data