<commit_before>package info.tregmine.currency;

import info.tregmine.database.ConnectionPool;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.bukkit.GameMode;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerLoginEvent;


public class CurrencyPlayer implements Listener  {
	private final Main plugin;

	public CurrencyPlayer(Main instance) {
		plugin = instance;
		plugin.getServer();
	}

	@EventHandler
	public void onPlayerLogin (PlayerLoginEvent event){
		Wallet wallet = new Wallet(event.getPlayer());
		wallet.create();
	}

	@EventHandler
	public void onPlayerDropItem (PlayerDropItemEvent event) {
		if (event.getPlayer().getGameMode() == GameMode.CREATIVE) {
			event.setCancelled(true);
			return;
		}
		if (
				event.getItemDrop().getLocation().getBlockX() < 509 &&
				event.getItemDrop().getLocation().getBlockX() > 498 &&
				event.getItemDrop().getLocation().getBlockZ() > -165 &&
				event.getItemDrop().getLocation().getBlockZ() < -153
			){
			Connection conn = null;
			PreparedStatement stmt = null;
			ResultSet rs = null;
			try {
				conn = ConnectionPool.getConnection();

				String sql = "SELECT value FROM items_destroyvalue WHERE itemid = ?";
				
				stmt = conn.prepareStatement(sql);
				stmt.setLong(1, event.getItemDrop().getItemStack().getTypeId());
				stmt.execute();
				
				rs = stmt.getResultSet();
				
				rs.first();
				
				event.getPlayer().sendMessage("value: " + rs.getInt("value"));
				
			} catch (SQLException e) {
				throw new RuntimeException(e);
			} finally {
				if (rs != null) {
					try { rs.close(); } catch (SQLException e) {} 
				}
				if (stmt != null) {
					try { stmt.close(); } catch (SQLException e) {}
				}
				if (conn != null) {
					try { conn.close(); } catch (SQLException e) {}
				}
			}
			
			
			
			event.getPlayer().sendMessage("If you see this, you are in a dropzone");

		}
	}

}<commit_msg>added value to dropzone<commit_after>package info.tregmine.currency;

import info.tregmine.database.ConnectionPool;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.bukkit.GameMode;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerLoginEvent;


public class CurrencyPlayer implements Listener  {
	private final Main plugin;

	public CurrencyPlayer(Main instance) {
		plugin = instance;
		plugin.getServer();
	}

	@EventHandler
	public void onPlayerLogin (PlayerLoginEvent event){
		Wallet wallet = new Wallet(event.getPlayer());
		wallet.create();
	}

	@EventHandler
	public void onPlayerDropItem (PlayerDropItemEvent event) {
		if (event.getPlayer().getGameMode() == GameMode.CREATIVE) {
			event.setCancelled(true);
			return;
		}
		if (
				event.getItemDrop().getLocation().getBlockX() < 509 &&
				event.getItemDrop().getLocation().getBlockX() > 498 &&
				event.getItemDrop().getLocation().getBlockZ() > -165 &&
				event.getItemDrop().getLocation().getBlockZ() < -153
			){
			Connection conn = null;
			PreparedStatement stmt = null;
			ResultSet rs = null;
			try {
				conn = ConnectionPool.getConnection();

				String sql = "SELECT value FROM items_destroyvalue WHERE itemid = ?";
				
				stmt = conn.prepareStatement(sql);
				stmt.setLong(1, event.getItemDrop().getItemStack().getTypeId());
				stmt.execute();
				
				rs = stmt.getResultSet();
				
				rs.first();
				
				int total = rs.getInt("value") * event.getItemDrop().getItemStack().getAmount();
				event.getPlayer().sendMessage("value: " + total);
				
				
				event.getItemDrop().remove();
				
				
				
			} catch (SQLException e) {
				throw new RuntimeException(e);
			} finally {
				if (rs != null) {
					try { rs.close(); } catch (SQLException e) {} 
				}
				if (stmt != null) {
					try { stmt.close(); } catch (SQLException e) {}
				}
				if (conn != null) {
					try { conn.close(); } catch (SQLException e) {}
				}
			}
			
			
			
//			event.getPlayer().sendMessage("If you see this, you are in a dropzone");

		}
	}

}
{'fraction_non_alphanumeric': 0.13602426504899673, 'fraction_numerical': 0.006066262249183388, 'mean_word_length': 3.437888198757764, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1559566', 'n_tokens_mistral': 1636, 'n_tokens_neox': 1342, 'n_words': 284}