fixing the crash when generating a new map

modified:   src/entity/player/Player.java
modified:   src/game/GameLoop.java
modified:   src/light/LightManager.java
modified:   src/userInterface/OverlayManager.java