<commit_before>package li.cryx.expcraft.woodcutting;

import java.text.MessageFormat;
import java.util.logging.Logger;

import li.cryx.expcraft.module.DropExpCraftModule;
import li.cryx.expcraft.util.Chat;

import org.bukkit.Material;
import org.bukkit.TreeSpecies;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.Tree;
import org.bukkit.plugin.PluginManager;

/**
 * This class is the main entry point for the Wood Cutting module for ExpCraft.
 * The module manages the use of axes and harvesting of wood.
 * 
 * @author cryxli
 */
public class WoodCutting extends DropExpCraftModule {
	/** Global logger */
	private static final Logger LOG = Logger.getLogger("EC-WoodCutting");

	/** The block listener to do all the work. */
	private WoodCuttingBlockListener blockListener;

	/** The chat utility to send messages to players. */
	private Chat chat;

	@Override
	protected ItemStack calculateDrop(final Block block) {
		switch (block.getType()) {
		case LOG:
			Tree tree = (Tree) block.getState().getData();
			TreeSpecies species = tree.getSpecies();
			return new ItemStack(Material.LOG, 1, species.getData());

		case WOOD:
			return new ItemStack(Material.WOOD, 1, block.getData());

		default:
			return null;
		}
	}

	/**
	 * Create listeners and link them to this plugin and a common
	 * <code>Chat</code> component.
	 */
	private void createListeners() {
		// use one chat tool
		chat = new Chat(this);

		// block listener
		blockListener = new WoodCuttingBlockListener(this);
	}

	@Override
	public void displayInfo(final Player sender, final int page) {
		chat.info(sender, MessageFormat.format("*** {0} ({1}) ***",
				getModuleName(), getAbbr()));

		int level = getPersistence().getLevel(this, sender);
		chat.info(sender, "Tools:");<commit_msg>Simplified double drops<commit_after>package li.cryx.expcraft.woodcutting;

import java.text.MessageFormat;
import java.util.logging.Logger;

import li.cryx.expcraft.module.DropExpCraftModule;
import li.cryx.expcraft.util.Chat;

import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginManager;

/**
 * This class is the main entry point for the Wood Cutting module for ExpCraft.
 * The module manages the use of axes and harvesting of wood.
 * 
 * @author cryxli
 */
public class WoodCutting extends DropExpCraftModule {
	/** Global logger */
	private static final Logger LOG = Logger.getLogger("EC-WoodCutting");

	/** The block listener to do all the work. */
	private WoodCuttingBlockListener blockListener;

	/** The chat utility to send messages to players. */
	private Chat chat;

	@Override
	protected ItemStack calculateDrop(final Block block) {
		switch (block.getType()) {
		case LOG:
		case WOOD:
			return new ItemStack(block.getType(), 1, block.getData());

		default:
			return null;
		}
	}

	/**
	 * Create listeners and link them to this plugin and a common
	 * <code>Chat</code> component.
	 */
	private void createListeners() {
		// use one chat tool
		chat = new Chat(this);

		// block listener
		blockListener = new WoodCuttingBlockListener(this);
	}

	@Override
	public void displayInfo(final Player sender, final int page) {
		chat.info(sender, MessageFormat.format("*** {0} ({1}) ***",
				getModuleName(), getAbbr()));

		int level = getPersistence().getLevel(this, sender);
		chat.info(sender, "Tools:");
{'fraction_non_alphanumeric': 0.11645422943221322, 'fraction_numerical': 0.0020278099652375433, 'mean_word_length': 4.223903177004539, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '379014', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1038, 'n_words': 317}