<commit_before>package markehme.factionsplus.Cmds;

import markehme.factionsplus.FactionsPlus;
import markehme.factionsplus.Utilities;
import markehme.factionsplus.extras.LWCFunctions;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;

import com.massivecraft.factions.cmd.req.ReqFactionsEnabled;
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;

public class CmdClearLocks extends FPCommand {
	public CmdClearLocks() {
		this.aliases.add("clearlocks");
		
		this.fpidentifier = "clearlocks";
		
		this.errorOnToManyArgs = true;
				
		this.addRequirements( ReqFactionsEnabled.get());
		this.addRequirements( ReqIsPlayer.get());
		
		this.setHelp("clears LWC and Lockette locks not owned by a Faction member in your land");
		this.setDesc("clears LWC and Lockette locks not owned by a Faction member in your land");
		
	}
	
	@Override
	public void performfp() {
		if(!FactionsPlus.permission.has(sender, "factionsplus.clearlwclocks")) {
			sender.sendMessage(ChatColor.RED + "You don't have permission to use this command!");
			return;
		}
		
		Location loc	= Utilities.getOnlinePlayerExact( usender ).getLocation();
		Player name		= Utilities.getOnlinePlayerExact( usender );
		
		int lwc_clearedlocks = LWCFunctions.clearLocksCommand( name, loc );
		
		int clearedlocks = 0;
		
		if( lwc_clearedlocks < 0 ) {
			
			lwc_clearedlocks = 0;
			
		}
		
		clearedlocks+= lwc_clearedlocks;
		
		if( clearedlocks == 0 ) {
			name.sendMessage( ChatColor.GOLD + "No unlockable protections were found in this chunk" );
			return;
		}
		
		name.sendMessage( ChatColor.GOLD + "Successfully removed " + clearedlocks + " protections from this chunk" );
		
	}

}<commit_msg>MCore support, extreme cleanup<commit_after>package markehme.factionsplus.Cmds;

import markehme.factionsplus.Utilities;
import markehme.factionsplus.MCore.LConf;
import markehme.factionsplus.extras.LWCFunctions;
import markehme.factionsplus.util.FPPerm;

import com.massivecraft.factions.cmd.req.ReqFactionsEnabled;
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
import com.massivecraft.mcore.util.Txt;

public class CmdClearLocks extends FPCommand {
	public CmdClearLocks() {
		this.aliases.add("clearlocks");
		
		this.fpidentifier = "clearlocks";
		
		this.addRequirements(ReqFactionsEnabled.get());
		this.addRequirements(ReqIsPlayer.get());
		
		this.addRequirements(ReqHasPerm.get(FPPerm.CLEARLWCLOCKS.node));
		
		this.setHelp(LConf.get().cmdDescClearLocks);
		this.setDesc(LConf.get().cmdDescClearLocks);
	}
	
	@Override
	public void performfp() {
		int LWClockRemoveCount = LWCFunctions.clearLocksCommand(Utilities.getOnlinePlayerExact(usender), Utilities.getOnlinePlayerExact(usender).getLocation());
		if(LWClockRemoveCount < 0) {	
			LWClockRemoveCount = 0;
		}
		
		if(LWClockRemoveCount == 0) {
			msg(Txt.parse(LConf.get().LWCNoLocksFound));
		} else {		
			msg(Txt.parse(LConf.get().LWCLocksRemoved, LWClockRemoveCount));
		}
	}

}
{'fraction_non_alphanumeric': 0.10974393082806784, 'fraction_numerical': 0.002327901563019621, 'mean_word_length': 4.829457364341085, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5101280', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1019, 'n_words': 179}