Log items even with null values.

This commit is contained in:
MobiusDev
2017-10-25 21:50:08 +00:00
parent e9664d56fc
commit 15852c5555
4 changed files with 304 additions and 352 deletions

View File

@@ -250,35 +250,30 @@ public class ItemTable
if (Config.LOG_ITEMS && !process.equals("Reset")) if (Config.LOG_ITEMS && !process.equals("Reset"))
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -293,7 +288,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + itemId // + "(id: " + itemId //
+ " count: " + count // + " count: " + count //
+ " name: " + item.getItemName() // + " name: " + item.getItemName() //
@@ -302,7 +297,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// Notify to scripts // Notify to scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem()); EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem());
@@ -343,37 +337,32 @@ public class ItemTable
if (Config.LOG_ITEMS) if (Config.LOG_ITEMS)
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -388,7 +377,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + item.getId() // + "(id: " + item.getId() //
+ " count: " + item.getCount() // + " count: " + item.getCount() //
+ " itemObjId: " // + " itemObjId: " //
@@ -397,7 +386,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// if it's a pet control item, delete the pet as well // if it's a pet control item, delete the pet as well
if (item.getItem().isPetItem()) if (item.getItem().isPetItem())

View File

@@ -250,35 +250,30 @@ public class ItemTable
if (Config.LOG_ITEMS && !process.equals("Reset")) if (Config.LOG_ITEMS && !process.equals("Reset"))
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -293,7 +288,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + itemId // + "(id: " + itemId //
+ " count: " + count // + " count: " + count //
+ " name: " + item.getItemName() // + " name: " + item.getItemName() //
@@ -302,7 +297,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// Notify to scripts // Notify to scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem()); EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem());
@@ -343,37 +337,32 @@ public class ItemTable
if (Config.LOG_ITEMS) if (Config.LOG_ITEMS)
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -388,7 +377,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + item.getId() // + "(id: " + item.getId() //
+ " count: " + item.getCount() // + " count: " + item.getCount() //
+ " itemObjId: " // + " itemObjId: " //
@@ -397,7 +386,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// if it's a pet control item, delete the pet as well // if it's a pet control item, delete the pet as well
if (item.getItem().isPetItem()) if (item.getItem().isPetItem())

View File

@@ -250,35 +250,30 @@ public class ItemTable
if (Config.LOG_ITEMS && !process.equals("Reset")) if (Config.LOG_ITEMS && !process.equals("Reset"))
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -293,7 +288,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + itemId // + "(id: " + itemId //
+ " count: " + count // + " count: " + count //
+ " name: " + item.getItemName() // + " name: " + item.getItemName() //
@@ -302,7 +297,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// Notify to scripts // Notify to scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem()); EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem());
@@ -343,37 +337,32 @@ public class ItemTable
if (Config.LOG_ITEMS) if (Config.LOG_ITEMS)
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -388,7 +377,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + item.getId() // + "(id: " + item.getId() //
+ " count: " + item.getCount() // + " count: " + item.getCount() //
+ " itemObjId: " // + " itemObjId: " //
@@ -397,7 +386,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// if it's a pet control item, delete the pet as well // if it's a pet control item, delete the pet as well
if (item.getItem().isPetItem()) if (item.getItem().isPetItem())

View File

@@ -250,35 +250,30 @@ public class ItemTable
if (Config.LOG_ITEMS && !process.equals("Reset")) if (Config.LOG_ITEMS && !process.equals("Reset"))
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("CREATE:" + process // LOGGER_ITEMS.info("CREATE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -293,7 +288,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + itemId // + "(id: " + itemId //
+ " count: " + count // + " count: " + count //
+ " name: " + item.getItemName() // + " name: " + item.getItemName() //
@@ -302,7 +297,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// Notify to scripts // Notify to scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem()); EventDispatcher.getInstance().notifyEventAsync(new OnItemCreate(process, item, actor, reference), item.getItem());
@@ -343,37 +337,32 @@ public class ItemTable
if (Config.LOG_ITEMS) if (Config.LOG_ITEMS)
{ {
if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID)))) if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (item.isEquipable() || (item.getId() == ADENA_ID))))
{
if ((actor != null) && (reference != null)) // NPE check
{ {
if (item.getEnchantLevel() > 0) if (item.getEnchantLevel() > 0)
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":+" + item.getEnchantLevel() // + ":+" + item.getEnchantLevel() //
+ " " + item.getItem().getName() // + " " + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
} }
else else
{ {
LOGGER_ITEMS.info("DELETE:" + process // LOGGER_ITEMS.info("DELETE:" + String.valueOf(process) // in case of null
+ ", item " + item.getObjectId() // + ", item " + item.getObjectId() //
+ ":" + item.getItem().getName() // + ":" + item.getItem().getName() //
+ "(" + item.getCount() // + "(" + item.getCount() //
+ "), PrevCount(" + old // + "), PrevCount(" + old //
+ "), " + actor // + "), " + String.valueOf(actor) // in case of null
+ ", " + reference); + ", " + String.valueOf(reference)); // in case of null
}
} }
} }
} }
if (actor != null) if ((actor != null) && actor.isGM())
{
if (actor.isGM())
{ {
String referenceName = "no-reference"; String referenceName = "no-reference";
if (reference instanceof L2Object) if (reference instanceof L2Object)
@@ -388,7 +377,7 @@ public class ItemTable
if (Config.GMAUDIT) if (Config.GMAUDIT)
{ {
GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" // GMAudit.auditGMAction(actor.getName() + " [" + actor.getObjectId() + "]" //
, process // , String.valueOf(process) // in case of null
+ "(id: " + item.getId() // + "(id: " + item.getId() //
+ " count: " + item.getCount() // + " count: " + item.getCount() //
+ " itemObjId: " // + " itemObjId: " //
@@ -397,7 +386,6 @@ public class ItemTable
, "L2Object referencing this action is: " + referenceName); , "L2Object referencing this action is: " + referenceName);
} }
} }
}
// if it's a pet control item, delete the pet as well // if it's a pet control item, delete the pet as well
if (item.getItem().isPetItem()) if (item.getItem().isPetItem())