From f36e6b1aa03c318dfc98cc23dfe7b26c262e6fe3 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Wed, 31 Jan 2024 12:34:04 +0100 Subject: [PATCH] Refactoring --- TODO.md | 10 ++++++---- .../java/ovh/herisson/thevoidroad/DatabaseManager.java | 1 - .../herisson/thevoidroad/{Event => }/HourEvent.java | 2 +- .../herisson/thevoidroad/{Entity => }/Merchand.java | 8 +------- .../java/ovh/herisson/thevoidroad/TheVoidRoad.java | 6 +++--- .../ovh/herisson/thevoidroad/{util => }/Tuple.java | 2 +- .../thevoidroad/{Commands => }/VoidCommands.java | 4 ++-- 7 files changed, 14 insertions(+), 19 deletions(-) rename TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/{Event => }/HourEvent.java (95%) rename TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/{Entity => }/Merchand.java (94%) rename TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/{util => }/Tuple.java (78%) rename TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/{Commands => }/VoidCommands.java (97%) diff --git a/TODO.md b/TODO.md index a4252a3..dac92d2 100644 --- a/TODO.md +++ b/TODO.md @@ -6,12 +6,14 @@ - [x] Make Discord Webhoook for item changes - [x] chest name - [x] Show next Item +- [x] /void manage bring - [+] /void give afficher title - subtitle + chat - [+] Double Check Inventory reset on die -- [ ] i18n -- [ ] /void manage bring -- [ ] Dupe bug (respawn) -> Gamerule +- [+] Annonce +- [+] Find Map : 51 (250, 300) +- [+] Dupe bug (respawn) +- [-] i18n - [ ] Events - [ ] Command completions -- [ ] Annonce +- [ ] More descriptive /void commands diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/DatabaseManager.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/DatabaseManager.java index e7037f6..98a4be1 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/DatabaseManager.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/DatabaseManager.java @@ -11,7 +11,6 @@ import java.util.HashMap; import java.util.UUID; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; import org.jetbrains.annotations.Nullable; public class DatabaseManager { diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Event/HourEvent.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/HourEvent.java similarity index 95% rename from TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Event/HourEvent.java rename to TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/HourEvent.java index 2da47fe..ac98d62 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Event/HourEvent.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/HourEvent.java @@ -1,4 +1,4 @@ -package ovh.herisson.thevoidroad.Event; +package ovh.herisson.thevoidroad; import java.time.LocalTime; diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Merchand.java similarity index 94% rename from TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java rename to TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Merchand.java index a53e05a..cd9eb18 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Entity/Merchand.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Merchand.java @@ -1,4 +1,4 @@ -package ovh.herisson.thevoidroad.Entity; +package ovh.herisson.thevoidroad; import java.io.File; import java.nio.file.Files; @@ -24,12 +24,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.persistence.PersistentDataType; import net.kyori.adventure.text.Component; -import ovh.herisson.thevoidroad.DatabaseManager; -import ovh.herisson.thevoidroad.DiscordWebhook; -import ovh.herisson.thevoidroad.TheVoidRoad; -import ovh.herisson.thevoidroad.Voids; -import ovh.herisson.thevoidroad.Event.HourEvent; -import ovh.herisson.thevoidroad.util.Tuple; //Unique, so singleton patern public class Merchand implements Listener{ diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/TheVoidRoad.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/TheVoidRoad.java index 55e134f..b5cf693 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/TheVoidRoad.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/TheVoidRoad.java @@ -2,9 +2,9 @@ package ovh.herisson.thevoidroad; import org.bukkit.plugin.java.JavaPlugin; -import ovh.herisson.thevoidroad.Commands.VoidCommands; -import ovh.herisson.thevoidroad.Entity.Merchand; -import ovh.herisson.thevoidroad.Event.HourEvent; +import ovh.herisson.thevoidroad.VoidCommands; +import ovh.herisson.thevoidroad.Merchand; +import ovh.herisson.thevoidroad.HourEvent; public class TheVoidRoad extends JavaPlugin{ diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/util/Tuple.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Tuple.java similarity index 78% rename from TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/util/Tuple.java rename to TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Tuple.java index 3c4a8b7..d7a10ea 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/util/Tuple.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Tuple.java @@ -1,4 +1,4 @@ -package ovh.herisson.thevoidroad.util; +package ovh.herisson.thevoidroad; public class Tuple { public final X x; diff --git a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/VoidCommands.java similarity index 97% rename from TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java rename to TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/VoidCommands.java index 5965f9c..6b39b88 100644 --- a/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/Commands/VoidCommands.java +++ b/TheVoidRoad/src/main/java/ovh/herisson/thevoidroad/VoidCommands.java @@ -1,4 +1,4 @@ -package ovh.herisson.thevoidroad.Commands; +package ovh.herisson.thevoidroad; import java.util.ArrayList; import java.util.List; @@ -17,7 +17,7 @@ import net.kyori.adventure.text.Component; import ovh.herisson.thevoidroad.DatabaseManager; import ovh.herisson.thevoidroad.TheVoidRoad; import ovh.herisson.thevoidroad.Voids; -import ovh.herisson.thevoidroad.Entity.Merchand; +import ovh.herisson.thevoidroad.Merchand; public class VoidCommands implements CommandExecutor, TabCompleter{ private final Merchand m = Merchand.getInstance();