Prevent missing method crashing fabric

Affects issues:
- #2991
This commit is contained in:
Aurora Lahtela 2023-04-27 15:32:40 +03:00
parent 10a1e11e46
commit cec82d5f5f

View File

@ -68,10 +68,10 @@ public class DeathEventListener implements FabricListener {
ServerEntityCombatEvents.AFTER_KILLED_OTHER_ENTITY.register((world, killer, killedEntity) ->
{
if (!this.isEnabled) {
return;
}
PlanFabricEvents.ON_KILLED.invoker().onKilled(killedEntity, killer);
if (!this.isEnabled) {
return;
}
PlanFabricEvents.ON_KILLED.invoker().onKilled(killedEntity, killer);
}
);
@ -97,7 +97,7 @@ public class DeathEventListener implements FabricListener {
? new PlayerKillProcessor(getKiller(player), getVictim((ServerPlayerEntity) victim), serverInfo.getServerIdentifier(), findWeapon(player), time)
: new MobKillProcessor(player.getUuid());
processing.submitCritical(processor);
} catch (Exception e) {
} catch (Exception | NoSuchMethodError e) {
errorLogger.error(e, ErrorContext.builder().related(getClass(), victim, killer).build());
}