diff --git a/src/main/java/team/cqr/cqrepoured/event/EventsHandler.java b/src/main/java/team/cqr/cqrepoured/event/EventsHandler.java index 092a4d3d2e..db45866c6f 100644 --- a/src/main/java/team/cqr/cqrepoured/event/EventsHandler.java +++ b/src/main/java/team/cqr/cqrepoured/event/EventsHandler.java @@ -234,7 +234,7 @@ public static void onAttackEntityEvent(AttackEntityEvent event) { @SubscribeEvent public static void sayNoToCowardlyPlacingLavaAgainstBosses(FillBucketEvent event) { - if (CQRConfig.bosses.antiCowardMode && !event.getEntityPlayer().isCreative()) { + if (CQRConfig.bosses.antiCowardMode && event.getEntityPlayer() != null && !event.getEntityPlayer().isCreative()) { BlockPos pos = new BlockPos(event.getEntityPlayer()); int radius = CQRConfig.bosses.antiCowardRadius; AxisAlignedBB aabb = new AxisAlignedBB(pos.add(-radius, -radius / 2, -radius), pos.add(radius, radius / 2, radius)); @@ -244,7 +244,7 @@ public static void sayNoToCowardlyPlacingLavaAgainstBosses(FillBucketEvent event @SubscribeEvent public static void sayNoToPlacingBlocksNearBosses(BlockEvent.EntityPlaceEvent event) { - if (CQRConfig.bosses.preventBlockPlacingNearBosses && (!(event.getEntity() instanceof EntityPlayer) || !((EntityPlayer) event.getEntity()).isCreative())) { + if (CQRConfig.bosses.preventBlockPlacingNearBosses && event.getEntity() != null && (!(event.getEntity() instanceof EntityPlayer) || !((EntityPlayer) event.getEntity()).isCreative())) { BlockPos pos = new BlockPos(event.getEntity()); int radius = CQRConfig.bosses.antiCowardRadius; AxisAlignedBB aabb = new AxisAlignedBB(pos.add(-radius, -radius / 2, -radius), pos.add(radius, radius / 2, radius));