Skip to content

Commit

Permalink
Kill message : override vanilla behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
PainOchoco committed Apr 4, 2024
1 parent 71dee62 commit 85c9334
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextReplacementConfig;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.format.TextDecoration;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.laboulangerie.laboulangeriecore.LaBoulangerieCore;
Expand Down Expand Up @@ -227,7 +228,7 @@ public void onPlayerDeath(PlayerDeathEvent event) {

String killerName = event.getEntity().getKiller().getName();
Component obfuscatedKiller = Component.text("??????").decoration(TextDecoration.OBFUSCATED, true)
.clickEvent(null);
.clickEvent(ClickEvent.suggestCommand("mystère..."));
TextReplacementConfig killerReplacement = TextReplacementConfig.builder().matchLiteral(killerName)
.replacement(obfuscatedKiller).build();

Expand Down

0 comments on commit 85c9334

Please sign in to comment.