From 8bf35896f40fecbdbabfedd9935a71b7fa11d7c8 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Mon, 29 Jan 2024 18:25:13 +0100 Subject: [PATCH] /void manage bring command --- TODO.md | 8 ++++---- .../ovh/herisson/thevoidroad/Commands/VoidCommands.java | 8 ++++++++ .../java/ovh/herisson/thevoidroad/Entity/Merchand.java | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 9fb08e5..a4252a3 100644 --- a/TODO.md +++ b/TODO.md @@ -3,15 +3,15 @@ - [x] deathBan reset - [x] voids exchanges - [x] /void give négatives values -- [+] Make Discord Webhoook for item changes -- [+] chest name -- [+] Show next Item +- [x] Make Discord Webhoook for item changes +- [x] chest name +- [x] Show next Item - [+] /void give afficher title - subtitle + chat +- [+] Double Check Inventory reset on die - [ ] i18n - [ ] /void manage bring - [ ] Dupe bug (respawn) -> Gamerule - [ ] Events - [ ] Command completions - [ ] Annonce -- [ ] Double Check Inventory reset on die diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java index ec14441..5965f9c 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java @@ -76,6 +76,14 @@ public class VoidCommands implements CommandExecutor, TabCompleter{ sender.sendMessage("You can't teleport!"); } break; + case "bring": + if(sender instanceof Player ply && m.getLocation() != null){ + m.teleport(ply.getLocation()); + }else{ + return false; + } + break; + case "balance": if(args.length < 5) return false; switch (args[2]) { diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java index 81f2413..a53e05a 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java @@ -178,4 +178,8 @@ public class Merchand implements Listener{ } } } + + public void teleport(Location location) { + m.teleport(location); + } }