1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

修复扫地大妈返回null时的报错...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2016-01-12 13:22:13 +08:00
parent 79ea58412a
commit ceeeb5802c

View File

@ -16,17 +16,23 @@ public class WowSuchCleanerListener implements Listener {
public void onWSCClear(final ItemPreCleanEvent e) { public void onWSCClear(final ItemPreCleanEvent e) {
final List<Item> clearList = new ArrayList<Item>(); final List<Item> clearList = new ArrayList<Item>();
final List<ItemStack> aucList = new ArrayList<ItemStack>(); final List<ItemStack> aucList = new ArrayList<ItemStack>();
for (final Item item : e.getItemsToClean()) { final List<Item> cleanList = e.getItemsToClean();
final List<ItemStack> acList = e.getItemsToAuction();
if (cleanList != null) {
for (final Item item : cleanList) {
if (MarkUtil.hasMark(item.getItemStack())) { if (MarkUtil.hasMark(item.getItemStack())) {
clearList.add(item); clearList.add(item);
} }
} }
for (final ItemStack itemStack : e.getItemsToAuction()) { e.getItemsToClean().removeAll(clearList);
}
if (acList != null) {
for (final ItemStack itemStack : acList) {
if (MarkUtil.hasMark(itemStack)) { if (MarkUtil.hasMark(itemStack)) {
aucList.add(itemStack); aucList.add(itemStack);
} }
} }
e.getItemsToClean().removeAll(clearList);
e.getItemsToAuction().removeAll(aucList); e.getItemsToAuction().removeAll(aucList);
} }
}
} }