<commit_before>package com.minetexas.nodroppingoffline;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerDropItemEvent;

import com.minetexas.util.MTLog;

public class DropListener implements Listener {
	@EventHandler(priority = EventPriority.HIGHEST)
    public void onPlayerDropEvent(PlayerDropItemEvent e) {
		Player player = e.getPlayer();
		if (!player.isOnline()) {
			MTLog.debug(player.getDisplayName() +" dropped item while offline!");
			e.setCancelled(true);
			
		}
	}
	
}<commit_msg>Prevent players from Moving items to or from a chest after it is broken.<commit_after>package com.minetexas.nodroppingoffline;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.inventory.Inventory;

import com.minetexas.util.MTLog;

public class DropListener implements Listener {
	@EventHandler(priority = EventPriority.HIGHEST)
    public void onPlayerDropEvent(PlayerDropItemEvent e) {
		Player player = e.getPlayer();
		if (!player.isOnline()) {
			MTLog.debug(player.getDisplayName() +" dropped item while offline!");
			e.setCancelled(true);
			
		}
	}
	
	//Prevent players from Moving items to or from a chest after it is broken.
	@EventHandler(priority = EventPriority.HIGHEST)
    public void onPlayerInventoryClickEvent(InventoryClickEvent e) {
		Inventory source = e.getInventory();
		if (source.getType() == InventoryType.ENDER_CHEST) {
			return;
		}
		
		if (source.getHolder() == null) {
			MTLog.debug(e.getWhoClicked().getName() +" source null clicked item from invalid inventory.");
			e.setCancelled(true);
		}
	}
	
}
{'fraction_non_alphanumeric': 0.10858324715615306, 'fraction_numerical': 0.0, 'mean_word_length': 5.009316770186335, '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': '1697951', 'n_tokens_mistral': 668, 'n_tokens_neox': 613, 'n_words': 130}