SHARE
TWEET

Untitled

a guest Feb 27th, 2019 131 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package de.javazeiichen.bigbyte.main;
  2.  
  3. import de.javazeiichen.bigbyte.api.CoinsAPI;
  4. import de.javazeiichen.bigbyte.commands.BuildCommand;
  5. import de.javazeiichen.bigbyte.commands.SetSpawnCommand;
  6. import de.javazeiichen.bigbyte.commands.SpawnVillagerCommand;
  7. import de.javazeiichen.bigbyte.commands.StatsCommand;
  8. import de.javazeiichen.bigbyte.events.*;
  9. import org.bukkit.Bukkit;
  10. import org.bukkit.plugin.java.JavaPlugin;
  11.  
  12. public class BuildFFA extends JavaPlugin {
  13.  
  14.     private CoinsAPI coinsapi;
  15.  
  16.     @Override
  17.     public void onEnable() {
  18.  
  19.         register();
  20.         MySQL.connect();
  21.         MySQL.createTable();
  22.         new ScoreBoardLoadEvent().startScheduler();
  23.         new ScoreBoardLoadEvent().animate();
  24.         register();
  25.  
  26.         String user = "root";
  27.         String password = "EvilPass";
  28.         String host = "localhost";
  29.         String database = "CoinsAPI";
  30.         String port = "3306";
  31.  
  32.         coinsapi = new CoinsAPI(user, password, host, database, port);
  33.         coinsapi.connect();
  34.         coinsapi.createTable();
  35.  
  36.     }
  37.  
  38.     @Override
  39.     public void onDisable() {
  40.  
  41.         MySQL.close();
  42.  
  43.     }
  44.  
  45.     private void register () {
  46.  
  47.         Bukkit.getPluginManager().registerEvents(new BlockPlaceBreakEvent(), this);
  48.         Bukkit.getPluginManager().registerEvents(new JoinQuitEvent(), this);
  49.         Bukkit.getPluginManager().registerEvents(new PlayerDamageEvent(), this);
  50.         Bukkit.getPluginManager().registerEvents(new DeathEvent()  , this);
  51.         Bukkit.getPluginManager().registerEvents(new PlayerMoveEvent(), this);
  52.         Bukkit.getPluginManager().registerEvents(new PlayerRespawnEvent(), this);
  53.         Bukkit.getPluginManager().registerEvents(new Stuff(), this);
  54.         Bukkit.getPluginManager().registerEvents(new PlayerFishingEvent(), this);
  55.         Bukkit.getPluginManager().registerEvents(new InvSortListener(), this);
  56.  
  57.         getCommand("build").setExecutor(new BuildCommand());
  58.         getCommand("spawnVillager").setExecutor(new SpawnVillagerCommand());
  59.         getCommand("setspawn").setExecutor(new SetSpawnCommand());
  60.         getCommand("stats").setExecutor(new StatsCommand());
  61.  
  62.  
  63.     }
  64. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top