Skip to content

Commit

Permalink
fix: NPE when the player's death is attributed to player who is no lo…
Browse files Browse the repository at this point in the history
…nger part of any team
  • Loading branch information
Misat11 committed Jun 16, 2024
1 parent cb1502b commit 91bbb28
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void onPlayerDeath(PlayerDeathEvent event) {
if (Main.getConfigurator().config.getBoolean("chat.send-death-messages-just-in-game")) {
String deathMessage = event.getDeathMessage();
if (Main.getConfigurator().config.getBoolean("chat.send-custom-death-messages")) {
if (event.getEntity().getKiller() != null) {
if (event.getEntity().getKiller() != null && game.isPlayerInAnyTeam(event.getEntity().getKiller())) {
Player killer = event.getEntity().getKiller();
GamePlayer gKiller = Main.getPlayerGameProfile(killer);
CurrentTeam killerTeam = game.getPlayerTeam(gKiller);
Expand Down

0 comments on commit 91bbb28

Please sign in to comment.