From 105d564ec00814f64f62a6cda56498c55b46be25 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Sat, 27 Jan 2024 00:17:47 +0100 Subject: [PATCH] Notification on /void give --- TODO.md | 7 ++++--- .../src/main/java/ovh/herisson/thevoidroad/Voids.java | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 09c8ae1..5bd4f4d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,12 +1,13 @@ # TODO list - [ ] i18n -- [-] Make Discord Webhoook for item changes +- [+] Make Discord Webhoook for item changes - [x] deathBan reset - [x] voids exchanges - [x] /void give négatives values -- [ ] chest name +- [+] chest name +- [+] Show next Item - [ ] /void manage bring - [ ] Dupe bug (respawn) -> Gamerule -- [ ] /void give afficher title +- [+] /void give afficher title - subtitle + chat diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Voids.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Voids.java index 2f866d4..d042057 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Voids.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Voids.java @@ -19,6 +19,8 @@ import org.bukkit.scoreboard.ScoreboardManager; import net.kyori.adventure.bossbar.BossBar; import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.title.Title; public final class Voids implements Listener{ @@ -51,6 +53,9 @@ public final class Voids implements Listener{ if( amount < 0 || !subtract(giver, amount, false)) return false; add(receiver, amount); + giver.sendMessage("Vous avez donné " + amount + TheVoidRoad.CoinGlyph + " à " + receiver.getName()); + receiver.sendMessage("Vous avez reçu " + amount + TheVoidRoad.CoinGlyph + " de " + giver.getName()); + receiver.showTitle(Title.title(Component.empty(), Component.text("+" + amount + TheVoidRoad.CoinGlyph + " from " + giver.getName()).color(NamedTextColor.GREEN))); return true; }