<commit_before>/**
 * @author Justin "JustBru00" Brubaker
 * 
 * This is licensed under the MPL Version 2.0. See license info in LICENSE.txt
 */
package com.gmail.justbru00.epic.rename.commands.v3;

import java.util.List;

import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.meta.ItemMeta;

import com.gmail.justbru00.epic.rename.enums.v3.EpicRenameCommands;
import com.gmail.justbru00.epic.rename.main.v3.Main;
import com.gmail.justbru00.epic.rename.utils.v3.Blacklists;
import com.gmail.justbru00.epic.rename.utils.v3.Debug;
import com.gmail.justbru00.epic.rename.utils.v3.MaterialPermManager;
import com.gmail.justbru00.epic.rename.utils.v3.Messager;
import com.gmail.justbru00.epic.rename.utils.v3.RenameUtil;
import com.gmail.justbru00.epic.rename.utils.v3.WorldChecker;

public class RemoveLoreLine implements CommandExecutor {

	@Override
	public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

		if (command.getName().equalsIgnoreCase("removeloreline")) {
			if (sender.hasPermission("epicrename.removeloreline")) {
				if (sender instanceof Player) {
					Player player = (Player) sender;
					if (WorldChecker.checkWorld(player)) {
						if (args.length == 1) {
							
							// Check Material Permissions
							if (!MaterialPermManager.checkPerms(EpicRenameCommands.REMOVELORELINE, RenameUtil.getInHand(player), player)) {
								Messager.msgPlayer(Main.getMsgFromConfig("removeloreline.no_permission_for_material"), player);
								return true;
							}
							
							// Issue #76 | Check Blacklist							
							if (!Blacklists.checkMaterialBlacklist(RenameUtil.getInHand(player).getType(), player)) {
								Messager.msgPlayer(Main.getMsgFromConfig("removeloreline.blacklisted_material_found"), player);
								return true;
							}
							// End Issue #76
							
							int lineNumber = -1;<commit_msg>Added #81 to /removeloreline<commit_after>/**
 * @author Justin "JustBru00" Brubaker
 * 
 * This is licensed under the MPL Version 2.0. See license info in LICENSE.txt
 */
package com.gmail.justbru00.epic.rename.commands.v3;

import java.util.List;

import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.meta.ItemMeta;

import com.gmail.justbru00.epic.rename.enums.v3.EpicRenameCommands;
import com.gmail.justbru00.epic.rename.main.v3.Main;
import com.gmail.justbru00.epic.rename.utils.v3.Blacklists;
import com.gmail.justbru00.epic.rename.utils.v3.Debug;
import com.gmail.justbru00.epic.rename.utils.v3.MaterialPermManager;
import com.gmail.justbru00.epic.rename.utils.v3.Messager;
import com.gmail.justbru00.epic.rename.utils.v3.RenameUtil;
import com.gmail.justbru00.epic.rename.utils.v3.WorldChecker;

public class RemoveLoreLine implements CommandExecutor {

	@Override
	public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

		if (command.getName().equalsIgnoreCase("removeloreline")) {
			if (sender.hasPermission("epicrename.removeloreline")) {
				if (sender instanceof Player) {
					Player player = (Player) sender;
					if (WorldChecker.checkWorld(player)) {
						if (args.length == 1) {
							
							// Check Material Permissions
							if (!MaterialPermManager.checkPerms(EpicRenameCommands.REMOVELORELINE, RenameUtil.getInHand(player), player)) {
								Messager.msgPlayer(Main.getMsgFromConfig("removeloreline.no_permission_for_material"), player);
								return true;
							}
							
							// Issue #76 | Check Blacklist							
							if (!Blacklists.checkMaterialBlacklist(RenameUtil.getInHand(player).getType(), player)) {
								Messager.msgPlayer(Main.getMsgFromConfig("removeloreline.blacklisted_material_found"), player);
								return true;
							}
							// End Issue #76
							
							// Check Existing Name Blacklist #81
							if (!Blacklists.checkExistingName(player)) {
								Messager.msgPlayer(Main.getMsgFromConfig("removeloreline.blacklisted_existing_name_found"), player);
								return true;
							}
							
							// Check Existing Lore Blacklist #81
							if (!Blacklists.checkExistingLore(player)) {
								Messager.msgPlayer(Main.getMsgFromConfig("removeloreline.blacklisted_existing_lore_found"), player);
								return true;
							}
							
							int lineNumber = -1;
{'fraction_non_alphanumeric': 0.11133113311331133, 'fraction_numerical': 0.0176017601760176, 'mean_word_length': 3.8516542155816436, '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': '3228479', 'n_tokens_mistral': 1796, 'n_tokens_neox': 1447, 'n_words': 246}