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