SHARE
TWEET

Untitled

a guest Mar 20th, 2017 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.tox.SheepCoins;
  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 SheepCoins extends JavaPlugin implements Listener{
  10.    
  11.     public SqlConnection sql;
  12.    
  13.     public void onEnable(){
  14.         sql = new SqlConnection("jdbc:mysql://","localhost","servermc","root","");
  15.         sql.connection();
  16.         getServer().getPluginManager().registerEvents(this, this);
  17.         getCommand("SheepCoins").setExecutor(new CmdCoins(sql));
  18.     }
  19.    
  20.     public void onDisable(){
  21.         sql.disconnect();
  22.     }
  23.    
  24.     @EventHandler
  25.     public void join (PlayerJoinEvent e){
  26.             Player p = e.getPlayer();
  27.             sql.createAccount(p);
  28.     }
  29.    
  30. }
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