java.lang.NullPointerException: null
at org.terasology.ligthandshadow.componentsystem.controllers.PlayerDeathSystem.updateStatistics(PlayerDeathSystem.java:93)
at org.terasology.ligthandshadow.componentsystem.controllers.PlayerDeathSystem.beforeDestroy(PlayerDeathSystem.java:63)
at org.terasology.ligthandshadow.componentsystem.controllers.PlayerDeathSystemMethodAccess.invoke(Unknown Source)
at org.terasology.engine.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:379)
at org.terasology.engine.entitySystem.event.internal.EventSystemImpl.sendConsumableEvent(EventSystemImpl.java:254)
at org.terasology.engine.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:233)
at org.terasology.engine.core.bootstrap.eventSystem.AbstractEventSystemDecorator.send(AbstractEventSystemDecorator.java:67
This occurs when the player does not have a PlayerStatisticsComponent.
During play-testing https://github.com/MovingBlocks/Terasology/releases/tag/v5.2.0-rc.1 the (headless) server crashed due to the following NPE when updating the player statistics:
This occurs when the player does not have a
PlayerStatisticsComponent
.https://github.com/Terasology/LightAndShadow/blob/8c937cdc727b3e342523c45020c3ffc66eb2c765/src/main/java/org/terasology/ligthandshadow/componentsystem/controllers/PlayerDeathSystem.java#L90-L99