Notification on /void give

This commit is contained in:
Debucquoy Anthony 2024-01-27 00:17:47 +01:00
parent a7fdff2dd9
commit 105d564ec0
Signed by: tonitch
GPG Key ID: A78D6421F083D42E
2 changed files with 9 additions and 3 deletions

View File

@ -1,12 +1,13 @@
# TODO list # TODO list
- [ ] i18n - [ ] i18n
- [-] Make Discord Webhoook for item changes - [+] Make Discord Webhoook for item changes
- [x] deathBan reset - [x] deathBan reset
- [x] voids exchanges - [x] voids exchanges
- [x] /void give négatives values - [x] /void give négatives values
- [ ] chest name - [+] chest name
- [+] Show next Item
- [ ] /void manage bring - [ ] /void manage bring
- [ ] Dupe bug (respawn) -> Gamerule - [ ] Dupe bug (respawn) -> Gamerule
- [ ] /void give afficher title - [+] /void give afficher title
- subtitle + chat - subtitle + chat

View File

@ -19,6 +19,8 @@ import org.bukkit.scoreboard.ScoreboardManager;
import net.kyori.adventure.bossbar.BossBar; import net.kyori.adventure.bossbar.BossBar;
import net.kyori.adventure.text.Component; 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{ public final class Voids implements Listener{
@ -51,6 +53,9 @@ public final class Voids implements Listener{
if( amount < 0 || !subtract(giver, amount, false)) if( amount < 0 || !subtract(giver, amount, false))
return false; return false;
add(receiver, amount); 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; return true;
} }