<commit_before>package tk.kirlian.SignTraderWithDucks;

import com.nijikokun.register.payment.Method;
import org.bukkit.event.block.BlockListener;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.server.ServerListener;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.plugin.PluginManager;

import java.util.logging.Logger;
import tk.kirlian.util.CustomLogger;
import tk.kirlian.util.itemdb.*;
import tk.kirlian.SignTraderWithDucks.signs.SignManager;
import tk.kirlian.SignTraderWithDucks.permissions.PermissionsProvider;

/**
 * A Bukkit plugin that allows fully automated shops using signs!
 */
public class SignTraderPlugin extends JavaPlugin {
    public Logger log;
    private SignTraderBlockListener blockListener;
    public SignTraderPlayerListener playerListener; // Needed by SignTraderCommand
    private SignTraderServerListener serverListener;
    private SignManager signManager;
    public Method economyMethod; // Needed by various inventory adapters

    @Override
    public void onEnable() {
        // Logger needs to be created here because the description file
        // isn't loaded until now
        log = CustomLogger.getLogger(getDescription().getName());

        // I don't know where to put this, so it's going here!
        if(!getDataFolder().mkdirs()) {
            log.warning("Could not create data folder. Stuff may fail later.");
        }

        // Load the ItemDB beforehand, so if it fails, it fails now, and<commit_msg>Fixed plugin complaining when data folder already exists<commit_after>package tk.kirlian.SignTraderWithDucks;

import com.nijikokun.register.payment.Method;
import org.bukkit.event.block.BlockListener;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.server.ServerListener;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.plugin.PluginManager;

import java.util.logging.Logger;
import tk.kirlian.util.CustomLogger;
import tk.kirlian.util.itemdb.*;
import tk.kirlian.SignTraderWithDucks.signs.SignManager;
import tk.kirlian.SignTraderWithDucks.permissions.PermissionsProvider;

/**
 * A Bukkit plugin that allows fully automated shops using signs!
 */
public class SignTraderPlugin extends JavaPlugin {
    public Logger log;
    private SignTraderBlockListener blockListener;
    public SignTraderPlayerListener playerListener; // Needed by SignTraderCommand
    private SignTraderServerListener serverListener;
    private SignManager signManager;
    public Method economyMethod; // Needed by various inventory adapters

    @Override
    public void onEnable() {
        // Logger needs to be created here because the description file
        // isn't loaded until now
        log = CustomLogger.getLogger(getDescription().getName());

        // I don't know where to put this, so it's going here!
        if(getDataFolder().isDirectory()) {
            log.info("Data folder already exists -- very nice.");
        } else {
            if(getDataFolder().mkdirs()) {
                log.info("Created data folder.");
            } else {
                log.warning("Could not create data folder. Stuff may fail later.");
            }
        }

        // Load the ItemDB beforehand, so if it fails, it fails now, and
{'fraction_non_alphanumeric': 0.08683151236342726, 'fraction_numerical': 0.0, 'mean_word_length': 3.6760752688172045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6889480', 'n_tokens_mistral': 980, 'n_tokens_neox': 948, 'n_words': 266}