<commit_before>package markehme.simpletownsxtras.listeners;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

import com.gmail.jameshealey1994.simpletowns.events.TownClaimEvent;
import com.gmail.jameshealey1994.simpletowns.events.TownCreateEvent;

import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;

public class WorldGuardListener implements Listener {
	
	public static WorldGuardPlugin worldGuardPlugin = null;
	
	public WorldGuardListener() {
		worldGuardPlugin = WorldGuardPlugin.inst();
	}
	
	@EventHandler
	public void onTownClaim(TownClaimEvent e) {
		
		if(!(e.getSender() instanceof Player)) {
			return;
		}
		
		if(isRegionThere((Player) e.getSender())) {
			
		}
	}
	
	@EventHandler<commit_msg>Add notices and cancel event<commit_after>package markehme.simpletownsxtras.listeners;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import markehme.simpletownsxtras.SimpleTownsXtras;

import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

import com.gmail.jameshealey1994.simpletowns.events.TownClaimEvent;
import com.gmail.jameshealey1994.simpletowns.events.TownCreateEvent;

import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;

public class WorldGuardListener implements Listener {
	
	public static WorldGuardPlugin worldGuardPlugin = null;
	
	public WorldGuardListener() {
		worldGuardPlugin = WorldGuardPlugin.inst();
		
		SimpleTownsXtras.log("WorldGuard features enabled.");
	}
	
	@EventHandler
	public void onTownClaim(TownClaimEvent e) {
		
		if(!(e.getSender() instanceof Player)) {
			return;
		}
		
		if(isRegionThere((Player) e.getSender())) {
			e.getSender().sendMessage(ChatColor.RED + "You can't create a town here as there is a region in the way, please claim somewhere else.");
			e.setCancelled(true);
		}
	}
	
	@EventHandler
{'fraction_non_alphanumeric': 0.0993453985367732, 'fraction_numerical': 0.013862148633038121, 'mean_word_length': 5.661538461538462, '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': '936894', 'n_tokens_mistral': 931, 'n_tokens_neox': 814, 'n_words': 148}