Advertisement
EloxFire

Classe Principale

Jun 22nd, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. package fr.eloxfire.SimplifiedCoins;
  2.  
  3. import org.bukkit.entity.Player;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.Listener;
  6. import org.bukkit.event.player.PlayerJoinEvent;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class SimplifiedCoins extends JavaPlugin implements Listener{
  10.  
  11. public SQLConnection sql;
  12.  
  13. public void onEnable(){
  14. sql = new SQLConnection("jdbc:mysql://", "localhost", "serveurmc", "root", "");
  15. sql.connection();
  16. getServer().getPluginManager().registerEvents(this, this);
  17. getCommand("balance").setExecutor(new cmdCoins(sql));
  18. }
  19.  
  20.  
  21. public void onDisable(){
  22. sql.disconnect();
  23. }
  24.  
  25. @EventHandler
  26. public void onJoin(PlayerJoinEvent e){
  27. Player p = e.getPlayer();
  28. sql.createAccount(p);
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement