Set death message to empty Component on player death.

Replaced `null` with `Component.empty()` for the death message to comply with updated API standards and improve code clarity.
This commit is contained in:
Teriuihi 2025-02-09 21:57:27 +01:00
parent 91ee3cf8f9
commit 6ae2563d16

View File

@ -8,6 +8,7 @@ import com.alttd.ctf.game.GamePhase;
import com.alttd.ctf.team.TeamPlayer;
import com.github.yannicklamprecht.worldborder.api.WorldBorderApi;
import lombok.extern.slf4j.Slf4j;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -35,7 +36,7 @@ public class OnPlayerDeath implements Listener {
if (gameManager.getGamePhase().isEmpty()) {
return;
}
event.deathMessage(null);
event.deathMessage(Component.empty());
event.setShouldDropExperience(false);
Player player = event.getPlayer();
player.getInventory().clear();