<commit_before>package info.tregmine.listeners;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockPlaceEvent;
//import org.bukkit.entity.HumanEntity;
//import org.bukkit.entity.Player;

import info.tregmine.Tregmine;
import info.tregmine.api.TregminePlayer;
import info.tregmine.zones.Lot;
import info.tregmine.zones.Zone;
import info.tregmine.zones.ZoneWorld;

public class ZoneBlockListener implements Listener
{
    private Tregmine plugin;

    public ZoneBlockListener(Tregmine instance)
    {
        this.plugin = instance;
    }

    @EventHandler
    public void onBlockBreak(BlockBreakEvent event)
    {
        TregminePlayer player = plugin.getPlayer(event.getPlayer());

        Location location = event.getBlock().getLocation();
        if (player.hasBlockPermission(location, true)) return;

        /*if (!player.getRank().canBuild() &&
                player.getMentor() != null) {

                TregminePlayer mentor = player.getMentor();
                Location a = player.getLocation();
                Location b = mentor.getLocation();

                if (Distance.calc2d(a, b) > 50) {
                    player.sendMessage(ChatColor.YELLOW + "You have to stay within " +
                            "a 50 block radius of your mentor in order to build.");
                    mentor.sendMessage(ChatColor.YELLOW + "Your student has to stay " +
                            "within a 50 block radius of you in order to build.");
                    event.setCancelled(true);
                    return;
                }
        } else {
            event.setCancelled(true);
            return;
        }*/

        event.setCancelled(true);
    }

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent event)
    {
        TregminePlayer player = plugin.getPlayer(event.getPlayer());

        Location location = event.getBlock().getLocation();

        if (player.hasBlockPermission(location, true)) return;

        /*if (!player.getRank().canBuild() &&
                player.getMentor() != null) {

                TregminePlayer mentor = player.getMentor();
                Location a = player.getLocation();
                Location b = mentor.getLocation();

                if (Distance.calc2d(a, b) > 50) {
                    player.sendMessage(ChatColor.YELLOW + "You have to stay within " +
                            "a 50 block radius of your mentor in order to build.");
                    mentor.sendMessage(ChatColor.YELLOW + "Your student has to stay " +
                            "within a 50 block radius of you in order to build.");
                    event.setCancelled(true);
                    return;
                }
        } else {
            event.setCancelled(true);
            return;
        }*/

        event.setCancelled(true);
    }
<commit_msg>Stop fire in Anarchy spawn<commit_after>package info.tregmine.listeners;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockPlaceEvent;
//import org.bukkit.entity.HumanEntity;
//import org.bukkit.entity.Player;

import info.tregmine.Tregmine;
import info.tregmine.api.TregminePlayer;
import info.tregmine.zones.Lot;
import info.tregmine.zones.Zone;
import info.tregmine.zones.ZoneWorld;

public class ZoneBlockListener implements Listener
{
    private Tregmine plugin;

    public ZoneBlockListener(Tregmine instance)
    {
        this.plugin = instance;
    }

    @EventHandler
    public void onBlockBreak(BlockBreakEvent event)
    {
        TregminePlayer player = plugin.getPlayer(event.getPlayer());

        Location location = event.getBlock().getLocation();

		if (	location.getWorld().getName().equalsIgnoreCase(plugin.getRulelessWorld().getName()) ||
				location.getWorld().getName().equalsIgnoreCase(plugin.getRulelessEnd().getName()) ||
				location.getWorld().getName().equalsIgnoreCase(plugin.getRulelessNether().getName())) {
			if (player.hasBlockPermission(location, false)) return;
		} else {
			if (player.hasBlockPermission(location, true)) return;
		}

        /*if (!player.getRank().canBuild() &&
                player.getMentor() != null) {

                TregminePlayer mentor = player.getMentor();
                Location a = player.getLocation();
                Location b = mentor.getLocation();

                if (Distance.calc2d(a, b) > 50) {
                    player.sendMessage(ChatColor.YELLOW + "You have to stay within " +
                            "a 50 block radius of your mentor in order to build.");
                    mentor.sendMessage(ChatColor.YELLOW + "Your student has to stay " +
                            "within a 50 block radius of you in order to build.");
                    event.setCancelled(true);
                    return;
                }
        } else {
            event.setCancelled(true);
            return;
        }*/

        event.setCancelled(true);
    }

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent event)
    {
        TregminePlayer player = plugin.getPlayer(event.getPlayer());

        Location location = event.getBlock().getLocation();

		if (	location.getWorld().getName().equalsIgnoreCase(plugin.getRulelessWorld().getName()) ||
				location.getWorld().getName().equalsIgnoreCase(plugin.getRulelessEnd().getName()) ||
				location.getWorld().getName().equalsIgnoreCase(plugin.getRulelessNether().getName())) {
			if (player.hasBlockPermission(location, false)) return;
		} else {
			if (player.hasBlockPermission(location, true)) return;
		}

        /*if (!player.getRank().canBuild() &&
                player.getMentor() != null) {

                TregminePlayer mentor = player.getMentor();
                Location a = player.getLocation();
                Location b = mentor.getLocation();

                if (Distance.calc2d(a, b) > 50) {
                    player.sendMessage(ChatColor.YELLOW + "You have to stay within " +
                            "a 50 block radius of your mentor in order to build.");
                    mentor.sendMessage(ChatColor.YELLOW + "Your student has to stay " +
                            "within a 50 block radius of you in order to build.");
                    event.setCancelled(true);
                    return;
                }
        } else {
            event.setCancelled(true);
            return;
        }*/

        event.setCancelled(true);
    }

{'fraction_non_alphanumeric': 0.10770138683977575, 'fraction_numerical': 0.004131012097964001, 'mean_word_length': 2.1559590316573556, 'pattern_counts': {'":': 0, '<': 3, '<?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': '129690', 'n_tokens_mistral': 1969, 'n_tokens_neox': 1809, 'n_words': 396}