From 8edb6976fb3c3e1025042e17664f144aac652e59 Mon Sep 17 00:00:00 2001
From: sk89q <the.sk89q@gmail.com>
Date: Wed, 23 Feb 2011 10:05:29 -0800
Subject: [PATCH] Changed usage of CraftItemStack to ItemStack.

---
 .../bukkit/WorldGuardPlayerListener.java      | 22 +++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java b/src/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java
index 27cff8c4..c8fcf1af 100644
--- a/src/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java
+++ b/src/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java
@@ -20,7 +20,6 @@
 package com.sk89q.worldguard.bukkit;
 
 import com.sk89q.worldguard.blacklist.events.ItemAcquireBlacklistEvent;
-import org.bukkit.craftbukkit.entity.CraftItem;
 import org.bukkit.entity.Item;
 import com.sk89q.worldguard.blacklist.events.ItemDropBlacklistEvent;
 import org.bukkit.*;
@@ -182,10 +181,12 @@ public void onPlayerDropItem(PlayerDropItemEvent event) {
         }
 
         if (plugin.blacklist != null) {
-            CraftItem ci = (CraftItem)event.getItemDrop();
+            Item ci = event.getItemDrop();
 
-            if (!plugin.blacklist.check(new ItemDropBlacklistEvent(plugin.wrapPlayer(event.getPlayer()), toVector(ci.getLocation()),
-                    ci.getItemStack().getTypeId()), false, false)) {
+            if (!plugin.blacklist.check(
+                    new ItemDropBlacklistEvent(plugin.wrapPlayer(event
+                            .getPlayer()), toVector(ci.getLocation()), ci
+                            .getItemStack().getTypeId()), false, false)) {
                 event.setCancelled(true);
                 return;
             }
@@ -194,8 +195,9 @@ public void onPlayerDropItem(PlayerDropItemEvent event) {
 
     /**
      * Called when a player attempts to pickup an item
-     *
-     * @param event Relevant event details
+     * 
+     * @param event
+     *            Relevant event details
      */
     @Override
     public void onPlayerPickupItem(PlayerPickupItemEvent event) {
@@ -205,10 +207,12 @@ public void onPlayerPickupItem(PlayerPickupItemEvent event) {
         }
 
         if (plugin.blacklist != null) {
-            CraftItem ci = (CraftItem)event.getItem();
+            Item ci = event.getItem();
 
-            if (!plugin.blacklist.check(new ItemAcquireBlacklistEvent(plugin.wrapPlayer(event.getPlayer()), toVector(ci.getLocation()),
-                    ci.getItemStack().getTypeId()), false, false)) {
+            if (!plugin.blacklist.check(
+                    new ItemAcquireBlacklistEvent(plugin.wrapPlayer(event
+                            .getPlayer()), toVector(ci.getLocation()), ci
+                            .getItemStack().getTypeId()), false, false)) {
                 event.setCancelled(true);
                 return;
             }