forked from LogBlock/LogBlock
@ -280,7 +280,8 @@ public class Consumer extends Thread {
|
||||
weapon = ((Player) killer).getInventory().getItemInMainHand();
|
||||
}
|
||||
if (killer instanceof Projectile) {
|
||||
weapon = new ItemStack(itemIDfromProjectileEntity(killer));
|
||||
Material projectileMaterial = itemIDfromProjectileEntity(killer);
|
||||
weapon = projectileMaterial == null ? null : new ItemStack(projectileMaterial);
|
||||
ProjectileSource ps = ((Projectile) killer).getShooter();
|
||||
if (ps == null) {
|
||||
killerActor = Actor.actorFromEntity(killer);
|
||||
|
@ -43,8 +43,10 @@ public class Kill implements LookupCacheElement {
|
||||
if (loc != null) {
|
||||
msg.append(" at ").append(loc.getBlockX()).append(":").append(loc.getBlockY()).append(":").append(loc.getBlockZ());
|
||||
}
|
||||
String weaponName = prettyItemName(MaterialConverter.getMaterial(weapon));
|
||||
msg.append(" with " + weaponName); // + ("aeiou".contains(weaponName.substring(0, 1)) ? "an " : "a " )
|
||||
if (weapon != 0) {
|
||||
String weaponName = prettyItemName(MaterialConverter.getMaterial(weapon));
|
||||
msg.append(" with " + weaponName); // + ("aeiou".contains(weaponName.substring(0, 1)) ? "an " : "a " )
|
||||
}
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user