Skip to content

Commit

Permalink
Fix CastClassException
Browse files Browse the repository at this point in the history
  • Loading branch information
Esophose committed Feb 8, 2020
1 parent ae8db5a commit 330b2a8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 330b2a8

Please sign in to comment.