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:
parent
91ee3cf8f9
commit
6ae2563d16
|
|
@ -8,6 +8,7 @@ import com.alttd.ctf.game.GamePhase;
|
||||||
import com.alttd.ctf.team.TeamPlayer;
|
import com.alttd.ctf.team.TeamPlayer;
|
||||||
import com.github.yannicklamprecht.worldborder.api.WorldBorderApi;
|
import com.github.yannicklamprecht.worldborder.api.WorldBorderApi;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
@ -35,7 +36,7 @@ public class OnPlayerDeath implements Listener {
|
||||||
if (gameManager.getGamePhase().isEmpty()) {
|
if (gameManager.getGamePhase().isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.deathMessage(null);
|
event.deathMessage(Component.empty());
|
||||||
event.setShouldDropExperience(false);
|
event.setShouldDropExperience(false);
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user