summaryrefslogtreecommitdiffstats
path: root/nms-patches/EnchantmentThorns.patch
blob: 1329a1043b86e29fe374b97fd458a0ca37af96bb (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/net/minecraft/server/EnchantmentThorns.java
+++ b/net/minecraft/server/EnchantmentThorns.java
@@ -29,7 +29,7 @@
         Random random = entityliving.bc();
         ItemStack itemstack = EnchantmentManager.a(Enchantment.THORNS, entityliving);
 
-        if (a(i, random)) {
+        if (entity != null && a(i, random)) { // CraftBukkit
             if (entity != null) {
                 entity.damageEntity(DamageSource.a(entityliving), (float) b(i, random));
                 entity.makeSound("damage.thorns", 0.5F, 1.0F);