From 330b2a843be3c50ed8eb40c0d0223d9e9ada3691 Mon Sep 17 00:00:00 2001 From: Esophose Date: Sat, 8 Feb 2020 05:35:10 -0700 Subject: [PATCH] Fix CastClassException --- .../esophose/playerparticles/styles/ParticleStyleArrows.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/dev/esophose/playerparticles/styles/ParticleStyleArrows.java b/src/main/java/dev/esophose/playerparticles/styles/ParticleStyleArrows.java index 2b19497d..0f6f2fd4 100644 --- a/src/main/java/dev/esophose/playerparticles/styles/ParticleStyleArrows.java +++ b/src/main/java/dev/esophose/playerparticles/styles/ParticleStyleArrows.java @@ -67,6 +67,9 @@ public void updateTimers() { */ @EventHandler public void onProjectileLaunch(ProjectileLaunchEvent event) { + if (!(event.getEntity().getShooter() instanceof Player)) + return; + String entityName = event.getEntity().getType().name(); if (this.arrowEntityNames.contains(entityName)) this.arrows.add(event.getEntity());