Skip to content

Commit f617297

Browse files
committed
Iep! Damage.ENTITY should have an attacker :D
1 parent c41720d commit f617297

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ka.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ public boolean a(ea paramea, int paramInt) {
310310
return false;
311311
}
312312
// hMod: partial damage
313-
if ((Boolean) etc.getLoader().callHook(PluginLoader.Hook.DAMAGE, PluginLoader.DamageType.ENTITY, attacker, defender, paramInt - bn)) {
313+
if (attacker != null && (Boolean) etc.getLoader().callHook(PluginLoader.Hook.DAMAGE, PluginLoader.DamageType.ENTITY, attacker, defender, paramInt - bn)) {
314314
return false;
315315
}
316316
c(paramInt - this.bn);
317317
this.bn = paramInt;
318318
i = 0;
319319
} else {
320320
// hMod: full damage
321-
if ((Boolean) etc.getLoader().callHook(PluginLoader.Hook.DAMAGE, PluginLoader.DamageType.ENTITY, attacker, defender, paramInt)) {
321+
if (attacker != null && (Boolean) etc.getLoader().callHook(PluginLoader.Hook.DAMAGE, PluginLoader.DamageType.ENTITY, attacker, defender, paramInt)) {
322322
return false;
323323
}
324324
this.bn = paramInt;

0 commit comments

Comments
 (0)