SHARE
TWEET

Untitled

a guest Jan 27th, 2020 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package de.mettbrot.main;
  2.  
  3.  
  4. import org.bukkit.Bukkit;
  5. import org.bukkit.configuration.file.FileConfiguration;
  6. import org.bukkit.plugin.PluginManager;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. import de.mettbrot.chat.ChatClear;
  10. import de.mettbrot.chat.PlayerChatEvent;
  11. import de.mettbrot.commands.Enderchest_command;
  12. import de.mettbrot.commands.SkullCommand;
  13. import de.mettbrot.commands.forum_command;
  14. import de.mettbrot.commands.shop_command;
  15. import de.mettbrot.commands.teamspeak_command;
  16. import de.mettbrot.commands.vanish_command;
  17. import de.mettbrot.listener.MotdListener;
  18. import de.mettbrot.world.SetSpawn_command;
  19. import de.mettbrot.world.Spawn_command;
  20.  
  21.  
  22.  
  23.  
  24.  
  25. public class Main extends JavaPlugin {
  26.  
  27.    
  28.     public void onEnable() {
  29.  
  30.         Bukkit.getConsoleSender().sendMessage("§bCitybuild System wurde Aktiviert!");
  31.  
  32.        
  33.         //Commands register
  34.         getCommand("kopf").setExecutor(new SkullCommand());
  35.         getCommand("ts").setExecutor(new teamspeak_command());
  36.         getCommand("shop").setExecutor(new shop_command());
  37.         getCommand("cc").setExecutor(new ChatClear());     
  38.         getCommand("forum").setExecutor(new forum_command());
  39.         getCommand("vanish").setExecutor(new vanish_command());
  40.         getCommand("enderchest").setExecutor(new Enderchest_command());
  41.         getCommand("setspawn").setExecutor(new SetSpawn_command(null));
  42.         getCommand("Spawn").setExecutor(new Spawn_command(null));
  43.        
  44.         //Listener register
  45.        
  46.      PluginManager pm = Bukkit.getPluginManager();
  47.  
  48.     pm.registerEvents(new PlayerChatEvent(),this);
  49.     pm.registerEvents(new MotdListener(), this);
  50.  
  51.         loadConfig();
  52.        
  53.        
  54.     }
  55.     public void onDisable() {
  56.         Bukkit.getConsoleSender().sendMessage("§c Citybuild System wurde Deaktiviert!");
  57.        
  58.        
  59.        
  60.     }
  61.    
  62.     public void loadConfig() {
  63.         FileConfiguration cfg = this.getConfig();
  64.         cfg.options().copyDefaults(true);
  65.        
  66.         this.saveConfig();
  67.     }
  68.    
  69. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top