Mobs will no longer drop null heads.

This commit is contained in:
Brianna 2019-06-02 15:44:50 -04:00
parent 46c09cb8d2
commit 3641097d6e

View File

@ -58,7 +58,10 @@ public class DeathListeners implements Listener {
} else { } else {
if (!Setting.DROP_MOB_HEADS.getBoolean() || event.getEntity() instanceof ArmorStand) return; if (!Setting.DROP_MOB_HEADS.getBoolean() || event.getEntity() instanceof ArmorStand) return;
Head head = new Head(-1, null, HeadType.valueOf(event.getEntity().getType().name()).getUrl(), null, null, (byte) 0); Head head = new Head(-1, Methods.formatText(event.getEntity().getType().name().toLowerCase()
.replace("_", " "), true),
HeadType.valueOf(event.getEntity().getType().name()).getUrl(),
null, null, (byte) 0);
itemNew = head.asItemStack(); itemNew = head.asItemStack();
} }