Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.eloxfire.SimplifiedCoins;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- import org.bukkit.plugin.java.JavaPlugin;
- public class SimplifiedCoins extends JavaPlugin implements Listener{
- public SQLConnection sql;
- public void onEnable(){
- sql = new SQLConnection("jdbc:mysql://", "localhost", "serveurmc", "root", "");
- sql.connection();
- getServer().getPluginManager().registerEvents(this, this);
- getCommand("balance").setExecutor(new cmdCoins(sql));
- }
- public void onDisable(){
- sql.disconnect();
- }
- @EventHandler
- public void onJoin(PlayerJoinEvent e){
- Player p = e.getPlayer();
- sql.createAccount(p);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement