<commit_before>package guru.haun.kaban;

import guru.haun.kaban.commands.KabanCmdGroup;
import guru.haun.kaban.listener.KabanPreLoginListener;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;

import javax.persistence.PersistenceException;

import org.bukkit.plugin.java.JavaPlugin;

public class KaBan extends JavaPlugin {
	private static String kabanVersion;
	public KaBanMessenger messenger;
	
	
	public List<KaBanBanEntry> banlist = new ArrayList<KaBanBanEntry>();
	
	
	@Override
	public void onEnable(){
		messenger = new KaBanMessenger("KaBan");
		kabanVersion = this.getDescription().getVersion();
		this.getLogger().log(Level.WARNING, "This is a development version of KaBan, USE AT YOUR OWN RISK!");
		try {
		//	getDatabase().find(ActiveBansDBO.class).findRowCount();
		}catch(PersistenceException ex) {
			installDDL();
		}
		
		this.getCommand("kaban").setExecutor(new KabanCmdGroup(this));
		this.getServer().getPluginManager().registerEvents(new KabanPreLoginListener(this), this);
	}
	
	public List<Class<?>> getDatabaseClasses() {
		List<Class<?>> list = new ArrayList<Class<?>>();
		//list.add(ActiveBansDBO.class);
		return list;
	}
	
	
	public void loadBanlistFromDB(){
		/*List<ActiveBansDBO> dbresults = this.getDatabase().find(ActiveBansDBO.class).findList(); // on the main thread, maybe async this later
		banlist.clear(); //clear the old banlist, else we get dupes
		for(ActiveBansDBO ab : dbresults){
			banlist.add(new KaBanBanList(
					ab.getBanned(),
					ab.getBannedName(),
					ab.getBannedTime(),
					ab.getExpireTime(),
					ab.getBanner(),
					ab.getBannerName(),
					ab.getReason()
					));
		}*/
	}
	
	public void saveBanToDB(KaBanBanEntry ban){
		//ActiveBansDBO dbban = new ActiveBansDBO(ban.dbid, ban.banned, ban.bannedName, ban.bannedTime,
		//		ban.expireTime, ban.banner, ban.bannerName, ban.reason);
		//this.getDatabase().save(dbban);
	}
	
	
	public void onDisable(){
		
	}
	
	public String getKabanVersion(){
		return kabanVersion;
	}
}
<commit_msg>Actualy adding database take 2<commit_after>package guru.haun.kaban;

import guru.haun.kaban.commands.KabanCmdGroup;
import guru.haun.kaban.listener.KabanPreLoginListener;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;

import javax.persistence.PersistenceException;

import org.bukkit.plugin.java.JavaPlugin;

public class KaBan extends JavaPlugin {
	private static String kabanVersion;
	public KaBanMessenger messenger;
	
	
	public List<KaBanBanEntry> banlist = new ArrayList<KaBanBanEntry>();
	
	
	@Override
	public void onEnable(){
		messenger = new KaBanMessenger("KaBan");
		kabanVersion = this.getDescription().getVersion();
		this.getLogger().log(Level.WARNING, "This is a development version of KaBan, USE AT YOUR OWN RISK!");
		try {
		//	getDatabase().find(ActiveBansDBO.class).findRowCount();
		}catch(PersistenceException ex) {
			installDDL();
		}
		
		this.getCommand("kaban").setExecutor(new KabanCmdGroup(this));
		this.getServer().getPluginManager().registerEvents(new KabanPreLoginListener(this), this);
	}
	
	public List<Class<?>> getDatabaseClasses() {
		List<Class<?>> list = new ArrayList<Class<?>>();
		list.add(KaBanBanEntry.class);
		return list;
	}
	
	
	public void loadBanlistFromDB(){
		/*List<ActiveBansDBO> dbresults = this.getDatabase().find(ActiveBansDBO.class).findList(); // on the main thread, maybe async this later
		banlist.clear(); //clear the old banlist, else we get dupes
		for(ActiveBansDBO ab : dbresults){
			banlist.add(new KaBanBanList(
					ab.getBanned(),
					ab.getBannedName(),
					ab.getBannedTime(),
					ab.getExpireTime(),
					ab.getBanner(),
					ab.getBannerName(),
					ab.getReason()
					));
		}*/
	}
	
	public void saveBanToDB(KaBanBanEntry ban){
		//ActiveBansDBO dbban = new ActiveBansDBO(ban.dbid, ban.banned, ban.bannedName, ban.bannedTime,
		//		ban.expireTime, ban.banner, ban.bannerName, ban.reason);
		//this.getDatabase().save(dbban);
	}
	
	
	public void onDisable(){
		
	}
	
	public String getKabanVersion(){
		return kabanVersion;
	}
}

{'fraction_non_alphanumeric': 0.13127602253245163, 'fraction_numerical': 0.0002449179524859172, 'mean_word_length': 4.4818791946308725, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3735064', 'n_tokens_mistral': 1571, 'n_tokens_neox': 1362, 'n_words': 272}