Fix for Armorstands.

This commit is contained in:
Brianna 2019-05-20 22:29:33 -04:00
parent f2507121a7
commit 7c9cc8a4e8
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "EpicHeads"
path: "/builds/$CI_PROJECT_PATH"
version: "3.0.11"
version: "3.0.12"
build:
stage: build

View File

@ -7,6 +7,7 @@ import com.songoda.epicheads.utils.Methods;
import com.songoda.epicheads.utils.ServerVersion;
import com.songoda.epicheads.utils.SettingsManager;
import org.bukkit.Material;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@ -55,7 +56,7 @@ public class DeathListeners implements Listener {
itemNew = optional.get().asItemStack();
}
} else {
if (!SettingsManager.Setting.DROP_MOB_HEADS.getBoolean()) return;
if (!SettingsManager.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);
itemNew = head.asItemStack();