Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. package fr.thedarven.connexion;
  2.  
  3. import java.util.HashMap;
  4. import java.util.UUID;
  5. import org.bukkit.plugin.PluginManager;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7. import fr.thedarven.events.Commandes;
  8. import fr.thedarven.events.Login;
  9. import fr.thedarven.connexion.SqlConnection;
  10.  
  11. public class Connexion extends JavaPlugin{
  12.  
  13. public SqlConnection sql;
  14. public static Connexion instance;
  15. public static Connexion getInstance(){
  16. return instance;
  17. }
  18. public static HashMap<UUID,String> playerLogin = new HashMap<UUID,String>();
  19.  
  20. public void onEnable(){
  21. instance = this;
  22.  
  23. PluginManager pm = getServer().getPluginManager();
  24. pm.registerEvents(new Login(this), this);
  25.  
  26. sql = new SqlConnection("jdbc:mysql://","localhost","semi-rp","root","");
  27. sql.connection();
  28.  
  29. getCommand("register").setExecutor(new Commandes());
  30. getCommand("login").setExecutor(new Commandes());
  31. }
  32.  
  33. public void onDisable(){
  34. sql.disconnect();
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement