From e18a0c08083d1dd6154c683c0451c189e14170e8 Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Sat, 10 Jun 2023 21:41:14 -0500 Subject: [PATCH 01/18] Minor fixes --- .../totalfreedom/datura/cmd/CageCommand.java | 44 ++++----- .../totalfreedom/datura/cmd/HaltCommand.java | 90 +++++++++++++++++++ .../datura/punishment/Halter.java | 9 ++ .../java/me/totalfreedom/base/Shortcuts.java | 15 ++++ .../totalfreedom/command/BukkitDelegate.java | 30 +++++-- .../command/annotation/Subcommand.java | 17 ++-- .../provider/ContextProvider.java | 45 ++++++++-- 7 files changed, 203 insertions(+), 47 deletions(-) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java create mode 100644 Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java index 38b2050..91c12fc 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java @@ -48,20 +48,16 @@ public class CageCommand extends Commander @Subcommand(permission = "datura.cage", args = {Player.class, String.class}) public void cagePlayer(final CommandSender sender, final Player player, final String string) { - switch (string.toLowerCase()) + if (string.equalsIgnoreCase("on")) { - case "on" -> - { - ((Datura) getPlugin()).getCager() - .cagePlayer(player.getUniqueId()); - sender.sendPlainMessage("Caged " + player.getName() + "."); - } - case "off" -> - { - ((Datura) getPlugin()).getCager() - .uncagePlayer(player.getUniqueId()); - sender.sendPlainMessage("Liberated " + player.getName() + "."); - } + ((Datura) getPlugin()).getCager() + .cagePlayer(player.getUniqueId()); + sender.sendPlainMessage("Caged " + player.getName() + "."); + } else if (string.equalsIgnoreCase("off")) + { + ((Datura) getPlugin()).getCager() + .uncagePlayer(player.getUniqueId()); + sender.sendPlainMessage("Liberated " + player.getName() + "."); } } @@ -70,20 +66,16 @@ public class CageCommand extends Commander public void cagePlayer(final CommandSender sender, final Player player, final String string, final Material material) { - switch (string.toLowerCase()) + if (string.equalsIgnoreCase("on")) { - case "on" -> - { - ((Datura) getPlugin()).getCager() - .cagePlayer(player.getUniqueId(), material); - sender.sendPlainMessage("Caged " + player.getName() + "."); - } - case "off" -> - { - ((Datura) getPlugin()).getCager() - .uncagePlayer(player.getUniqueId()); - sender.sendPlainMessage("Liberated " + player.getName() + "."); - } + ((Datura) getPlugin()).getCager() + .cagePlayer(player.getUniqueId(), material); + sender.sendPlainMessage("Caged " + player.getName() + "."); + } else if (string.equalsIgnoreCase("off")) + { + ((Datura) getPlugin()).getCager() + .uncagePlayer(player.getUniqueId()); + sender.sendPlainMessage("Liberated " + player.getName() + "."); } } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java new file mode 100644 index 0000000..0edca7c --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java @@ -0,0 +1,90 @@ +package me.totalfreedom.datura.cmd; + +import me.totalfreedom.base.Shortcuts; +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; +import me.totalfreedom.command.annotation.Subcommand; +import me.totalfreedom.datura.Datura; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +@Info(name = "halt", description = "Halt a single player, or every player.", usage = "/ ") +@Permissive(perm = "datura.halt") +public class HaltCommand extends Commander +{ + private final Datura plugin = Shortcuts.provideModule(Datura.class) + .getModule(); + + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected HaltCommand(@NotNull final JavaPlugin plugin) + { + super(plugin); + } + + + @Subcommand(permission = "datura.halt", args = {Player.class, String.class}) + public void haltPlayer(final CommandSender sender, final Player target, final String toggle) + { + if (toggle.equalsIgnoreCase("on")) + { + plugin.getHalter() + .halt(target.getUniqueId()); + + target.sendPlainMessage("You have been frozen!"); + sender.sendPlainMessage("You have halted " + target.getName() + "."); + } else if (toggle.equalsIgnoreCase("off")) + { + plugin.getHalter() + .stop(target.getUniqueId()); + + target.sendPlainMessage("You have been unfrozen!"); + sender.sendPlainMessage("You have unhalted " + target.getName() + "."); + } + } + + @Subcommand(permission = "datura.halt.all", args = {String.class, String.class}) + public void haltAll(final CommandSender sender, final String all, final String toggle) + { + if (all.equalsIgnoreCase("all")) + { + if (toggle.equalsIgnoreCase("on")) + { + Bukkit.getServer() + .getOnlinePlayers() + .forEach(player -> + { + plugin.getHalter() + .halt(player.getUniqueId()); + }); + + final Component message = sender.name() + .append(Component.text(": Freezing all players")) + .color(NamedTextColor.AQUA); + + Bukkit.broadcast(message); + sender.sendPlainMessage("All players have been halted."); + } else if (toggle.equalsIgnoreCase("off")) + { + plugin.getHalter() + .clear(); + + Bukkit.broadcast(Component.text("All players have been unfrozen!", NamedTextColor.AQUA)); + sender.sendPlainMessage("All players have been unhalted."); + } + } + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java b/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java index 11ef9be..af61b9b 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java +++ b/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java @@ -22,6 +22,15 @@ public class Halter implements Listener this.haltedPlayers.add(uuid); } + public void stop(final UUID uuid) + { + this.haltedPlayers.remove(uuid); + } + + public void clear() { + this.haltedPlayers.clear(); + } + @EventHandler public void playerMove(final PlayerMoveEvent event) { diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java b/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java new file mode 100644 index 0000000..2194026 --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java @@ -0,0 +1,15 @@ +package me.totalfreedom.base; + +import me.totalfreedom.provider.ModuleProvider; +import org.bukkit.plugin.java.JavaPlugin; + +public final class Shortcuts +{ + private Shortcuts() { + throw new AssertionError(); + } + + public static ModuleProvider provideModule(final Class pluginClass) { + return CommonsBase.getInstance().getRegistrations().getModuleRegistry().getProvider(pluginClass); + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java index 0a740d6..c122527 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java @@ -1,12 +1,12 @@ package me.totalfreedom.command; -import me.totalfreedom.api.Context; import me.totalfreedom.command.annotation.Completion; import me.totalfreedom.command.annotation.Subcommand; import me.totalfreedom.provider.ContextProvider; import me.totalfreedom.utils.logging.FreedomLogger; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; +import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -120,7 +120,7 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC final Subcommand node) { final Class[] argTypes = node.args(); - if (argTypes.length != args.length) + if (argTypes.length > args.length) return; final Object[] objects = new Object[argTypes.length + 1]; @@ -130,11 +130,27 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC final Class argType = argTypes[i]; final String arg = args[i]; - if (argType == String.class) - continue; + if (argType.equals(String.class)) + { + if (i == argTypes.length - 1) + { + final String[] reasonArgs = Arrays.copyOfRange(args, i, args.length - 1); + final String reason = String.join(" ", reasonArgs); + objects[i] = reason; + } else + { + continue; + } + } - final Context context = () -> provider.fromString(arg, argType); - objects[i] = context.get(); + if (argType.equals(Location.class)) { + final String[] locationArgs = Arrays.copyOfRange(args, i, i + 3); + final String location = String.join(" ", locationArgs); + objects[i] = location; + } + + final Object obj = provider.fromString(arg, argType); + objects[i] = obj; } try { @@ -183,7 +199,7 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC "7", "8", "9")); - case "%location%" -> results.add("world,x,y,z"); + case "%location%" -> results.add("world x y z"); default -> results.add(p); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java b/Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java index b203761..679fdb1 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java @@ -10,19 +10,26 @@ import java.lang.annotation.Target; /** * This annotation should be used to mark methods as subcommand methods. Subcommand methods can have custom arguments - * (current supported arguments can be found in the {@link ContextProvider}), and can also have a custom permission. - * These subcommands can also be annotated with {@link Completions} to provide tab completions for the subcommand. The - * subcommand method must be public, and must be in a class that is registered with the {@link CommandHandler}. - *
+ * (current supported arguments can be found in the {@link ContextProvider}), and can also have a custom + * permission. These subcommands can also be annotated with {@link Completions} to provide tab completions for the + * subcommand. The subcommand method must be public, and must be in a class that is registered with the + * {@link CommandHandler}. + *

* Tab completions with the {@link Completions} annotation are only supported for subcommands. When registering * completions, you only need to define the completion arguments a single time. If there are other methods which * function as optional additional arguments for the subcommand, the previously registered arguments will still be * present when the user does their tab completion. - *
+ *

* For example, if you have a subcommand method with the arguments {@code (Player, String)}, and another method which * has the arguments {@code (Player, String, String)}, the tab completions for the second method will still have the * {@code Player} and {@code String} arguments registered from the first method. You will only need to provide a * {@link Completion} for the additional 3rd argument. + *

+ * Additionally, if the final argument is a String object, the BukkitDelegate will automatically append any additional + * arguments to the end of the String. For example, if you have a subcommand method with the arguments + * {@code (Player, String)}, and the user executes the command with the arguments {@code /command playerName arg2 arg3}, + * the {@code String} argument will be {@code "arg2 arg3"}. This allows for us to use a String at the end of our + * subcommand arguments to allow for the user to input a reason. */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) diff --git a/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java b/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java index 680219d..0b28a8b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java +++ b/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java @@ -1,5 +1,8 @@ package me.totalfreedom.provider; +import me.totalfreedom.api.Context; +import me.totalfreedom.command.BukkitDelegate; +import me.totalfreedom.command.annotation.Subcommand; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -13,6 +16,26 @@ import org.jetbrains.annotations.Nullable; import java.util.Objects; import java.util.stream.Stream; +/** + * This class is used to provide context to subcommand methods. This class is used by the BukkitDelegate to parse + * arguments for subcommands. The following types are supported: + *

    + *
  • Boolean
  • + *
  • Double
  • + *
  • Integer
  • + *
  • Long
  • + *
  • Float
  • + *
  • Material
  • + *
  • Player
  • + *
  • World
  • + *
  • Location
  • + *
  • CommandSender
  • + *
  • Component
  • + *
+ * All of these types can be parsed from a String input. If the String cannot be parsed into any of + * these types, then null will be returned. + * @see #fromString(String, Class) + */ public class ContextProvider { public T fromString(final String string, final Class clazz) @@ -104,25 +127,29 @@ public class ContextProvider } /** - * When using this method, the input string must be formatted as - *
- * worldName,x,y,z - *
+ * When using this method, the next four arguments must be world, x, y, z. + * The world must be a valid world name, and x, y, and z must be valid doubles. + * If any of these are invalid, this will return null. * * @param string The string to parse * @return A location object if xyz is valid + * @see BukkitDelegate#processSubCommands(String[], CommandSender, ContextProvider, Subcommand) */ private @Nullable Location toLocation(final String string) { - final String[] split = string.split(","); + final String[] split = string.split(" "); if (split.length != 4 || toWorld(split[0]) == null) return null; - final double x = Double.parseDouble(split[1]); - final double y = Double.parseDouble(split[2]); - final double z = Double.parseDouble(split[3]); + try { + final double x = Double.parseDouble(split[1]); + final double y = Double.parseDouble(split[2]); + final double z = Double.parseDouble(split[3]); - return new Location(toWorld(split[0]), x, y, z); + return new Location(toWorld(split[0]), x, y, z); + } catch (NumberFormatException ex) { + return null; + } } private @Nullable CommandSender toCommandSender(final String string) From 09699ccabb1e5beccb7b3071444336ac618f55df Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Tue, 20 Jun 2023 09:24:28 -0500 Subject: [PATCH 02/18] AdminChat --- .../java/me/totalfreedom/corvo/Corvo.java | 18 +-- .../java/me/totalfreedom/datura/Datura.java | 26 ++-- .../datura/cmd/AdminChatCommand.java | 31 +++++ .../datura/perms/FreedomGroup.java | 4 +- .../datura/perms/FreedomUser.java | 22 ++-- .../totalfreedom/datura/punishment/Cager.java | 4 +- .../datura/punishment/Locker.java | 10 +- .../me/totalfreedom/datura/sql/MySQL.java | 50 ++++---- .../datura/user/SimpleUserData.java | 45 +++++-- .../java/me/totalfreedom/fossil/Fossil.java | 6 +- .../fossil/bouncypads/PadHolder.java | 4 +- .../base/{CommonsBase.java => Patchwork.java} | 6 +- .../me/totalfreedom/base/Registration.java | 2 +- .../java/me/totalfreedom/base/Shortcuts.java | 2 +- .../display/adminchat/ACFormatBuilder.java | 119 ++++++++++++++++++ .../display/adminchat/AdminChatDisplay.java | 97 ++++++++++++++ .../display/adminchat/AdminChatFormat.java | 97 ++++++++++++++ .../java/me/totalfreedom/event/EventBus.java | 8 +- .../java/me/totalfreedom/security/Groups.java | 30 +++++ .../totalfreedom/service/FreedomExecutor.java | 6 +- .../me/totalfreedom/shop/ReactionTask.java | 12 +- .../java/me/totalfreedom/user/UserData.java | 7 ++ .../utils/kyori/KyoriConstants.java | 4 +- 23 files changed, 507 insertions(+), 103 deletions(-) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java rename Patchwork/src/main/java/me/totalfreedom/base/{CommonsBase.java => Patchwork.java} (94%) create mode 100644 Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java create mode 100644 Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java create mode 100644 Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java create mode 100644 Patchwork/src/main/java/me/totalfreedom/security/Groups.java diff --git a/Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java b/Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java index ba1670b..e698dc5 100644 --- a/Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java +++ b/Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java @@ -1,6 +1,6 @@ package me.totalfreedom.corvo; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import org.bukkit.plugin.java.JavaPlugin; public class Corvo extends JavaPlugin @@ -8,18 +8,18 @@ public class Corvo extends JavaPlugin @Override public void onDisable() { - CommonsBase.getInstance() - .getRegistrations() - .getModuleRegistry() - .removeModule(this); + Patchwork.getInstance() + .getRegistrations() + .getModuleRegistry() + .removeModule(this); } @Override public void onEnable() { - CommonsBase.getInstance() - .getRegistrations() - .getModuleRegistry() - .addModule(this); + Patchwork.getInstance() + .getRegistrations() + .getModuleRegistry() + .addModule(this); } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/Datura.java b/Datura/src/main/java/me/totalfreedom/datura/Datura.java index da40da4..4680a03 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/Datura.java +++ b/Datura/src/main/java/me/totalfreedom/datura/Datura.java @@ -1,6 +1,6 @@ package me.totalfreedom.datura; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.datura.punishment.Cager; import me.totalfreedom.datura.punishment.Halter; import me.totalfreedom.datura.punishment.Locker; @@ -20,19 +20,19 @@ public class Datura extends JavaPlugin @Override public void onEnable() { - CommonsBase.getInstance() - .getRegistrations() - .getModuleRegistry() - .addModule(this); + Patchwork.getInstance() + .getRegistrations() + .getModuleRegistry() + .addModule(this); - CommonsBase.getInstance() - .getRegistrations() - .getServiceTaskRegistry() - .registerService(SubscriptionProvider.syncService(this, locker)); - CommonsBase.getInstance() - .getRegistrations() - .getServiceTaskRegistry() - .registerService(SubscriptionProvider.syncService(this, cager)); + Patchwork.getInstance() + .getRegistrations() + .getServiceTaskRegistry() + .registerService(SubscriptionProvider.syncService(this, locker)); + Patchwork.getInstance() + .getRegistrations() + .getServiceTaskRegistry() + .registerService(SubscriptionProvider.syncService(this, cager)); Bukkit.getPluginManager() .registerEvents(halter, this); diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java new file mode 100644 index 0000000..966d2bd --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java @@ -0,0 +1,31 @@ +package me.totalfreedom.datura.cmd; + +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Base; +import org.bukkit.command.CommandSender; +import org.bukkit.event.HandlerList; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +public class AdminChatCommand extends Commander +{ + + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected AdminChatCommand(@NotNull final JavaPlugin plugin) + { + super(plugin); + } + + @Base + public void onAdminChat(final CommandSender sender) { + + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java b/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java index a2ccc5d..affa495 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java +++ b/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java @@ -1,6 +1,6 @@ package me.totalfreedom.datura.perms; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.security.Group; import me.totalfreedom.security.Node; import net.kyori.adventure.text.Component; @@ -41,7 +41,7 @@ public class FreedomGroup implements Group this.isDefault = isDefault; this.isHidden = isHidden; this.permissions = new HashSet<>(); - this.attachment = new PermissionAttachment(CommonsBase.getInstance(), this); + this.attachment = new PermissionAttachment(Patchwork.getInstance(), this); } @Override diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java b/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java index 3f1510f..a055351 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java +++ b/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java @@ -1,6 +1,6 @@ package me.totalfreedom.datura.perms; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.datura.Datura; import me.totalfreedom.datura.user.SimpleUserData; import me.totalfreedom.security.Node; @@ -42,11 +42,11 @@ public class FreedomUser implements User this.permissions = new HashSet<>(); this.displayName = player.displayName(); - final Datura datura = CommonsBase.getInstance() - .getRegistrations() - .getModuleRegistry() - .getProvider(Datura.class) - .getModule(); + final Datura datura = Patchwork.getInstance() + .getRegistrations() + .getModuleRegistry() + .getProvider(Datura.class) + .getModule(); UserData data = SimpleUserData.fromSQL(datura.getSQL(), uuid.toString()); @@ -57,10 +57,10 @@ public class FreedomUser implements User this.userData = data; - CommonsBase.getInstance() - .getRegistrations() - .getUserRegistry() - .registerUserData(this, userData); + Patchwork.getInstance() + .getRegistrations() + .getUserRegistry() + .registerUserData(this, userData); } @Override @@ -96,7 +96,7 @@ public class FreedomUser implements User @Override public boolean addPermission(final Node node) { - final PermissionAttachment attachment = addAttachment(CommonsBase.getInstance(), node.key(), node.value()); + final PermissionAttachment attachment = addAttachment(Patchwork.getInstance(), node.key(), node.value()); bukkitAttachments.put(node, attachment); return permissions().add(node); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java b/Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java index 52920aa..5b3ef49 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java +++ b/Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java @@ -1,6 +1,6 @@ package me.totalfreedom.datura.punishment; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.service.Service; import me.totalfreedom.utils.ShapeUtils; import org.bukkit.Bukkit; @@ -32,7 +32,7 @@ public class Cager extends Service this.cagedPlayers = new HashSet<>(); this.cageLocations = new HashMap<>(); Bukkit.getPluginManager() - .registerEvents(new CageListener(), CommonsBase.getInstance()); + .registerEvents(new CageListener(), Patchwork.getInstance()); } /** diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java b/Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java index 9e1e027..c459037 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java +++ b/Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java @@ -1,6 +1,6 @@ package me.totalfreedom.datura.punishment; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.service.Service; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -35,10 +35,10 @@ public class Locker extends Service @Override public void tick() { - lockedPlayers.removeIf(uuid -> !CommonsBase.getInstance() - .getServer() - .getOfflinePlayer(uuid) - .isOnline()); + lockedPlayers.removeIf(uuid -> !Patchwork.getInstance() + .getServer() + .getOfflinePlayer(uuid) + .isOnline()); for (final UUID uuid : lockedPlayers) { diff --git a/Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java b/Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java index 9446e08..ae2debf 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java +++ b/Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java @@ -1,6 +1,6 @@ package me.totalfreedom.datura.sql; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.sql.SQL; import me.totalfreedom.utils.container.Identity; @@ -75,9 +75,9 @@ public class MySQL implements SQL throw new CompletionException("Failed to prepare statement: " + query + "\n", ex); } - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + }, Patchwork.getInstance() + .getExecutor() + .getAsync()); } private CompletableFuture getConnection() @@ -92,9 +92,9 @@ public class MySQL implements SQL throw new CompletionException("Failed to connect to the database: " + url.toString() + "\n", ex); } - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + }, Patchwork.getInstance() + .getExecutor() + .getAsync()); } @Override @@ -112,9 +112,9 @@ public class MySQL implements SQL "Failed to retrieve a result set from query: " + query + "\n", ex); } - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + }, Patchwork.getInstance() + .getExecutor() + .getAsync()); } @Override @@ -131,9 +131,9 @@ public class MySQL implements SQL throw new CompletionException("Failed to execute update: " + query + "\n", ex); } - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + }, Patchwork.getInstance() + .getExecutor() + .getAsync()); } @Override @@ -150,9 +150,9 @@ public class MySQL implements SQL throw new CompletionException("Failed to execute statement: " + query + "\n", ex); } - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + }, Patchwork.getInstance() + .getExecutor() + .getAsync()); } @Override @@ -194,26 +194,26 @@ public class MySQL implements SQL ex); } return null; - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + }, Patchwork.getInstance() + .getExecutor() + .getAsync()); } public CompletableFuture updateColumn(final String table, final String column, final Object value, final String key, final Identity identity) { return executeUpdate("UPDATE ? SET ? = ? WHERE ? = ?", table, column, value, key, identity.getId()) - .thenApplyAsync(result -> result > 0, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + .thenApplyAsync(result -> result > 0, Patchwork.getInstance() + .getExecutor() + .getAsync()); } public CompletableFuture deleteRow(final String table, final String key, final Identity identity) { return executeUpdate("DELETE FROM ? WHERE ? = ?", table, key, identity.getId()) - .thenApplyAsync(result -> result > 0, CommonsBase.getInstance() - .getExecutor() - .getAsync()); + .thenApplyAsync(result -> result > 0, Patchwork.getInstance() + .getExecutor() + .getAsync()); } public CompletableFuture insertRow(final String table, final Object... values) diff --git a/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java b/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java index 014876c..4a391c6 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java +++ b/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java @@ -1,8 +1,9 @@ package me.totalfreedom.datura.user; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.datura.event.UserDataUpdateEvent; import me.totalfreedom.datura.perms.FreedomUser; +import me.totalfreedom.display.adminchat.AdminChatFormat; import me.totalfreedom.security.Group; import me.totalfreedom.sql.SQL; import me.totalfreedom.user.User; @@ -29,6 +30,8 @@ public class SimpleUserData implements UserData private boolean canInteract; private AtomicLong balance; private boolean transactionsFrozen; + private boolean hasCustomACFormat = false; + private String customACFormat; public SimpleUserData(final Player player) { @@ -36,9 +39,9 @@ public class SimpleUserData implements UserData this.username = player.getName(); this.user = new FreedomUser(player); - CommonsBase.getInstance() - .getEventBus() - .addEvent(event); + Patchwork.getInstance() + .getEventBus() + .addEvent(event); } private SimpleUserData( @@ -59,6 +62,7 @@ public class SimpleUserData implements UserData this.canInteract = canInteract; this.balance = new AtomicLong(balance); this.transactionsFrozen = transactionsFrozen; + this.customACFormat = AdminChatFormat.DEFAULT.serialize(); } public static SimpleUserData fromSQL(final SQL sql, final String uuid) @@ -81,10 +85,10 @@ public class SimpleUserData implements UserData throw new IllegalStateException("Player should be online but they are not!"); final User user = new FreedomUser(player); - final Group group = CommonsBase.getInstance() - .getRegistrations() - .getGroupRegistry() - .getGroup(g); + final Group group = Patchwork.getInstance() + .getRegistrations() + .getGroupRegistry() + .getGroup(g); final long playtime = result.getLong("playtime"); final boolean canInteract = result.getBoolean("canInteract"); @@ -113,9 +117,9 @@ public class SimpleUserData implements UserData if (player == null) throw new IllegalStateException("Player should be online but they are not!"); return new SimpleUserData(player); - }, CommonsBase.getInstance() - .getExecutor() - .getAsync()) + }, Patchwork.getInstance() + .getExecutor() + .getAsync()) .join(); } @@ -219,4 +223,23 @@ public class SimpleUserData implements UserData { return balance.addAndGet(-amount); } + + @Override + public boolean hasCustomACFormat() + { + return hasCustomACFormat; + } + + @Override + public void setCustomACFormat(final String format) + { + this.hasCustomACFormat = format.equals(AdminChatFormat.DEFAULT.serialize()); + this.customACFormat = format; + } + + @Override + public AdminChatFormat getCustomACFormat() + { + return AdminChatFormat.deserialize(customACFormat); + } } diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java b/Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java index 18dc7fb..a4eda38 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java +++ b/Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java @@ -1,6 +1,6 @@ package me.totalfreedom.fossil; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.base.Registration; import me.totalfreedom.fossil.trail.Trailer; import me.totalfreedom.service.SubscriptionProvider; @@ -9,8 +9,8 @@ import org.bukkit.plugin.java.JavaPlugin; public class Fossil extends JavaPlugin { private final Trailer trailer = new Trailer(); - private final Registration registration = CommonsBase.getInstance() - .getRegistrations(); + private final Registration registration = Patchwork.getInstance() + .getRegistrations(); @Override public void onEnable() diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java b/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java index cd4842e..7af351b 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java +++ b/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java @@ -1,6 +1,6 @@ package me.totalfreedom.fossil.bouncypads; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.fossil.Fossil; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -33,7 +33,7 @@ public class PadHolder implements Listener public PadHolder() { Bukkit.getPluginManager() - .registerEvents(this, CommonsBase + .registerEvents(this, Patchwork .getInstance() .getRegistrations() .getModuleRegistry() diff --git a/Patchwork/src/main/java/me/totalfreedom/base/CommonsBase.java b/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java similarity index 94% rename from Patchwork/src/main/java/me/totalfreedom/base/CommonsBase.java rename to Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java index 69bade0..2ee663b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/CommonsBase.java +++ b/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java @@ -9,7 +9,7 @@ import org.bukkit.plugin.java.JavaPlugin; /** * The base class for Patchwork. */ -public class CommonsBase extends JavaPlugin +public class Patchwork extends JavaPlugin { /** * The {@link EventBus} for this plugin. @@ -30,9 +30,9 @@ public class CommonsBase extends JavaPlugin * * @return the plugin instance */ - public static CommonsBase getInstance() + public static Patchwork getInstance() { - return JavaPlugin.getPlugin(CommonsBase.class); + return JavaPlugin.getPlugin(Patchwork.class); } @Override diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Registration.java b/Patchwork/src/main/java/me/totalfreedom/base/Registration.java index e697fe9..db58a4f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Registration.java +++ b/Patchwork/src/main/java/me/totalfreedom/base/Registration.java @@ -12,7 +12,7 @@ import me.totalfreedom.data.UserRegistry; *
* Registries such as {@link ModuleRegistry} and {@link ServiceTaskRegistry} can be found as final objects in this * class. These registries should only ever be accessed through the single Registration object in CommonsBase using - * {@link CommonsBase#getRegistrations()} + * {@link Patchwork#getRegistrations()} */ public class Registration { diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java b/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java index 2194026..d3d7bf7 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java +++ b/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java @@ -10,6 +10,6 @@ public final class Shortcuts } public static ModuleProvider provideModule(final Class pluginClass) { - return CommonsBase.getInstance().getRegistrations().getModuleRegistry().getProvider(pluginClass); + return Patchwork.getInstance().getRegistrations().getModuleRegistry().getProvider(pluginClass); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java new file mode 100644 index 0000000..b676936 --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java @@ -0,0 +1,119 @@ +package me.totalfreedom.display.adminchat; + +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.format.TextColor; + +public class ACFormatBuilder +{ + private char openTag = '['; + private char closeTag = ']'; + private TextColor prefixColor = NamedTextColor.DARK_RED; + private TextColor bracketColor = NamedTextColor.WHITE; + private TextColor nameColor = NamedTextColor.AQUA; + private TextColor rankColor = NamedTextColor.GOLD; + private String prefix = "Admin"; + private String chatSplitter = ">>"; + + private ACFormatBuilder() + { + + } + + public static ACFormatBuilder format() + { + return new ACFormatBuilder(); + } + + public ACFormatBuilder openBracket(final char openTag) + { + this.openTag = openTag; + return this; + } + + public ACFormatBuilder closeBracket(final char closeTag) + { + this.closeTag = closeTag; + return this; + } + + public ACFormatBuilder prefixColor(final TextColor prefixColor) + { + this.prefixColor = prefixColor; + return this; + } + + public ACFormatBuilder bracketColor(final TextColor bracketColor) + { + this.bracketColor = bracketColor; + return this; + } + + public ACFormatBuilder prefix(final String prefix) + { + this.prefix = prefix; + return this; + } + + public ACFormatBuilder chatSplitter(final String chatSplitter) + { + this.chatSplitter = chatSplitter; + return this; + } + + public ACFormatBuilder nameColor(final TextColor nameColor) + { + this.nameColor = nameColor; + return this; + } + + public ACFormatBuilder rankColor(final TextColor rankColor) + { + this.rankColor = rankColor; + return this; + } + + String openBracket() + { + return String.valueOf(openTag); + } + + String closeBracket() + { + return String.valueOf(closeTag); + } + + TextColor prefixColor() + { + return prefixColor; + } + + TextColor bracketColor() + { + return bracketColor; + } + + TextColor nameColor() + { + return nameColor; + } + + TextColor rankColor() + { + return rankColor; + } + + String prefix() + { + return prefix; + } + + String chatSplitter() + { + return chatSplitter; + } + + public AdminChatFormat build() + { + return new AdminChatFormat(this); + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java new file mode 100644 index 0000000..06ec6d9 --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java @@ -0,0 +1,97 @@ +package me.totalfreedom.display.adminchat; + +import io.papermc.paper.event.player.AsyncChatEvent; +import me.totalfreedom.base.Patchwork; +import me.totalfreedom.base.Shortcuts; +import me.totalfreedom.data.UserRegistry; +import me.totalfreedom.user.UserData; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerJoinEvent; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +public class AdminChatDisplay +{ + private final Map adminChatFormat = new HashMap<>(); + private final Set toggledChat = new HashSet<>(); + + public AdminChatDisplay() { + new ACListener(this); + } + + public void addPlayer(final Player player, final AdminChatFormat format) + { + adminChatFormat.put(player.getUniqueId(), format); + } + + public void removePlayer(final Player player) + { + adminChatFormat.remove(player.getUniqueId()); + } + + public boolean hasPlayer(final Player player) + { + return adminChatFormat.containsKey(player.getUniqueId()); + } + + public void updateFormat(final Player player, final AdminChatFormat newFormat) + { + adminChatFormat.put(player.getUniqueId(), newFormat); + } + + public AdminChatFormat getFormat(final Player player) + { + return adminChatFormat.get(player.getUniqueId()); + } + + public Set getPlayers() + { + return adminChatFormat.keySet(); + } + + public Map getAdminChatFormat() + { + return adminChatFormat; + } + + public static final class ACListener implements Listener + { + private final AdminChatDisplay display; + + public ACListener(final AdminChatDisplay display) + { + this.display = display; + Bukkit.getPluginManager() + .registerEvents(this, Shortcuts.provideModule(Patchwork.class) + .getModule()); + } + + @EventHandler + public void playerChat(final AsyncChatEvent event) { + if (display.getPlayers().contains(event.getPlayer().getUniqueId())) { + event.setCancelled(true); + + } + } + + @EventHandler + public void playerJoin(final PlayerJoinEvent event) { + final Player player = event.getPlayer(); + if (player.hasPermission("patchwork.adminchat")) { + final UserData data = Patchwork.getInstance().getRegistrations().getUserRegistry().fromPlayer(player); + if (data.hasCustomACFormat()) { + display.addPlayer(player, data.getCustomACFormat()); + } else { + display.addPlayer(player, AdminChatFormat.DEFAULT); + } + } + } + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java new file mode 100644 index 0000000..b8dd757 --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java @@ -0,0 +1,97 @@ +package me.totalfreedom.display.adminchat; + +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.TextComponent; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; + +public final class AdminChatFormat +{ + public static final AdminChatFormat DEFAULT = ACFormatBuilder.format() + .build(); + private final Component prefix; + private final Component userName; + private final Component rank; + private final Component chatSplitter; + private final Component fullFormat; + + + AdminChatFormat(final ACFormatBuilder builder) + { + this.prefix = Component.text(builder.openBracket(), builder.bracketColor()) + .append(Component.text(builder.prefix(), builder.prefixColor())) + .append(Component.text(builder.closeBracket(), builder.bracketColor())); + this.userName = Component.text("%name%", builder.nameColor()); + this.rank = Component.text(builder.openBracket(), builder.bracketColor()) + .append(Component.text("%rank%", builder.rankColor())) + .append(Component.text(builder.closeBracket(), builder.bracketColor())); + this.chatSplitter = Component.text(builder.chatSplitter(), NamedTextColor.WHITE); + + this.fullFormat = prefix.append(Component.space()) + .append(userName) + .append(Component.space()) + .append(rank) + .append(Component.space()) + .append(chatSplitter) + .append(Component.space()); + } + + public static AdminChatFormat deserialize(final String serialized) + { + final Component dez = LegacyComponentSerializer.legacyAmpersand() + .deserialize(serialized); + final Component prefix = dez.children() + .get(0); + final Component userName = dez.children() + .get(1); + final Component rank = dez.children() + .get(2); + final Component chatSplitter = dez.children() + .get(3); + + return ACFormatBuilder.format() + .prefix(((TextComponent) prefix).content()) + .prefixColor(prefix.color()) + .nameColor(userName.color()) + .rankColor(rank.color()) + .chatSplitter(((TextComponent) chatSplitter).content()) + .build(); + } + + public Component getPrefix() + { + return prefix; + } + + public Component getUserName() + { + return userName; + } + + public Component getRank() + { + return rank; + } + + public Component getFullFormat() + { + return fullFormat; + } + + public Component format(final String name, final String rank) + { + return fullFormat.replaceText(b -> + { + b.matchLiteral("%name%") + .replacement(name); + b.matchLiteral("%rank%") + .replacement(rank); + }); + } + + public String serialize() + { + return LegacyComponentSerializer.legacyAmpersand() + .serialize(fullFormat); + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/event/EventBus.java b/Patchwork/src/main/java/me/totalfreedom/event/EventBus.java index 67b8514..e012d6f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/event/EventBus.java +++ b/Patchwork/src/main/java/me/totalfreedom/event/EventBus.java @@ -1,7 +1,7 @@ package me.totalfreedom.event; import me.totalfreedom.api.Context; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.service.Service; import java.util.HashSet; @@ -9,11 +9,11 @@ import java.util.Set; public class EventBus extends Service { - private final CommonsBase plugin; + private final Patchwork plugin; private final Set eventSet = new HashSet<>(); private final SubscriptionBox runningSubscriptions = new SubscriptionBox<>(); - public EventBus(final CommonsBase plugin) + public EventBus(final Patchwork plugin) { super("event_bus"); this.plugin = plugin; @@ -57,7 +57,7 @@ public class EventBus extends Service runningSubscriptions.removeSubscription(subscription); } - public CommonsBase getCommonsBase() + public Patchwork getCommonsBase() { return plugin; } diff --git a/Patchwork/src/main/java/me/totalfreedom/security/Groups.java b/Patchwork/src/main/java/me/totalfreedom/security/Groups.java new file mode 100644 index 0000000..2f92fa3 --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/security/Groups.java @@ -0,0 +1,30 @@ +package me.totalfreedom.security; + +public enum Groups +{ + NON_OP("patchwork.group.non-op"), + OP("patchwork.group.op"), + SUPER_ADMIN("patchwork.group.super"), + SENIOR_ADMIN("patchwork.group.senior"), + DEVELOPER("patchwork.group.dev"), + EXECUTIVE("patchwork.group.exec"), + OWNER("patchwork.group.owner"); + + private final String permission; + + Groups(final String permission) + { + this.permission = permission; + } + + public String getPermission() + { + return this.permission; + } + + @Override + public String toString() + { + return this.permission; + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java b/Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java index f090314..2b52f4e 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java +++ b/Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java @@ -1,6 +1,6 @@ package me.totalfreedom.service; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; @@ -29,9 +29,9 @@ public class FreedomExecutor public FreedomExecutor() { syncExecutor = r -> Bukkit.getScheduler() - .runTask(CommonsBase.getInstance(), r); + .runTask(Patchwork.getInstance(), r); asyncExecutor = r -> Bukkit.getScheduler() - .runTaskAsynchronously(CommonsBase.getInstance(), r); + .runTaskAsynchronously(Patchwork.getInstance(), r); } /** diff --git a/Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java b/Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java index cceb27e..f27f5c6 100644 --- a/Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java +++ b/Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java @@ -1,7 +1,7 @@ package me.totalfreedom.shop; import io.papermc.paper.event.player.AsyncChatEvent; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.display.BossBarDisplay; import me.totalfreedom.display.BossBarTimer; import me.totalfreedom.economy.EconomicEntity; @@ -36,7 +36,7 @@ public class ReactionTask extends Task implements Listener } final BossBarTimer timer = new BossBarTimer(bossBarDisplay, reaction.getReactionDuration()); - timer.runTaskTimer(CommonsBase.getInstance(), 0L, timer.getInterval()); + timer.runTaskTimer(Patchwork.getInstance(), 0L, timer.getInterval()); } @EventHandler @@ -45,10 +45,10 @@ public class ReactionTask extends Task implements Listener if (event.message() .equals(reaction.getReactionMessage())) { - final EconomicEntity entity = CommonsBase.getInstance() - .getRegistrations() - .getUserRegistry() - .getUser(event.getPlayer()); + final EconomicEntity entity = Patchwork.getInstance() + .getRegistrations() + .getUserRegistry() + .getUser(event.getPlayer()); reaction.onReact(entity); } diff --git a/Patchwork/src/main/java/me/totalfreedom/user/UserData.java b/Patchwork/src/main/java/me/totalfreedom/user/UserData.java index 2cfb8d1..a2c4b4a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/user/UserData.java +++ b/Patchwork/src/main/java/me/totalfreedom/user/UserData.java @@ -1,5 +1,6 @@ package me.totalfreedom.user; +import me.totalfreedom.display.adminchat.AdminChatFormat; import me.totalfreedom.economy.EconomicEntityData; import me.totalfreedom.security.Group; import org.jetbrains.annotations.NotNull; @@ -30,4 +31,10 @@ public interface UserData extends EconomicEntityData boolean canInteract(); void setInteractionState(boolean canInteract); + + boolean hasCustomACFormat(); + + void setCustomACFormat(final String customACFormat); + + AdminChatFormat getCustomACFormat(); } diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java b/Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java index 0ffbe29..aa33c59 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java +++ b/Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java @@ -1,6 +1,6 @@ package me.totalfreedom.utils.kyori; -import me.totalfreedom.base.CommonsBase; +import me.totalfreedom.base.Patchwork; import net.kyori.adventure.chat.ChatType; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; @@ -24,7 +24,7 @@ public final class KyoriConstants /** * A singleton {@link ChatType.Bound} for the Patchwork plugin. */ - public static final ChatType.Bound PATCHWORK = fromPlugin(CommonsBase.class); + public static final ChatType.Bound PATCHWORK = fromPlugin(Patchwork.class); private KyoriConstants() { From fb97a8e65b08823106ecfb60b963a5d6139e5fb7 Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Wed, 21 Jun 2023 15:45:55 -0500 Subject: [PATCH 03/18] updates --- .../datura/cmd/AdminChatCommand.java | 39 ++++++++++- .../totalfreedom/datura/cmd/CageCommand.java | 11 +-- .../totalfreedom/datura/cmd/HaltCommand.java | 14 ++-- .../totalfreedom/datura/cmd/SmiteCommand.java | 51 ++++++++++++++ .../datura/punishment/Halter.java | 3 +- .../datura/user/SimpleUserData.java | 12 ++-- .../java/me/totalfreedom/base/Patchwork.java | 16 +++++ .../java/me/totalfreedom/base/Shortcuts.java | 24 +++++-- .../totalfreedom/command/BukkitDelegate.java | 23 +++++-- .../display/adminchat/AdminChatDisplay.java | 69 +++++++++++++++---- .../display/adminchat/AdminChatFormat.java | 20 ++++-- .../java/me/totalfreedom/security/Groups.java | 41 ++++++++--- 12 files changed, 267 insertions(+), 56 deletions(-) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java index 966d2bd..6920d2f 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java @@ -1,12 +1,19 @@ package me.totalfreedom.datura.cmd; +import me.totalfreedom.base.Patchwork; import me.totalfreedom.command.Commander; import me.totalfreedom.command.annotation.Base; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; +import me.totalfreedom.command.annotation.Subcommand; +import net.kyori.adventure.text.Component; import org.bukkit.command.CommandSender; -import org.bukkit.event.HandlerList; +import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; +@Info(name = "") +@Permissive(perm = "") public class AdminChatCommand extends Commander { @@ -25,7 +32,33 @@ public class AdminChatCommand extends Commander } @Base - public void onAdminChat(final CommandSender sender) { - + public void onAdminChat(final CommandSender sender) + { + if (!(sender instanceof Player)) return; + + final Player player = (Player) sender; + + Patchwork.getInstance() + .getAdminChatDisplay() + .toggleChat(player); + + final boolean toggled = Patchwork.getInstance() + .getAdminChatDisplay() + .isToggled(player); + + String message = "Toggled adminchat "; + + message += toggled ? "on" : "off"; + + player.sendPlainMessage(message + "."); + } + + // String here will automatically have all additional args appended to it :) + @Subcommand(permission = "patchwork.adminchat", args = {String.class}) + public void sendMessage(final CommandSender sender, final String message) + { + Patchwork.getInstance() + .getAdminChatDisplay() + .adminChatMessage(sender, Component.text(message)); } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java index 91c12fc..375b38a 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java @@ -21,6 +21,7 @@ package me.totalfreedom.datura.cmd; +import me.totalfreedom.base.Shortcuts; import me.totalfreedom.command.Commander; import me.totalfreedom.command.annotation.Completion; import me.totalfreedom.command.annotation.Info; @@ -68,13 +69,15 @@ public class CageCommand extends Commander { if (string.equalsIgnoreCase("on")) { - ((Datura) getPlugin()).getCager() - .cagePlayer(player.getUniqueId(), material); + Shortcuts.provideModule(Datura.class) + .getCager() + .cagePlayer(player.getUniqueId(), material); sender.sendPlainMessage("Caged " + player.getName() + "."); } else if (string.equalsIgnoreCase("off")) { - ((Datura) getPlugin()).getCager() - .uncagePlayer(player.getUniqueId()); + Shortcuts.provideModule(Datura.class) + .getCager() + .uncagePlayer(player.getUniqueId()); sender.sendPlainMessage("Liberated " + player.getName() + "."); } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java index 0edca7c..a4bfd32 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java @@ -2,6 +2,7 @@ package me.totalfreedom.datura.cmd; import me.totalfreedom.base.Shortcuts; import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Completion; import me.totalfreedom.command.annotation.Info; import me.totalfreedom.command.annotation.Permissive; import me.totalfreedom.command.annotation.Subcommand; @@ -18,8 +19,7 @@ import org.jetbrains.annotations.NotNull; @Permissive(perm = "datura.halt") public class HaltCommand extends Commander { - private final Datura plugin = Shortcuts.provideModule(Datura.class) - .getModule(); + private final Datura plugin = Shortcuts.provideModule(Datura.class); /** * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the @@ -36,6 +36,8 @@ public class HaltCommand extends Commander } + @Completion(index = 0, args = {"%player%", "all"}) + @Completion(index = 1, args = {"on", "off"}) @Subcommand(permission = "datura.halt", args = {Player.class, String.class}) public void haltPlayer(final CommandSender sender, final Player target, final String toggle) { @@ -56,6 +58,7 @@ public class HaltCommand extends Commander } } + // No completion needed here since it's already registered. @Subcommand(permission = "datura.halt.all", args = {String.class, String.class}) public void haltAll(final CommandSender sender, final String all, final String toggle) { @@ -65,11 +68,8 @@ public class HaltCommand extends Commander { Bukkit.getServer() .getOnlinePlayers() - .forEach(player -> - { - plugin.getHalter() - .halt(player.getUniqueId()); - }); + .forEach(player -> plugin.getHalter() + .halt(player.getUniqueId())); final Component message = sender.name() .append(Component.text(": Freezing all players")) diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java new file mode 100644 index 0000000..531f59f --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java @@ -0,0 +1,51 @@ +package me.totalfreedom.datura.cmd; + +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Completion; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; +import me.totalfreedom.command.annotation.Subcommand; +import org.bukkit.Location; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +@Info(name = "smite", description = "Smite a player.", usage = "/smite ", aliases = {"sm"}) +@Permissive(perm = "datura.smite") +public class SmiteCommand extends Commander +{ + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected SmiteCommand(@NotNull final JavaPlugin plugin) + { + super(plugin); + } + + @Subcommand(permission = "datura.smite", args = {Player.class}) + @Completion(index = 0, args = {"%player%"}) + public void smite(final CommandSender sender, final Player player) + { + final double size = 5D; + for (int i = 0; i < size * size * size; i++) + { + final double x = i % size; + final double y = (i / size) % size; + final double z = (i / size / size) % size; + + final Location location = player.getLocation() + .clone() + .add(x - size / 2, y - size / 2, z - size / 2); + + player.getWorld() + .strikeLightning(location); + } + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java b/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java index af61b9b..5ffff30 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java +++ b/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java @@ -27,7 +27,8 @@ public class Halter implements Listener this.haltedPlayers.remove(uuid); } - public void clear() { + public void clear() + { this.haltedPlayers.clear(); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java b/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java index 4a391c6..c8d95e7 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java +++ b/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java @@ -230,16 +230,16 @@ public class SimpleUserData implements UserData return hasCustomACFormat; } + @Override + public AdminChatFormat getCustomACFormat() + { + return AdminChatFormat.deserialize(customACFormat); + } + @Override public void setCustomACFormat(final String format) { this.hasCustomACFormat = format.equals(AdminChatFormat.DEFAULT.serialize()); this.customACFormat = format; } - - @Override - public AdminChatFormat getCustomACFormat() - { - return AdminChatFormat.deserialize(customACFormat); - } } diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java b/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java index 2ee663b..e12ed34 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java +++ b/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java @@ -1,5 +1,6 @@ package me.totalfreedom.base; +import me.totalfreedom.display.adminchat.AdminChatDisplay; import me.totalfreedom.event.EventBus; import me.totalfreedom.service.FreedomExecutor; import me.totalfreedom.service.SubscriptionProvider; @@ -23,6 +24,10 @@ public class Patchwork extends JavaPlugin * The {@link FreedomExecutor} for this plugin. */ private final FreedomExecutor executor = new FreedomExecutor(); + /** + * The {@link AdminChatDisplay} for this plugin. + */ + private final AdminChatDisplay acdisplay = new AdminChatDisplay(); /** * Provides this plugin instance through a safe static method. This is effectively the same thing as using @@ -89,4 +94,15 @@ public class Patchwork extends JavaPlugin { return eventBus; } + + /** + * Gets the {@link AdminChatDisplay} for this plugin. The AdminChatDisplay is used to display messages sent in + * adminchat. + * + * @return the {@link AdminChatDisplay} + */ + public AdminChatDisplay getAdminChatDisplay() + { + return acdisplay; + } } diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java b/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java index d3d7bf7..0cb80e0 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java +++ b/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java @@ -1,15 +1,31 @@ package me.totalfreedom.base; -import me.totalfreedom.provider.ModuleProvider; +import me.totalfreedom.api.Context; +import me.totalfreedom.user.User; +import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public final class Shortcuts { - private Shortcuts() { + private Shortcuts() + { throw new AssertionError(); } - public static ModuleProvider provideModule(final Class pluginClass) { - return Patchwork.getInstance().getRegistrations().getModuleRegistry().getProvider(pluginClass); + public static T provideModule(final Class pluginClass) + { + return Patchwork.getInstance() + .getRegistrations() + .getModuleRegistry() + .getProvider(pluginClass) + .getModule(); + } + + public static User getUser(final Player player) + { + return Patchwork.getInstance() + .getRegistrations() + .getUserRegistry() + .getUser(player); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java index c122527..6da4d29 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java @@ -69,7 +69,7 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC @NotNull final String commandLabel, @NotNull final String[] args) { - if (sender instanceof ConsoleCommandSender && noConsole) + if (!(sender instanceof Player) && noConsole) { sender.sendMessage(Component.text("This command can only be run by players.")); return true; @@ -101,8 +101,13 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC { try { - command.getBaseMethod() - .invoke(command, sender); + if (noConsole) { + command.getBaseMethod() + .invoke(command, (Player)sender); + } else { + command.getBaseMethod() + .invoke(command, sender); + } } catch (Exception ex) { FreedomLogger.getLogger("Patchwork") @@ -154,9 +159,15 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC } try { - command.getSubcommands() - .get(node) - .invoke(command, sender, objects); + if (noConsole) { + command.getSubcommands() + .get(node) + .invoke(command, (Player)sender, objects); + } else { + command.getSubcommands() + .get(node) + .invoke(command, sender, objects); + } } catch (Exception ex) { FreedomLogger.getLogger("Patchwork") diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java index 06ec6d9..1c27cff 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java +++ b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java @@ -3,9 +3,11 @@ package me.totalfreedom.display.adminchat; import io.papermc.paper.event.player.AsyncChatEvent; import me.totalfreedom.base.Patchwork; import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.data.UserRegistry; +import me.totalfreedom.security.Groups; import me.totalfreedom.user.UserData; +import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -19,10 +21,12 @@ import java.util.UUID; public class AdminChatDisplay { + protected static final String ACPERM = "patchwork.adminchat"; private final Map adminChatFormat = new HashMap<>(); private final Set toggledChat = new HashSet<>(); - public AdminChatDisplay() { + public AdminChatDisplay() + { new ACListener(this); } @@ -61,6 +65,39 @@ public class AdminChatDisplay return adminChatFormat; } + public boolean isToggled(final Player player) + { + return toggledChat.contains(player.getUniqueId()); + } + + public void toggleChat(final Player player) + { + if (toggledChat.contains(player.getUniqueId())) + { + toggledChat.remove(player.getUniqueId()); + } else + { + toggledChat.add(player.getUniqueId()); + } + } + + public void adminChatMessage(final CommandSender sender, final Component message) + { + Bukkit.getOnlinePlayers() + .forEach(player -> + { + if (player.hasPermission(ACPERM)) + { + final Component formatted = Component.empty(); + formatted.append(getFormat(player).format(sender.getName(), Groups.fromSender(sender))) + .append(Component.space()) + .append(message); + + player.sendMessage(formatted); + } + }); + } + public static final class ACListener implements Listener { private final AdminChatDisplay display; @@ -69,26 +106,34 @@ public class AdminChatDisplay { this.display = display; Bukkit.getPluginManager() - .registerEvents(this, Shortcuts.provideModule(Patchwork.class) - .getModule()); + .registerEvents(this, Shortcuts.provideModule(Patchwork.class)); } @EventHandler - public void playerChat(final AsyncChatEvent event) { - if (display.getPlayers().contains(event.getPlayer().getUniqueId())) { + public void playerChat(final AsyncChatEvent event) + { + if (display.isToggled(event.getPlayer())) + { event.setCancelled(true); - + display.adminChatMessage(event.getPlayer(), event.message()); } } @EventHandler - public void playerJoin(final PlayerJoinEvent event) { + public void playerJoin(final PlayerJoinEvent event) + { final Player player = event.getPlayer(); - if (player.hasPermission("patchwork.adminchat")) { - final UserData data = Patchwork.getInstance().getRegistrations().getUserRegistry().fromPlayer(player); - if (data.hasCustomACFormat()) { + if (player.hasPermission(ACPERM)) + { + final UserData data = Patchwork.getInstance() + .getRegistrations() + .getUserRegistry() + .fromPlayer(player); + if (data.hasCustomACFormat()) + { display.addPlayer(player, data.getCustomACFormat()); - } else { + } else + { display.addPlayer(player, AdminChatFormat.DEFAULT); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java index b8dd757..5580c9e 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java +++ b/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java @@ -25,15 +25,25 @@ public final class AdminChatFormat this.rank = Component.text(builder.openBracket(), builder.bracketColor()) .append(Component.text("%rank%", builder.rankColor())) .append(Component.text(builder.closeBracket(), builder.bracketColor())); - this.chatSplitter = Component.text(builder.chatSplitter(), NamedTextColor.WHITE); - this.fullFormat = prefix.append(Component.space()) + // Nice formatting :( + if (builder.chatSplitter() + .equals(":")) + { + this.chatSplitter = Component.text(":", NamedTextColor.WHITE); + } else + { + this.chatSplitter = Component.space() + .append(Component.text(builder.chatSplitter(), NamedTextColor.WHITE)); + } + + // Formatting because []: is cleaner than [] :, but anything else such as [] >> or [] -> looks better with the space between. + this.fullFormat = prefix.appendSpace() .append(userName) - .append(Component.space()) + .appendSpace() .append(rank) - .append(Component.space()) .append(chatSplitter) - .append(Component.space()); + .appendSpace(); } public static AdminChatFormat deserialize(final String serialized) diff --git a/Patchwork/src/main/java/me/totalfreedom/security/Groups.java b/Patchwork/src/main/java/me/totalfreedom/security/Groups.java index 2f92fa3..105a54a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/Groups.java +++ b/Patchwork/src/main/java/me/totalfreedom/security/Groups.java @@ -1,20 +1,30 @@ package me.totalfreedom.security; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + public enum Groups { - NON_OP("patchwork.group.non-op"), - OP("patchwork.group.op"), - SUPER_ADMIN("patchwork.group.super"), - SENIOR_ADMIN("patchwork.group.senior"), - DEVELOPER("patchwork.group.dev"), - EXECUTIVE("patchwork.group.exec"), - OWNER("patchwork.group.owner"); + NON_OP("patchwork.group.non-op", "Non-OP"), + OP("patchwork.group.op", "OP"), + SUPER_ADMIN("patchwork.group.super", "Super Admin"), + SENIOR_ADMIN("patchwork.group.senior", "Senior Admin"), + DEVELOPER("patchwork.group.dev", "Developer"), + EXECUTIVE("patchwork.group.exec", "Executive"), + OWNER("patchwork.group.owner", "Owner"); private final String permission; + private final String name; - Groups(final String permission) + Groups(final String permission, final String name) { this.permission = permission; + this.name = name; + } + + public String getName() + { + return this.name; } public String getPermission() @@ -27,4 +37,19 @@ public enum Groups { return this.permission; } + + public static String fromPlayer(final Player player) { + for (final Groups group : values()) { + if (player.hasPermission(group.getPermission())) { + return group.getName(); + } + } + return Groups.NON_OP.getName(); + } + + public static String fromSender(final CommandSender sender) { + if (!(sender instanceof Player)) return "CONSOLE"; + + return fromPlayer((Player) sender); + } } From d0e8d6e3610a4336c0910f366f2abf9ac5d7de80 Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Sun, 25 Jun 2023 01:10:30 -0500 Subject: [PATCH 04/18] pbs kids --- .../datura/cmd/ClearDropsCommand.java | 94 ++++++++++++++++++ .../datura/cmd/ClearEntitiesCommand.java | 69 +++++++++++++ .../java/me/totalfreedom/utils/Tagged.java | 99 +++++++++++++++++++ .../me/totalfreedom/utils/container/Trio.java | 27 +---- .../utils/container/UnaryPair.java | 5 + .../utils/container/UnaryTrio.java | 27 +---- codestyle.xml | 73 ++++++++++++++ 7 files changed, 342 insertions(+), 52 deletions(-) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java create mode 100644 Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java create mode 100644 Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java create mode 100644 codestyle.xml diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java new file mode 100644 index 0000000..495d2ed --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java @@ -0,0 +1,94 @@ +package me.totalfreedom.datura.cmd; + + +import me.totalfreedom.base.Patchwork; +import me.totalfreedom.base.Shortcuts; +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Base; +import me.totalfreedom.command.annotation.Completion; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; +import me.totalfreedom.command.annotation.Subcommand; +import me.totalfreedom.datura.Datura; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Item; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +@Info(name = "cleardrops", description = "Clears all item drops in the world" + ".", usage = "/", aliases = + {"cd", "clearitems", "ci", "wipeitems", "wi"}) +@Permissive(perm = "datura.cleardrops") +public class ClearDropsCommand extends Commander +{ + /** + * Initializes this command object. The provided {@link JavaPlugin} + * should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and + * completions for this command. It will also + * automatically infer all required information from the provided + * {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected ClearDropsCommand(final @NotNull JavaPlugin plugin) + { + super(plugin); + } + + @Base + public void clearDrops(final CommandSender sender) + { + if (!(sender instanceof Player)) + { + sender.sendPlainMessage("You must define a world."); + return; + } + + final Player player = (Player) sender; + Patchwork.getInstance() + .getExecutor() + .delayedExecutor(Shortcuts.provideModule(Datura.class), 20 * 10L) + .execute(() -> + { + int i = 0; + for (final Entity entity : player.getWorld().getEntities()) + { + if (entity instanceof Item) + { + entity.remove(); + i++; + } + } + + player.sendPlainMessage("Successfully removed " + i + " items."); + }); + } + + @Subcommand(permission = "datura.cleardrops", args = {World.class}) + @Completion(index = 0, args = {"%world%"}) + public void clearDrops(final CommandSender sender, final World world) + { + Patchwork.getInstance() + .getExecutor() + .delayedExecutor(Shortcuts.provideModule(Datura.class), 20 * 10L) + .execute(() -> + { + int i = 0; + for (final Entity entity : world.getEntities()) + { + if (entity instanceof Item) + { + entity.remove(); + i++; + } + } + + sender.sendPlainMessage("Successfully removed " + i + " items."); + }); + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java new file mode 100644 index 0000000..9868235 --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java @@ -0,0 +1,69 @@ +package me.totalfreedom.datura.cmd; + +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Base; +import me.totalfreedom.command.annotation.Completion; +import me.totalfreedom.command.annotation.Subcommand; +import me.totalfreedom.utils.Tagged; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +public class ClearEntitiesCommand extends Commander +{ + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected ClearEntitiesCommand(final @NotNull JavaPlugin plugin) + { + super(plugin); + } + + @Base + public void clearEntities(final CommandSender sender) + { + if (!(sender instanceof Player)) + { + sender.sendPlainMessage("You must specify a world to clear entities from."); + return; + } + + final Player player = (Player) sender; + + int i = 0; + for (final Entity entity : player.getWorld().getEntities()) + { + if (!Tagged.NON_WIPEABLE.isTagged(entity.getType())) + { + entity.remove(); + i++; + } + } + sender.sendPlainMessage("Cleared " + i + " entities."); + } + + @Subcommand(permission = "datura.clearentities", args = {World.class}) + @Completion(index = 0, args = {"%world%"}) + public void clearEntities(final CommandSender sender, final World world) + { + int i = 0; + for (final Entity entity : world.getEntities()) + { + if (!Tagged.NON_WIPEABLE.isTagged(entity.getType())) + { + entity.remove(); + i++; + } + } + sender.sendPlainMessage("Cleared " + i + " entities."); + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java b/Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java new file mode 100644 index 0000000..568233e --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java @@ -0,0 +1,99 @@ +package me.totalfreedom.utils; + +import java.util.ArrayList; +import java.util.List; +import org.bukkit.entity.EntityType; +import org.jetbrains.annotations.NotNull; + +public final class Tagged +{ + public static final Tagged NON_WIPEABLE = new Tagged<>(EntityType.ITEM_FRAME, EntityType.BLOCK_DISPLAY, + EntityType.ITEM_DISPLAY, EntityType.LEASH_HITCH, + EntityType.CHEST_BOAT, EntityType.BOAT, + EntityType.TEXT_DISPLAY, + EntityType.GLOW_ITEM_FRAME, + EntityType.ARMOR_STAND, EntityType.PAINTING, + EntityType.PLAYER, EntityType.DROPPED_ITEM, + EntityType.MINECART, EntityType.MINECART_CHEST, + EntityType.MINECART_COMMAND, + EntityType.MINECART_FURNACE, + EntityType.MINECART_HOPPER, + EntityType.FISHING_HOOK, EntityType.DONKEY, + EntityType.HORSE, EntityType.IRON_GOLEM, + EntityType.RABBIT, EntityType.SNOWMAN, + EntityType.VILLAGER, EntityType.WOLF); + + public static final Tagged MINECARTS = new Tagged<>(EntityType.MINECART, EntityType.MINECART_CHEST, + EntityType.MINECART_COMMAND, + EntityType.MINECART_FURNACE, + EntityType.MINECART_HOPPER, + EntityType.MINECART_MOB_SPAWNER, + EntityType.MINECART_TNT); + + public static final Tagged BOATS = new Tagged<>(EntityType.BOAT, EntityType.CHEST_BOAT); + + public static final Tagged HOSTILE = new Tagged<>(EntityType.BLAZE, EntityType.CAVE_SPIDER, + EntityType.CREEPER, EntityType.DROWNED, + EntityType.ELDER_GUARDIAN, EntityType.ENDER_CRYSTAL, + EntityType.ENDER_DRAGON, EntityType.ENDERMAN, + EntityType.ENDERMITE, EntityType.EVOKER, + EntityType.EVOKER_FANGS, EntityType.GHAST, + EntityType.GIANT, EntityType.GUARDIAN, + EntityType.HOGLIN, EntityType.HUSK, + EntityType.ILLUSIONER, EntityType.MAGMA_CUBE, + EntityType.PHANTOM, EntityType.PIGLIN, + EntityType.PIGLIN_BRUTE, EntityType.PILLAGER, + EntityType.RAVAGER, EntityType.SHULKER, + EntityType.SILVERFISH, EntityType.SKELETON, + EntityType.SLIME, EntityType.SPIDER, EntityType.STRAY, + EntityType.VEX, EntityType.VINDICATOR, + EntityType.WARDEN, EntityType.WITCH, + EntityType.WITHER, EntityType.WITHER_SKELETON, + EntityType.ZOGLIN, EntityType.ZOMBIE, + EntityType.ZOMBIE_VILLAGER, + EntityType.ZOMBIFIED_PIGLIN); + + public static final Tagged PASSIVE = new Tagged<>(EntityType.BAT, EntityType.BEE, EntityType.CAT, + EntityType.CHICKEN, EntityType.COD, EntityType.COW, + EntityType.DOLPHIN, EntityType.DONKEY, EntityType.FOX, + EntityType.GOAT, EntityType.HORSE, + EntityType.IRON_GOLEM, EntityType.LLAMA, + EntityType.MULE, EntityType.MUSHROOM_COW, + EntityType.OCELOT, EntityType.PANDA, + EntityType.PARROT, EntityType.PIG, + EntityType.POLAR_BEAR, EntityType.PUFFERFISH, + EntityType.RABBIT, EntityType.SALMON, + EntityType.SHEEP, EntityType.SKELETON_HORSE, + EntityType.SNOWMAN, EntityType.SQUID, + EntityType.STRIDER, EntityType.TRADER_LLAMA, + EntityType.TROPICAL_FISH, EntityType.TURTLE, + EntityType.VILLAGER, EntityType.WANDERING_TRADER, + EntityType.WOLF); + + public static final Tagged PLAYER_RELATED = new Tagged<>(EntityType.PLAYER, EntityType.ARMOR_STAND, + EntityType.DROPPED_ITEM, EntityType.PAINTING, + EntityType.ITEM_FRAME, + EntityType.GLOW_ITEM_FRAME, + EntityType.LEASH_HITCH, + EntityType.FISHING_HOOK, + EntityType.TEXT_DISPLAY, + EntityType.BLOCK_DISPLAY, + EntityType.ITEM_DISPLAY); + + private final List tagged; + + private Tagged(final T... tagged) + { + this.tagged = new ArrayList<>(); + } + + public boolean isTagged(final @NotNull T object) + { + for (final T t : this.tagged) + { + if (object.equals(t)) + return true; + } + return false; + } +} diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java b/Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java index 90bf673..e3d61c2 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java +++ b/Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java @@ -1,30 +1,5 @@ package me.totalfreedom.utils.container; -public final class Trio +public record Trio(A primary, B secondary, C tertiary) { - private final A a; - private final B b; - private final C c; - - public Trio(final A a, final B b, final C c) - { - this.a = a; - this.b = b; - this.c = c; - } - - public A getPrimary() - { - return a; - } - - public B getSecondary() - { - return b; - } - - public C getTertiary() - { - return c; - } } diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java b/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java new file mode 100644 index 0000000..908cccf --- /dev/null +++ b/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java @@ -0,0 +1,5 @@ +package me.totalfreedom.utils.container; + +public record UnaryPair(T first, T second) +{ +} diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java b/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java index cf2e27f..ac455cd 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java +++ b/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java @@ -1,30 +1,5 @@ package me.totalfreedom.utils.container; -public class UnaryTrio +public record UnaryTrio(T primary, T secondary, T tertiary) { - private final T primary; - private final T secondary; - private final T tertiary; - - public UnaryTrio(final T primary, final T secondary, final T tertiary) - { - this.primary = primary; - this.secondary = secondary; - this.tertiary = tertiary; - } - - public T getPrimary() - { - return primary; - } - - public T getSecondary() - { - return secondary; - } - - public T getTertiary() - { - return tertiary; - } } diff --git a/codestyle.xml b/codestyle.xml new file mode 100644 index 0000000..a18269e --- /dev/null +++ b/codestyle.xml @@ -0,0 +1,73 @@ + + \ No newline at end of file From 2b12f4eebb5680bbe5bb6046c64f5c6815127040 Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Sun, 25 Jun 2023 21:46:01 -0500 Subject: [PATCH 05/18] hotfixes --- .../datura/cmd/ClearDropsCommand.java | 2 +- .../datura/cmd/ClearEntitiesCommand.java | 5 + .../datura/cmd/ManageUserCommand.java | 93 +++++++++++++++++++ .../datura/perms/FreedomGroup.java | 13 ++- .../datura/perms/PermissionNode.java | 16 +--- .../datura/perms/PermissionNodeBuilder.java | 18 +--- .../totalfreedom/command/BukkitDelegate.java | 4 + .../provider/ContextProvider.java | 68 ++++++++------ .../java/me/totalfreedom/security/Node.java | 2 - .../me/totalfreedom/security/NodeBuilder.java | 4 - 10 files changed, 151 insertions(+), 74 deletions(-) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java index 495d2ed..d616def 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java @@ -19,7 +19,7 @@ import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; @Info(name = "cleardrops", description = "Clears all item drops in the world" + ".", usage = "/", aliases = - {"cd", "clearitems", "ci", "wipeitems", "wi"}) + {"cd", "clearitems", "ci", "wipeitems", "wi", "removedrops", "rd"}) @Permissive(perm = "datura.cleardrops") public class ClearDropsCommand extends Commander { diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java index 9868235..6460a33 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java @@ -3,6 +3,8 @@ package me.totalfreedom.datura.cmd; import me.totalfreedom.command.Commander; import me.totalfreedom.command.annotation.Base; import me.totalfreedom.command.annotation.Completion; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; import me.totalfreedom.command.annotation.Subcommand; import me.totalfreedom.utils.Tagged; import org.bukkit.World; @@ -12,6 +14,9 @@ import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; +@Info(name = "clearentities", description = "Clears all entities in the world.", usage = "/ [world]", + aliases = {"ew", "ce", "entitywipe", "entityclear", "ec"}) +@Permissive(perm = "datura.clearentities") public class ClearEntitiesCommand extends Commander { /** diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java new file mode 100644 index 0000000..9c0b86b --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java @@ -0,0 +1,93 @@ +package me.totalfreedom.datura.cmd; + +import java.time.Duration; +import me.totalfreedom.base.Shortcuts; +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Completion; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; +import me.totalfreedom.command.annotation.Subcommand; +import me.totalfreedom.datura.perms.PermissionNodeBuilder; +import me.totalfreedom.security.Node; +import me.totalfreedom.security.NodeType; +import me.totalfreedom.security.PermissionHolder; +import me.totalfreedom.user.User; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +@Info(name = "manageuser", description = "Manage a user's permissions", usage = "/manageuser )>", aliases = {"mu", "userdata", "ud", "usermanager", "um"}) +@Permissive(perm = "datura.manageuser") +public class ManageUserCommand extends Commander +{ + + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected ManageUserCommand(final @NotNull JavaPlugin plugin) + { + super(plugin); + } + + @Subcommand(permission = "datura.manageuser", args = {Player.class, String.class, String.class, Long.class}) + @Completion(index = 0, args = {"%player%"}) + @Completion(index = 1, args = {"info", "add", "remove"}) + @Completion(index = 2, args = {""}) + public void manageUser(final CommandSender sender, final Player player, final String addOrRemove, + final String permission, final long duration) + { + final PermissionHolder user = Shortcuts.getUser(player); + final Node node = new PermissionNodeBuilder().key(permission) + .type(NodeType.PERMISSION) + .expiry(Duration.ofMinutes(duration) + .getSeconds() + System.currentTimeMillis()) + .build(); + ifElse(addOrRemove, user, node); + } + + @Subcommand(permission = "datura.manageuser", args = {Player.class, String.class, String.class}) + public void manageUser(final CommandSender sender, final Player player, final String addOrRemove, + final String permission) + { + final PermissionHolder user = Shortcuts.getUser(player); + final Node node = new PermissionNodeBuilder().key(permission).type(NodeType.PERMISSION).build(); + ifElse(addOrRemove, user, node); + } + + @Subcommand(permission = "datura.manageuser", args = {Player.class, String.class}) + public void userInfo(final CommandSender sender, final Player player, final String info) + { + final User user = Shortcuts.getUser(player); + if (info.equalsIgnoreCase("info")) + { + final StringBuilder permissions = new StringBuilder(); + user.getEffectivePermissions().forEach(node -> permissions.append(node.getPermission())); + final String text = """ + User: %s + Group: %s + Permissions: %s""".formatted(user.getName(), user.getUserData().getGroup(), + permissions.toString()); + sender.sendPlainMessage(text); + } + } + + private void ifElse(final String addOrRemove, final PermissionHolder user, final Node node) + { + if (addOrRemove.equalsIgnoreCase("add")) + { + user.addPermission(node); + } + else if (addOrRemove.equalsIgnoreCase("remove")) + { + user.removePermission(node); + } + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java b/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java index affa495..7627933 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java +++ b/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java @@ -114,7 +114,7 @@ public class FreedomGroup implements Group .findFirst() .orElse(null); - return node != null && node.value(); + return node != null; } @Override @@ -127,7 +127,7 @@ public class FreedomGroup implements Group .findFirst() .orElse(null); - return node != null && node.value(); + return node != null; } @Override @@ -139,7 +139,7 @@ public class FreedomGroup implements Group .findFirst() .orElse(null); - return node != null && node.value(); + return node != null; } @Override @@ -152,7 +152,7 @@ public class FreedomGroup implements Group .findFirst() .orElse(null); - return node != null && node.value(); + return node != null; } /** @@ -214,8 +214,7 @@ public class FreedomGroup implements Group .map(n -> new PermissionAttachmentInfo( this, n.key(), - attachment, - n.value())) + attachment, true)) .collect(Collectors.toSet()); } @@ -228,7 +227,7 @@ public class FreedomGroup implements Group .findFirst() .orElse(null); - return node != null && node.value(); + return node != null; } @Override diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java b/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java index 48870b9..a83c115 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java +++ b/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java @@ -5,29 +5,19 @@ import me.totalfreedom.security.NodeType; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; -record PermissionNode(String key, - boolean value, - long expiry, - NodeType type, - boolean wildcard) implements Node +record PermissionNode(String key, long expiry, NodeType type, boolean wildcard) implements Node { @Override public Permission bukkit() { - return new Permission(key(), - value() - ? PermissionDefault.TRUE - : PermissionDefault.FALSE); + return new Permission(key(), PermissionDefault.FALSE); } @Override public boolean compare(final Node node) { - return node.key() - .equalsIgnoreCase(key()) - && node.value() == value() - && node.type() == type(); + return node.key().equalsIgnoreCase(key()) && node.type().equals(type()) && !node.isExpired(); } @Override diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java b/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java index a89e69b..87b8fa0 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java +++ b/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java @@ -7,11 +7,9 @@ import me.totalfreedom.security.NodeType; public class PermissionNodeBuilder implements NodeBuilder { private String key = "freedom.default"; - private boolean value = true; private long expiry = -1; private NodeType type = NodeType.PERMISSION; private boolean wildcard = false; - private boolean negated = false; @Override public NodeBuilder key(final String key) @@ -20,13 +18,6 @@ public class PermissionNodeBuilder implements NodeBuilder return this; } - @Override - public NodeBuilder value(final boolean value) - { - this.value = value; - return this; - } - @Override public NodeBuilder expiry(final long expiry) { @@ -48,16 +39,9 @@ public class PermissionNodeBuilder implements NodeBuilder return this; } - @Override - public NodeBuilder negated(final boolean negated) - { - this.negated = negated; - return this; - } - @Override public Node build() { - return new PermissionNode(key, value, expiry, type, wildcard, negated); + return new PermissionNode(key, expiry, type, wildcard); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java index 6da4d29..e5ee289 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java @@ -155,6 +155,10 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC } final Object obj = provider.fromString(arg, argType); + if (obj == null) { + FreedomLogger.getLogger("Datura").error("Failed to parse argument " + arg + " for type " + argType.getName()); + return; + } objects[i] = obj; } try diff --git a/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java b/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java index 0b28a8b..aaf5d2d 100644 --- a/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java +++ b/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java @@ -40,25 +40,26 @@ public class ContextProvider { public T fromString(final String string, final Class clazz) { - return Stream.of(toBoolean(string), - toDouble(string), - toInt(string), - toLong(string), - toFloat(string), - toMaterial(string), - toPlayer(string), - toWorld(string), - toLocation(string), - toCommandSender(string), - toComponent(string)) + return Stream.of(toBoolean(string, clazz), + toDouble(string, clazz), + toInt(string, clazz), + toLong(string, clazz), + toFloat(string, clazz), + toMaterial(string, clazz), + toPlayer(string, clazz), + toWorld(string, clazz), + toLocation(string, clazz), + toComponent(string, clazz)) .filter(Objects::nonNull) .findFirst() .map(clazz::cast) .orElse(null); } - private @Nullable Boolean toBoolean(final String string) + private @Nullable Boolean toBoolean(final String string, final Class clazz) { + if (clazz != Boolean.class) return null; + // Previously we used Boolean#parseBoolean, but that will always return a value and does not throw // an exception. This means that if the string is not "true" or "false", it will return false. if (string.equalsIgnoreCase("true")) return true; @@ -67,8 +68,10 @@ public class ContextProvider return null; } - private @Nullable Double toDouble(final String string) + private @Nullable Double toDouble(final String string, final Class clazz) { + if (clazz != Double.class) return null; + try { return Double.parseDouble(string); @@ -78,8 +81,10 @@ public class ContextProvider } } - private @Nullable Integer toInt(final String string) + private @Nullable Integer toInt(final String string, final Class clazz) { + if (clazz != Integer.class) return null; + try { return Integer.parseInt(string); @@ -89,8 +94,10 @@ public class ContextProvider } } - private @Nullable Long toLong(final String string) + private @Nullable Long toLong(final String string, final Class clazz) { + if (clazz != Long.class) return null; + try { return Long.parseLong(string); @@ -100,8 +107,10 @@ public class ContextProvider } } - private @Nullable Float toFloat(final String string) + private @Nullable Float toFloat(final String string, final Class clazz) { + if (clazz != Float.class) return null; + try { return Float.parseFloat(string); @@ -111,18 +120,21 @@ public class ContextProvider } } - private @Nullable Material toMaterial(final String string) + private @Nullable Material toMaterial(final String string, final Class clazz) { + if (clazz != Material.class) return null; return Material.matchMaterial(string); } - private @Nullable Player toPlayer(final String string) + private @Nullable Player toPlayer(final String string, final Class clazz) { + if (clazz != Player.class) return null; return Bukkit.getPlayer(string); } - private @Nullable World toWorld(final String string) + private @Nullable World toWorld(final String string, final Class clazz) { + if (clazz != World.class) return null; return Bukkit.getWorld(string); } @@ -135,32 +147,28 @@ public class ContextProvider * @return A location object if xyz is valid * @see BukkitDelegate#processSubCommands(String[], CommandSender, ContextProvider, Subcommand) */ - private @Nullable Location toLocation(final String string) + private @Nullable Location toLocation(final String string, final Class clazz) { + if (clazz != Location.class) return null; + final String[] split = string.split(" "); - if (split.length != 4 || toWorld(split[0]) == null) return null; + if (split.length != 4 || toWorld(split[0], World.class) == null) return null; try { final double x = Double.parseDouble(split[1]); final double y = Double.parseDouble(split[2]); final double z = Double.parseDouble(split[3]); - return new Location(toWorld(split[0]), x, y, z); + return new Location(toWorld(split[0], World.class), x, y, z); } catch (NumberFormatException ex) { return null; } } - private @Nullable CommandSender toCommandSender(final String string) - { - if (toPlayer(string) == null) return null; - - return toPlayer(string); - } - - private @NotNull Component toComponent(final String string) + private @Nullable Component toComponent(final String string, final Class clazz) { + if (clazz != Component.class) return null; return Component.text(string); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/security/Node.java b/Patchwork/src/main/java/me/totalfreedom/security/Node.java index 8af9348..38fe451 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/Node.java +++ b/Patchwork/src/main/java/me/totalfreedom/security/Node.java @@ -9,8 +9,6 @@ public interface Node { String key(); - boolean value(); - Permission bukkit(); NodeType type(); diff --git a/Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java b/Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java index c0503ff..05c3ee9 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java +++ b/Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java @@ -4,15 +4,11 @@ public interface NodeBuilder { NodeBuilder key(String key); - NodeBuilder value(boolean value); - NodeBuilder expiry(long expiry); NodeBuilder type(NodeType type); NodeBuilder wildcard(boolean wildcard); - NodeBuilder negated(boolean negated); - Node build(); } From 6842cb2792666b4f2bb1141953586d7a41553a5a Mon Sep 17 00:00:00 2001 From: Paul Reilly Date: Sun, 23 Jul 2023 02:15:12 -0500 Subject: [PATCH 06/18] Adjusted Command Processing Completion annotations have been moved to top level, from per method, for a much clearer understanding of how the annotation should be used. --- .../totalfreedom/datura/cmd/CageCommand.java | 6 +- .../datura/cmd/ClearDropsCommand.java | 2 +- .../datura/cmd/ClearEntitiesCommand.java | 2 +- .../totalfreedom/datura/cmd/HaltCommand.java | 6 +- .../datura/cmd/LockerCommand.java | 4 +- .../datura/cmd/ManageUserCommand.java | 6 +- .../totalfreedom/datura/cmd/SmiteCommand.java | 2 +- .../audience/MutableAudienceForwarder.java | 11 ++- .../totalfreedom/command/BukkitDelegate.java | 69 +++++++++++-------- .../command/annotation/Completion.java | 2 +- .../command/annotation/Completions.java | 6 +- .../data/ServiceTaskRegistry.java | 2 +- .../totalfreedom/display/DisplayableView.java | 1 + .../java/me/totalfreedom/particle/Trail.java | 2 +- .../java/me/totalfreedom/shop/Reaction.java | 10 +-- build.gradle | 6 ++ 16 files changed, 71 insertions(+), 66 deletions(-) diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java index 375b38a..c3d6fa6 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java @@ -37,6 +37,9 @@ import org.jetbrains.annotations.NotNull; @Info(name = "cage", description = "Cage a player.", usage = "/cage [material]") @Permissive(perm = "datura.cage") +@Completion(args = {"%player%"}, index = 0) +@Completion(args = {"on", "off"}, index = 1) +@Completion(args = {"[material]"}, index = 2) public class CageCommand extends Commander { protected CageCommand(final @NotNull JavaPlugin plugin) @@ -44,8 +47,6 @@ public class CageCommand extends Commander super(plugin); } - @Completion(args = {"%player%"}, index = 0) - @Completion(args = {"on", "off"}, index = 1) @Subcommand(permission = "datura.cage", args = {Player.class, String.class}) public void cagePlayer(final CommandSender sender, final Player player, final String string) { @@ -62,7 +63,6 @@ public class CageCommand extends Commander } } - @Completion(args = {"[material]"}, index = 2) @Subcommand(permission = "datura.cage.custom", args = {Player.class, String.class, Material.class}) public void cagePlayer(final CommandSender sender, final Player player, final String string, final Material material) diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java index d616def..5168a5a 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java @@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull; @Info(name = "cleardrops", description = "Clears all item drops in the world" + ".", usage = "/", aliases = {"cd", "clearitems", "ci", "wipeitems", "wi", "removedrops", "rd"}) @Permissive(perm = "datura.cleardrops") +@Completion(index = 0, args = {"%world%"}) public class ClearDropsCommand extends Commander { /** @@ -70,7 +71,6 @@ public class ClearDropsCommand extends Commander } @Subcommand(permission = "datura.cleardrops", args = {World.class}) - @Completion(index = 0, args = {"%world%"}) public void clearDrops(final CommandSender sender, final World world) { Patchwork.getInstance() diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java index 6460a33..f77cf16 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java @@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull; @Info(name = "clearentities", description = "Clears all entities in the world.", usage = "/ [world]", aliases = {"ew", "ce", "entitywipe", "entityclear", "ec"}) @Permissive(perm = "datura.clearentities") +@Completion(index = 0, args = {"%world%"}) public class ClearEntitiesCommand extends Commander { /** @@ -57,7 +58,6 @@ public class ClearEntitiesCommand extends Commander } @Subcommand(permission = "datura.clearentities", args = {World.class}) - @Completion(index = 0, args = {"%world%"}) public void clearEntities(final CommandSender sender, final World world) { int i = 0; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java index a4bfd32..903da90 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java @@ -17,6 +17,8 @@ import org.jetbrains.annotations.NotNull; @Info(name = "halt", description = "Halt a single player, or every player.", usage = "/ ") @Permissive(perm = "datura.halt") +@Completion(index = 0, args = {"%player%", "all"}) +@Completion(index = 1, args = {"on", "off"}) public class HaltCommand extends Commander { private final Datura plugin = Shortcuts.provideModule(Datura.class); @@ -35,9 +37,6 @@ public class HaltCommand extends Commander super(plugin); } - - @Completion(index = 0, args = {"%player%", "all"}) - @Completion(index = 1, args = {"on", "off"}) @Subcommand(permission = "datura.halt", args = {Player.class, String.class}) public void haltPlayer(final CommandSender sender, final Player target, final String toggle) { @@ -58,7 +57,6 @@ public class HaltCommand extends Commander } } - // No completion needed here since it's already registered. @Subcommand(permission = "datura.halt.all", args = {String.class, String.class}) public void haltAll(final CommandSender sender, final String all, final String toggle) { diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java index 38f9f2c..0623c84 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java @@ -13,6 +13,8 @@ import org.jetbrains.annotations.NotNull; @Info(name = "locker", description = "Lock a player, preventing them from interacting with their game client.", usage = "/locker ", aliases = {"lock", "lockup"}) @Permissive(perm = "datura.locker") +@Completion(args = {"%player%"}, index = 0) +@Completion(args = {"on", "off"}, index = 1) public final class LockerCommand extends Commander { public LockerCommand(final @NotNull Datura plugin) @@ -20,8 +22,6 @@ public final class LockerCommand extends Commander super(plugin); } - @Completion(args = {"%player%"}, index = 0) - @Completion(args = {"on", "off"}, index = 1) @Subcommand(permission = "datura.locker", args = {Player.class, String.class}) public void lockPlayer(final CommandSender sender, final Player player, final String string) { diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java index 9c0b86b..026cb17 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java @@ -20,6 +20,9 @@ import org.jetbrains.annotations.NotNull; @Info(name = "manageuser", description = "Manage a user's permissions", usage = "/manageuser )>", aliases = {"mu", "userdata", "ud", "usermanager", "um"}) @Permissive(perm = "datura.manageuser") +@Completion(index = 0, args = {"%player%"}) +@Completion(index = 1, args = {"info", "add", "remove"}) +@Completion(index = 2, args = {""}) public class ManageUserCommand extends Commander { @@ -38,9 +41,6 @@ public class ManageUserCommand extends Commander } @Subcommand(permission = "datura.manageuser", args = {Player.class, String.class, String.class, Long.class}) - @Completion(index = 0, args = {"%player%"}) - @Completion(index = 1, args = {"info", "add", "remove"}) - @Completion(index = 2, args = {""}) public void manageUser(final CommandSender sender, final Player player, final String addOrRemove, final String permission, final long duration) { diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java index 531f59f..c434d7e 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java @@ -13,6 +13,7 @@ import org.jetbrains.annotations.NotNull; @Info(name = "smite", description = "Smite a player.", usage = "/smite ", aliases = {"sm"}) @Permissive(perm = "datura.smite") +@Completion(index = 0, args = {"%player%"}) public class SmiteCommand extends Commander { /** @@ -30,7 +31,6 @@ public class SmiteCommand extends Commander } @Subcommand(permission = "datura.smite", args = {Player.class}) - @Completion(index = 0, args = {"%player%"}) public void smite(final CommandSender sender, final Player player) { final double size = 5D; diff --git a/Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java b/Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java index f725d73..38eaf1a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java +++ b/Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java @@ -1,5 +1,9 @@ package me.totalfreedom.audience; +import java.util.HashSet; +import java.util.Set; +import java.util.function.Consumer; +import java.util.function.Predicate; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.bossbar.BossBar; import net.kyori.adventure.chat.ChatType; @@ -13,13 +17,8 @@ import net.kyori.adventure.title.Title; import net.kyori.adventure.title.TitlePart; import org.jetbrains.annotations.NotNull; -import java.util.HashSet; -import java.util.Set; -import java.util.function.Consumer; -import java.util.function.Predicate; - /** - * A replacement for {@link net.kyori.adventure.audience.ForwardingAudience} that allows for audiences to be removed & + * A replacement for {@link net.kyori.adventure.audience.ForwardingAudience} that allows for audiences to be removed and * added at will. Not thread safe. *

* This is intended for use in toggleable logging systems, for example, potion spy. diff --git a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java index e5ee289..6ac04ff 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java @@ -1,5 +1,9 @@ package me.totalfreedom.command; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; import me.totalfreedom.command.annotation.Completion; import me.totalfreedom.command.annotation.Subcommand; import me.totalfreedom.provider.ContextProvider; @@ -10,24 +14,18 @@ import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; -import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.PluginIdentifiableCommand; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Set; - /** * This class is acts as a delegate between our custom command implementation and the Bukkit API. *
* This class is not meant to be used directly, and is only public to allow for the Bukkit API to access it. As a * result, this file will remain undocumented. - * + *
*
* This class is not thread-safe. *
@@ -36,7 +34,6 @@ import java.util.Set; * This class is not meant to be instantiated. *
* This class is not meant to be used outside Patchwork. - *
*/ public final class BukkitDelegate extends Command implements PluginIdentifiableCommand { @@ -101,14 +98,18 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC { try { - if (noConsole) { + if (noConsole) + { command.getBaseMethod() - .invoke(command, (Player)sender); - } else { + .invoke(command, (Player) sender); + } + else + { command.getBaseMethod() .invoke(command, sender); } - } catch (Exception ex) + } + catch (Exception ex) { FreedomLogger.getLogger("Patchwork") .error(ex); @@ -142,37 +143,45 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC final String[] reasonArgs = Arrays.copyOfRange(args, i, args.length - 1); final String reason = String.join(" ", reasonArgs); objects[i] = reason; - } else + } + else { continue; } } - if (argType.equals(Location.class)) { + if (argType.equals(Location.class)) + { final String[] locationArgs = Arrays.copyOfRange(args, i, i + 3); final String location = String.join(" ", locationArgs); objects[i] = location; } final Object obj = provider.fromString(arg, argType); - if (obj == null) { - FreedomLogger.getLogger("Datura").error("Failed to parse argument " + arg + " for type " + argType.getName()); + if (obj == null) + { + FreedomLogger.getLogger("Datura") + .error("Failed to parse argument " + arg + " for type " + argType.getName()); return; } objects[i] = obj; } try { - if (noConsole) { + if (noConsole) + { command.getSubcommands() .get(node) - .invoke(command, (Player)sender, objects); - } else { + .invoke(command, (Player) sender, objects); + } + else + { command.getSubcommands() .get(node) .invoke(command, sender, objects); } - } catch (Exception ex) + } + catch (Exception ex) { FreedomLogger.getLogger("Patchwork") .error(ex); @@ -204,16 +213,16 @@ public final class BukkitDelegate extends Command implements PluginIdentifiableC .map(World::getName) .toList()); case "%number%" -> results.addAll(List.of( - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9")); + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9")); case "%location%" -> results.add("world x y z"); default -> results.add(p); } diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java b/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java index d32efa4..1613184 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java @@ -12,7 +12,7 @@ import java.lang.annotation.Target; * This will register at class level, and does not retain method information. As a result, you only need to register the * arguments a single time, and it will always be used in tab completions. */ -@Target(ElementType.METHOD) +@Target(ElementType.TYPE) @Repeatable(Completions.class) @Retention(RetentionPolicy.RUNTIME) public @interface Completion diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java b/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java index 694804e..cdcfb15 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java +++ b/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java @@ -8,10 +8,10 @@ import java.lang.annotation.Target; /** * A marker interface which represents a holder for multiple {@link Completion} annotations. *
- * This interface is NOT intended for implementation and should - * NOT be used. + * This interface is NOT intended for implementation and should + * NOT be used. */ -@Target(ElementType.METHOD) +@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Completions { diff --git a/Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java b/Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java index 2cf3e8d..e734b8e 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java +++ b/Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java @@ -284,7 +284,7 @@ public class ServiceTaskRegistry *
* The service should have been registered previously as a ServiceSubscription. * - * @param service The service you are trying to unregister. + * @param clazz The service you are trying to unregister. * @see #registerService(ServiceSubscription) * @see ServiceSubscription */ diff --git a/Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java b/Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java index 26c5138..7c4e2ec 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java +++ b/Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java @@ -78,6 +78,7 @@ public class DisplayableView extends InventoryView } @Override + @Deprecated(forRemoval = true, since = "1.16") public @NotNull String getTitle() { return title; diff --git a/Patchwork/src/main/java/me/totalfreedom/particle/Trail.java b/Patchwork/src/main/java/me/totalfreedom/particle/Trail.java index b6ef17f..f9f934a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/particle/Trail.java +++ b/Patchwork/src/main/java/me/totalfreedom/particle/Trail.java @@ -56,7 +56,7 @@ public interface Trail * * @return The color of the trail, or null if the trail is a gradient or non-colorable. * @see Particle - * @see #getColors(); + * @see #getColors() */ @Nullable Color getColor(); diff --git a/Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java b/Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java index 0b96cc7..ad1c761 100644 --- a/Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java +++ b/Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java @@ -1,9 +1,7 @@ package me.totalfreedom.shop; -import me.totalfreedom.display.BossBarDisplay; -import net.kyori.adventure.text.Component; - import java.time.Duration; +import net.kyori.adventure.text.Component; /** * Represents a chat reaction that can be performed by a player. @@ -59,10 +57,4 @@ public abstract class Reaction implements Reactable { return reactionType; } - - @Override - public BossBarDisplay getBossBarDisplay() - { - - } } diff --git a/build.gradle b/build.gradle index f6090f2..5c91798 100644 --- a/build.gradle +++ b/build.gradle @@ -59,6 +59,12 @@ subprojects { weight = 0 } } + + javadoc { + options { + encoding = 'UTF-8' + } + } } tasks.register('buildChain') { From 722b1b72a4e34f727ad49191631826889e31e882 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 31 Jul 2023 12:53:20 +0200 Subject: [PATCH 07/18] Implemented basic command spy --- .../java/me/totalfreedom/datura/Datura.java | 11 ++++ .../datura/cmd/CommandSpyCommand.java | 58 +++++++++++++++++++ .../datura/features/CommandSpy.java | 55 ++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java create mode 100644 Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java diff --git a/Datura/src/main/java/me/totalfreedom/datura/Datura.java b/Datura/src/main/java/me/totalfreedom/datura/Datura.java index 4680a03..60e39a1 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/Datura.java +++ b/Datura/src/main/java/me/totalfreedom/datura/Datura.java @@ -1,6 +1,7 @@ package me.totalfreedom.datura; import me.totalfreedom.base.Patchwork; +import me.totalfreedom.datura.features.CommandSpy; import me.totalfreedom.datura.punishment.Cager; import me.totalfreedom.datura.punishment.Halter; import me.totalfreedom.datura.punishment.Locker; @@ -12,10 +13,14 @@ import org.bukkit.plugin.java.JavaPlugin; public class Datura extends JavaPlugin { private final MySQL sql = new MySQL("localhost", 3011, "master"); + + // Punishment private final Halter halter = new Halter(); private final Locker locker = new Locker(); private final Cager cager = new Cager(); + // Features + private final CommandSpy commandSpy = new CommandSpy(); @Override public void onEnable() @@ -36,6 +41,8 @@ public class Datura extends JavaPlugin Bukkit.getPluginManager() .registerEvents(halter, this); + Bukkit.getPluginManager() + .registerEvents(commandSpy, this); } public MySQL getSQL() @@ -57,4 +64,8 @@ public class Datura extends JavaPlugin { return cager; } + + public CommandSpy getCommandSpy() { + return commandSpy; + } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java new file mode 100644 index 0000000..32f1472 --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java @@ -0,0 +1,58 @@ +package me.totalfreedom.datura.cmd; + +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.Base; +import me.totalfreedom.command.annotation.Info; +import me.totalfreedom.command.annotation.Permissive; +import me.totalfreedom.datura.Datura; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +@Info(name = "commandspy", description = "Spy on commands executed by players.", usage = "/commandspy") +@Permissive(perm = "datura.commandspy") +public class CommandSpyCommand extends Commander +{ + + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + protected CommandSpyCommand(@NotNull JavaPlugin plugin) + { + super(plugin); + } + + @Base + public void commandSpy(final CommandSender sender) + { + if (!(sender instanceof Player)) + { + sender.sendPlainMessage("You have to be a player to perform this command."); + return; + } + + final var commandSpy = ((Datura) getPlugin()). + getCommandSpy(); + + final var uuid = ((Player) sender). + getUniqueId(); + + if (commandSpy.isSpying(uuid)) + { + commandSpy.stop(uuid); + sender.sendPlainMessage("CommandSpy disabled."); + } + else + { + commandSpy.spy(uuid); + sender.sendPlainMessage("CommandSpy enabled."); + } + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java b/Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java new file mode 100644 index 0000000..00ba408 --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java @@ -0,0 +1,55 @@ +package me.totalfreedom.datura.features; + +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import org.bukkit.Bukkit; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +public class CommandSpy implements Listener +{ + + private final Set commandWatchers; + + public CommandSpy() + { + this.commandWatchers = new HashSet<>(); + } + + public void spy(final UUID uuid) + { + this.commandWatchers.add(uuid); + } + + public void stop(final UUID uuid) + { + this.commandWatchers.remove(uuid); + } + + public void clear() + { + this.commandWatchers.clear(); + } + + public boolean isSpying(final UUID uuid) + { + return this.commandWatchers.contains(uuid); + } + + @EventHandler + public void commandProcess(final PlayerCommandPreprocessEvent event) + { + Bukkit.getOnlinePlayers().stream() + .filter(player -> isSpying(player.getUniqueId())) + .forEach(player -> player.sendMessage(Component.text(event.getPlayer().getName(), NamedTextColor.GRAY) + .append(Component.text(": ", NamedTextColor.GRAY)) + .append(Component.text(event.getMessage(), NamedTextColor.GRAY)) + ) + ); + } +} From 1ca7b9edc7c9a3ea3f668d27d8a258b24170fecb Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 31 Jul 2023 12:58:44 +0200 Subject: [PATCH 08/18] Make CommandSpyCommand constructor public --- .../main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java index 32f1472..1773d46 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java @@ -24,7 +24,7 @@ public class CommandSpyCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected CommandSpyCommand(@NotNull JavaPlugin plugin) + public CommandSpyCommand(@NotNull JavaPlugin plugin) { super(plugin); } From c5fbafe015bf60bbca1dc6ed3acb83e5d2532e45 Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:02:37 +0200 Subject: [PATCH 09/18] Make all command constructors public (#14) --- .../main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java | 2 +- .../src/main/java/me/totalfreedom/datura/cmd/CageCommand.java | 2 +- .../main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java | 2 +- .../java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java | 2 +- .../src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java | 2 +- .../main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java | 2 +- .../src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java index 6920d2f..38151d4 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java @@ -26,7 +26,7 @@ public class AdminChatCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected AdminChatCommand(@NotNull final JavaPlugin plugin) + public AdminChatCommand(@NotNull final JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java index c3d6fa6..1fbdb7e 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java @@ -42,7 +42,7 @@ import org.jetbrains.annotations.NotNull; @Completion(args = {"[material]"}, index = 2) public class CageCommand extends Commander { - protected CageCommand(final @NotNull JavaPlugin plugin) + public CageCommand(final @NotNull JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java index 5168a5a..71be5ba 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java @@ -36,7 +36,7 @@ public class ClearDropsCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected ClearDropsCommand(final @NotNull JavaPlugin plugin) + public ClearDropsCommand(final @NotNull JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java index f77cf16..60ab898 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java @@ -29,7 +29,7 @@ public class ClearEntitiesCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected ClearEntitiesCommand(final @NotNull JavaPlugin plugin) + public ClearEntitiesCommand(final @NotNull JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java index 903da90..5471cd7 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java @@ -32,7 +32,7 @@ public class HaltCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected HaltCommand(@NotNull final JavaPlugin plugin) + public HaltCommand(@NotNull final JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java index 026cb17..32d223a 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java @@ -35,7 +35,7 @@ public class ManageUserCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected ManageUserCommand(final @NotNull JavaPlugin plugin) + public ManageUserCommand(final @NotNull JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java index c434d7e..f47e267 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java @@ -25,7 +25,7 @@ public class SmiteCommand extends Commander * * @param plugin The plugin which contains this command. */ - protected SmiteCommand(@NotNull final JavaPlugin plugin) + public SmiteCommand(@NotNull final JavaPlugin plugin) { super(plugin); } From bbc6e7690832da95b3a74e1f5c9f07f5b52686b6 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:17:34 +0200 Subject: [PATCH 10/18] Add description to all modules of the project --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index af20c7d..1fd5129 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ This proof-of-concept also uses the following libraries: # To Do List -Patchwork: +Patchwork (API): - [x] Logging System - [x] SQL API @@ -88,7 +88,7 @@ Patchwork: - [ ] Configuration API *(In Progress...)* - [ ] Event API *(In Progress...)* -Datura: +Datura (Data Manager): - [ ] Permission Handling *(In Progress...)* - [ ] Permission Registration & Assignment *(In Progress...)* @@ -97,7 +97,7 @@ Datura: - [ ] User Data Implementations *(In Progress...)* - [x] Punishment Systems (e.x. Locker, Halter, Cager) -Fossil: +Fossil (Entertainment): - [x] Economy Implementation - [ ] Particle Implementation / Trails *(In Progress...)* @@ -106,7 +106,7 @@ Fossil: - [ ] Chat reaction / game system - [ ] Jumppads -Corvo: +Corvo (Scheduling and Listening Service): - [ ] Service Implementation - [ ] Service Handling From 58bcc1c2d604cbc1e8ac3688defc02a31a7f0e96 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:12:43 +0200 Subject: [PATCH 11/18] Use command API properly --- .../totalfreedom/datura/cmd/CommandSpyCommand.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java index 1773d46..d099696 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java @@ -11,7 +11,7 @@ import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; @Info(name = "commandspy", description = "Spy on commands executed by players.", usage = "/commandspy") -@Permissive(perm = "datura.commandspy") +@Permissive(perm = "datura.commandspy", onlyPlayers = true) public class CommandSpyCommand extends Commander { @@ -30,18 +30,12 @@ public class CommandSpyCommand extends Commander } @Base - public void commandSpy(final CommandSender sender) + public void commandSpy(final Player sender) { - if (!(sender instanceof Player)) - { - sender.sendPlainMessage("You have to be a player to perform this command."); - return; - } - final var commandSpy = ((Datura) getPlugin()). getCommandSpy(); - final var uuid = ((Player) sender). + final var uuid = sender. getUniqueId(); if (commandSpy.isSpying(uuid)) From e1a6b5e58776e2f700feced4aa9cf115f098ff94 Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:15:46 +0200 Subject: [PATCH 12/18] Implemented Fuckoff command from TFM back (#16) * Implemented Fuckoff command back from TFM * Actual use the radius field * Change default radius to 15 * Renamed Fuckoff#pushPlayers * Use command API properly --- .../java/me/totalfreedom/datura/Datura.java | 14 ++++- .../datura/cmd/FuckoffCommand.java | 62 +++++++++++++++++++ .../totalfreedom/datura/features/Fuckoff.java | 59 ++++++++++++++++++ 3 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java create mode 100644 Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java diff --git a/Datura/src/main/java/me/totalfreedom/datura/Datura.java b/Datura/src/main/java/me/totalfreedom/datura/Datura.java index 60e39a1..57097cb 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/Datura.java +++ b/Datura/src/main/java/me/totalfreedom/datura/Datura.java @@ -1,6 +1,7 @@ package me.totalfreedom.datura; import me.totalfreedom.base.Patchwork; +import me.totalfreedom.datura.features.Fuckoff; import me.totalfreedom.datura.features.CommandSpy; import me.totalfreedom.datura.punishment.Cager; import me.totalfreedom.datura.punishment.Halter; @@ -21,6 +22,7 @@ public class Datura extends JavaPlugin // Features private final CommandSpy commandSpy = new CommandSpy(); + private final Fuckoff fuckoff = new Fuckoff(); @Override public void onEnable() @@ -38,6 +40,10 @@ public class Datura extends JavaPlugin .getRegistrations() .getServiceTaskRegistry() .registerService(SubscriptionProvider.syncService(this, cager)); + Patchwork.getInstance() + .getRegistrations() + .getServiceTaskRegistry() + .registerService(SubscriptionProvider.syncService(this, fuckoff)); Bukkit.getPluginManager() .registerEvents(halter, this); @@ -65,7 +71,13 @@ public class Datura extends JavaPlugin return cager; } - public CommandSpy getCommandSpy() { + public CommandSpy getCommandSpy() + { return commandSpy; } + + public Fuckoff getFuckoff() + { + return fuckoff; + } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java b/Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java new file mode 100644 index 0000000..5b41ef4 --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java @@ -0,0 +1,62 @@ +package me.totalfreedom.datura.cmd; + +import me.totalfreedom.base.Shortcuts; +import me.totalfreedom.command.Commander; +import me.totalfreedom.command.annotation.*; +import me.totalfreedom.datura.Datura; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +@Info(name = "fuckoff", description = "You'll never even see it coming - repeatedly push players away from you until command is untoggled.", usage = "/fuckoff [radius]") +@Permissive(perm = "datura.fuckoff", onlyPlayers = true) +@Completion(args = {"on", "off"}, index = 0) +@Completion(args = {"[radius]"}, index = 1) +public class FuckoffCommand extends Commander +{ + private final Datura plugin = Shortcuts.provideModule(Datura.class); + + /** + * Initializes this command object. The provided {@link JavaPlugin} should be the plugin which contains the + * command. + *

+ * This constructor will automatically register all subcommands and completions for this command. It will also + * automatically infer all required information from the provided {@link Info} and {@link Permissive} annotations. + * + * @param plugin The plugin which contains this command. + */ + public FuckoffCommand(@NotNull JavaPlugin plugin) + { + super(plugin); + } + + @Subcommand(permission = "datura.fuckoff", args = {String.class}) + public void fuckOff(final Player sender, final String toggle) + { + execute(sender, toggle, 15); + } + + @Subcommand(permission = "datura.fuckoff", args = {String.class, Integer.class}) + public void fuckOff(final Player sender, final String toggle, final Integer radius) + { + execute(sender, toggle, radius); + } + + private void execute(final Player sender, final String toggle, final int radius) + { + if (toggle.equalsIgnoreCase("on")) + { + plugin.getFuckoff(). + add(sender, radius); + + sender.sendPlainMessage("FuckOff enabled."); + } else if (toggle.equalsIgnoreCase("off")) + { + plugin.getFuckoff(). + remove(sender); + + sender.sendPlainMessage("FuckOff disabled."); + } + } +} diff --git a/Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java b/Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java new file mode 100644 index 0000000..dd20579 --- /dev/null +++ b/Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java @@ -0,0 +1,59 @@ +package me.totalfreedom.datura.features; + +import me.totalfreedom.service.Service; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +public class Fuckoff extends Service +{ + private final Map players = new ConcurrentHashMap<>(); + + public Fuckoff() + { + super("fuckoff-service"); + } + + public void add(final Player player, final int radius) + { + players.put(player.getUniqueId(), radius); + } + + public void remove(final Player player) + { + players.remove(player.getUniqueId()); + } + + @Override + public void tick() + { + for (Map.Entry entry : players.entrySet()) + { + final var player = Bukkit.getPlayer(entry.getKey()); + + if (player == null) + { + players.remove(entry.getKey()); + continue; + } + + pushPlayers(player, entry.getValue()); + } + } + + private void pushPlayers(@NotNull final Player player, final int radius) + { + Bukkit.getOnlinePlayers() + .stream() + .filter(onlinePlayer -> onlinePlayer.getLocation().distanceSquared(player.getLocation()) < (radius * radius)) + .forEach(onlinePlayer -> { + onlinePlayer.setVelocity( + player.getLocation().toVector() + .add(onlinePlayer.getLocation().toVector()).normalize().multiply(radius) + ); + }); + } +} From 21463c50fef976d6b6843d7d9a462ca4a825adcb Mon Sep 17 00:00:00 2001 From: Paldiu Date: Tue, 1 Aug 2023 22:34:18 -0500 Subject: [PATCH 13/18] Migrates the entire package nomenclature to be more direct and straightforward. (#17) Signed-off-by: Paul Reilly --- .../{me/totalfreedom => fns}/corvo/Corvo.java | 4 +- .../listener/PlayerInteractionListener.java | 2 +- .../totalfreedom => fns}/datura/Datura.java | 18 +-- .../datura/cmd/AdminChatCommand.java | 14 +-- .../datura/cmd/CageCommand.java | 16 +-- .../datura/cmd/ClearDropsCommand.java | 20 ++-- .../datura/cmd/ClearEntitiesCommand.java | 16 +-- .../datura/cmd/CommandSpyCommand.java | 19 ++-- .../datura/cmd/FuckoffCommand.java | 16 +-- .../datura/cmd/HaltCommand.java | 16 +-- .../datura/cmd/LockerCommand.java | 14 +-- .../datura/cmd/ManageUserCommand.java | 24 ++-- .../datura/cmd/SmiteCommand.java | 12 +- .../datura/event/UserDataUpdateEvent.java | 6 +- .../datura/features/CommandSpy.java | 9 +- .../datura/features/Fuckoff.java | 30 ++--- .../datura/perms/DefaultNodes.java | 6 +- .../datura/perms/FreedomGroup.java | 17 ++- .../datura/perms/FreedomUser.java | 30 ++--- .../datura/perms/PermissionNode.java | 6 +- .../datura/perms/PermissionNodeBuilder.java | 8 +- .../datura/punishment/Cager.java | 25 ++--- .../datura/punishment/Halter.java | 9 +- .../datura/punishment/Locker.java | 15 ++- .../datura/sql/MySQL.java | 9 +- .../datura/sql/Result.java | 2 +- .../datura/user/ServerEconomyHolder.java | 6 +- .../datura/user/SimpleUserData.java | 27 +++-- .../totalfreedom => fns}/fossil/Fossil.java | 10 +- .../fossil/bouncypads/BouncyPad.java | 5 +- .../fossil/bouncypads/PadHolder.java | 15 ++- .../fossil/bouncypads/PadType.java | 2 +- .../fossil/cmd/CakeCommand.java | 20 ++-- .../economy/SimpleCompletedTransaction.java | 10 +- .../economy/SimpleLoggedTransactor.java | 10 +- .../economy/SimpleMutableTransaction.java | 6 +- .../fossil/economy/SimpleTransaction.java | 7 +- .../economy/SimpleTransactionLogger.java | 14 +-- .../economy/SimpleTransactionResult.java | 20 ++-- .../fossil/economy/SimpleTransactor.java | 12 +- .../fossil/items/ClownfishItem.java | 2 +- .../fossil/items/ShopItem.java | 2 +- .../fossil/items/TrailItem.java | 2 +- .../fossil/reactions/CopyCatReaction.java | 26 ++--- .../src/main/java/fns/fossil/shop/Shoppe.java | 5 + .../fossil/shop/menus/MainMenu.java | 4 +- .../fossil/trail/Trailer.java | 7 +- .../fossil/trail/types/BasicTrail.java | 4 +- .../fossil/trail/types/FlameTrail.java | 4 +- .../fossil/trail/types/HeartTrail.java | 4 +- .../fossil/trail/types/RainbowTrail.java | 9 +- .../fossil/trail/types/SimpleTrail.java | 11 +- .../fossil/trail/types/StrobeTrail.java | 4 +- .../fossil/trail/types/TrailProvider.java | 2 +- .../me/totalfreedom/fossil/shop/Shoppe.java | 5 - .../patchwork}/api/Context.java | 7 +- .../patchwork}/api/Interpolator.java | 2 +- .../patchwork}/api/Serializable.java | 2 +- .../audience/MutableAudienceForwarder.java | 2 +- .../patchwork}/base/Patchwork.java | 10 +- .../patchwork}/base/Registration.java | 14 +-- .../patchwork}/base/Shortcuts.java | 5 +- .../patchwork}/command/BukkitDelegate.java | 10 +- .../patchwork}/command/CommandHandler.java | 2 +- .../patchwork}/command/Commander.java | 19 ++-- .../patchwork}/command/annotation/Base.java | 2 +- .../command/annotation/Completion.java | 2 +- .../command/annotation/Completions.java | 2 +- .../patchwork}/command/annotation/Info.java | 2 +- .../command/annotation/Permissive.java | 2 +- .../command/annotation/Subcommand.java | 7 +- .../patchwork}/config/Configuration.java | 7 +- .../patchwork}/config/YamlWrapper.java | 2 +- .../patchwork}/data/ConfigRegistry.java | 5 +- .../patchwork}/data/EventRegistry.java | 7 +- .../patchwork}/data/GroupRegistry.java | 7 +- .../patchwork}/data/ModuleRegistry.java | 7 +- .../patchwork}/data/ServiceTaskRegistry.java | 15 ++- .../patchwork}/data/UserRegistry.java | 9 +- .../patchwork}/display/AbstractMenu.java | 13 +-- .../patchwork}/display/BossBarDisplay.java | 9 +- .../patchwork}/display/BossBarTimer.java | 7 +- .../patchwork}/display/ClickAction.java | 2 +- .../patchwork}/display/Displayable.java | 11 +- .../patchwork}/display/DisplayableView.java | 4 +- .../patchwork}/display/TitleDisplay.java | 5 +- .../display/adminchat/ACFormatBuilder.java | 2 +- .../display/adminchat/AdminChatDisplay.java | 21 ++-- .../display/adminchat/AdminChatFormat.java | 2 +- .../economy/CompletedTransaction.java | 2 +- .../patchwork}/economy/EconomicEntity.java | 2 +- .../economy/EconomicEntityData.java | 2 +- .../economy/MutableTransaction.java | 2 +- .../patchwork}/economy/Transaction.java | 2 +- .../patchwork}/economy/TransactionLogger.java | 2 +- .../patchwork}/economy/TransactionResult.java | 2 +- .../patchwork}/economy/Transactor.java | 2 +- .../patchwork}/event/Callback.java | 2 +- .../patchwork}/event/EventBus.java | 9 +- .../patchwork}/event/EventSubscription.java | 2 +- .../patchwork}/event/FEvent.java | 2 +- .../patchwork}/event/SubscriptionBox.java | 2 +- .../patchwork}/logging/BlockInteraction.java | 7 +- .../logging/ContainerInteraction.java | 13 +-- .../patchwork}/logging/Interaction.java | 7 +- .../logging/InteractionFormatter.java | 5 +- .../patchwork}/particle/NoteColorUtil.java | 2 +- .../patchwork}/particle/Trail.java | 11 +- .../patchwork}/particle/TrailType.java | 2 +- .../patchwork}/provider/ContextProvider.java | 103 ++++++++++++------ .../patchwork}/provider/EventProvider.java | 4 +- .../patchwork}/provider/ModuleProvider.java | 2 +- .../patchwork}/provider/ServiceProvider.java | 4 +- .../patchwork}/security/Group.java | 2 +- .../patchwork}/security/Groups.java | 2 +- .../patchwork}/security/Node.java | 5 +- .../patchwork}/security/NodeBuilder.java | 2 +- .../patchwork}/security/NodeType.java | 2 +- .../patchwork}/security/PermissionHolder.java | 5 +- .../patchwork}/service/FreedomExecutor.java | 9 +- .../patchwork}/service/Service.java | 2 +- .../service/ServiceSubscription.java | 5 +- .../service/SubscriptionProvider.java | 2 +- .../patchwork}/service/Task.java | 7 +- .../patchwork}/service/TaskSubscription.java | 7 +- .../patchwork}/shop/Reactable.java | 7 +- .../patchwork}/shop/Reaction.java | 2 +- .../patchwork}/shop/ReactionTask.java | 12 +- .../patchwork}/shop/ReactionType.java | 2 +- .../patchwork}/sql/SQL.java | 2 +- .../patchwork}/sql/SQLProperties.java | 2 +- .../patchwork}/user/User.java | 8 +- .../patchwork}/user/UserData.java | 11 +- .../patchwork}/utils/DurationTools.java | 2 +- .../patchwork}/utils/InterpolationUtils.java | 9 +- .../patchwork}/utils/ShapeUtils.java | 7 +- .../patchwork}/utils/Tagged.java | 11 +- .../patchwork}/utils/container/Identity.java | 2 +- .../patchwork}/utils/container/Pair.java | 2 +- .../patchwork}/utils/container/Trio.java | 2 +- .../patchwork}/utils/container/UnaryPair.java | 2 +- .../patchwork}/utils/container/UnaryTrio.java | 2 +- .../utils/kyori/FreedomAdventure.java | 7 +- .../utils/kyori/FreedomMiniMessage.java | 14 +-- .../utils/kyori/KyoriConstants.java | 4 +- .../utils/logging/FreedomLogger.java | 7 +- 146 files changed, 595 insertions(+), 608 deletions(-) rename Corvo/src/main/java/{me/totalfreedom => fns}/corvo/Corvo.java (87%) rename Corvo/src/main/java/{me/totalfreedom => fns}/corvo/listener/PlayerInteractionListener.java (95%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/Datura.java (81%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/AdminChatCommand.java (85%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/CageCommand.java (89%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/ClearDropsCommand.java (87%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/ClearEntitiesCommand.java (85%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/CommandSpyCommand.java (74%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/FuckoffCommand.java (83%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/HaltCommand.java (89%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/LockerCommand.java (79%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/ManageUserCommand.java (86%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/cmd/SmiteCommand.java (85%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/event/UserDataUpdateEvent.java (76%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/features/CommandSpy.java (97%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/features/Fuckoff.java (53%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/perms/DefaultNodes.java (90%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/perms/FreedomGroup.java (97%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/perms/FreedomUser.java (93%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/perms/PermissionNode.java (86%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/perms/PermissionNodeBuilder.java (83%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/punishment/Cager.java (97%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/punishment/Halter.java (95%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/punishment/Locker.java (95%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/sql/MySQL.java (98%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/sql/Result.java (83%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/user/ServerEconomyHolder.java (96%) rename Datura/src/main/java/{me/totalfreedom => fns}/datura/user/SimpleUserData.java (93%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/Fossil.java (73%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/bouncypads/BouncyPad.java (99%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/bouncypads/PadHolder.java (97%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/bouncypads/PadType.java (94%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/cmd/CakeCommand.java (73%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleCompletedTransaction.java (80%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleLoggedTransactor.java (79%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleMutableTransaction.java (81%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleTransaction.java (85%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleTransactionLogger.java (84%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleTransactionResult.java (75%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/economy/SimpleTransactor.java (84%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/items/ClownfishItem.java (95%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/items/ShopItem.java (95%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/items/TrailItem.java (91%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/reactions/CopyCatReaction.java (78%) create mode 100644 Fossil/src/main/java/fns/fossil/shop/Shoppe.java rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/shop/menus/MainMenu.java (59%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/Trailer.java (85%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/BasicTrail.java (92%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/FlameTrail.java (90%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/HeartTrail.java (88%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/RainbowTrail.java (90%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/SimpleTrail.java (93%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/StrobeTrail.java (91%) rename Fossil/src/main/java/{me/totalfreedom => fns}/fossil/trail/types/TrailProvider.java (80%) delete mode 100644 Fossil/src/main/java/me/totalfreedom/fossil/shop/Shoppe.java rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/api/Context.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/api/Interpolator.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/api/Serializable.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/audience/MutableAudienceForwarder.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/base/Patchwork.java (92%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/base/Registration.java (88%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/base/Shortcuts.java (88%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/BukkitDelegate.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/CommandHandler.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/Commander.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/annotation/Base.java (88%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/annotation/Completion.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/annotation/Completions.java (92%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/annotation/Info.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/annotation/Permissive.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/command/annotation/Subcommand.java (94%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/config/Configuration.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/config/YamlWrapper.java (53%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/data/ConfigRegistry.java (93%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/data/EventRegistry.java (91%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/data/GroupRegistry.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/data/ModuleRegistry.java (94%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/data/ServiceTaskRegistry.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/data/UserRegistry.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/AbstractMenu.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/BossBarDisplay.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/BossBarTimer.java (93%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/ClickAction.java (92%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/Displayable.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/DisplayableView.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/TitleDisplay.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/adminchat/ACFormatBuilder.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/adminchat/AdminChatDisplay.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/display/adminchat/AdminChatFormat.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/CompletedTransaction.java (90%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/EconomicEntity.java (94%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/EconomicEntityData.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/MutableTransaction.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/Transaction.java (92%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/TransactionLogger.java (91%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/TransactionResult.java (87%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/economy/Transactor.java (90%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/event/Callback.java (75%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/event/EventBus.java (93%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/event/EventSubscription.java (88%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/event/FEvent.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/event/SubscriptionBox.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/logging/BlockInteraction.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/logging/ContainerInteraction.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/logging/Interaction.java (94%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/logging/InteractionFormatter.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/particle/NoteColorUtil.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/particle/Trail.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/particle/TrailType.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/provider/ContextProvider.java (65%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/provider/EventProvider.java (56%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/provider/ModuleProvider.java (80%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/provider/ServiceProvider.java (51%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/security/Group.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/security/Groups.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/security/Node.java (90%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/security/NodeBuilder.java (85%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/security/NodeType.java (73%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/security/PermissionHolder.java (88%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/service/FreedomExecutor.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/service/Service.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/service/ServiceSubscription.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/service/SubscriptionProvider.java (99%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/service/Task.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/service/TaskSubscription.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/shop/Reactable.java (82%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/shop/Reaction.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/shop/ReactionTask.java (87%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/shop/ReactionType.java (67%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/sql/SQL.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/sql/SQLProperties.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/user/User.java (72%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/user/UserData.java (78%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/DurationTools.java (95%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/InterpolationUtils.java (98%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/ShapeUtils.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/Tagged.java (96%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/container/Identity.java (89%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/container/Pair.java (52%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/container/Trio.java (62%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/container/UnaryPair.java (55%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/container/UnaryTrio.java (62%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/kyori/FreedomAdventure.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/kyori/FreedomMiniMessage.java (90%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/kyori/KyoriConstants.java (97%) rename Patchwork/src/main/java/{me/totalfreedom => fns/patchwork}/utils/logging/FreedomLogger.java (98%) diff --git a/Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java b/Corvo/src/main/java/fns/corvo/Corvo.java similarity index 87% rename from Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java rename to Corvo/src/main/java/fns/corvo/Corvo.java index e698dc5..8b021ec 100644 --- a/Corvo/src/main/java/me/totalfreedom/corvo/Corvo.java +++ b/Corvo/src/main/java/fns/corvo/Corvo.java @@ -1,6 +1,6 @@ -package me.totalfreedom.corvo; +package fns.corvo; -import me.totalfreedom.base.Patchwork; +import fns.patchwork.base.Patchwork; import org.bukkit.plugin.java.JavaPlugin; public class Corvo extends JavaPlugin diff --git a/Corvo/src/main/java/me/totalfreedom/corvo/listener/PlayerInteractionListener.java b/Corvo/src/main/java/fns/corvo/listener/PlayerInteractionListener.java similarity index 95% rename from Corvo/src/main/java/me/totalfreedom/corvo/listener/PlayerInteractionListener.java rename to Corvo/src/main/java/fns/corvo/listener/PlayerInteractionListener.java index 0704003..86a5036 100644 --- a/Corvo/src/main/java/me/totalfreedom/corvo/listener/PlayerInteractionListener.java +++ b/Corvo/src/main/java/fns/corvo/listener/PlayerInteractionListener.java @@ -1,4 +1,4 @@ -package me.totalfreedom.corvo.listener; +package fns.corvo.listener; import io.papermc.paper.event.block.BlockBreakBlockEvent; import org.bukkit.event.EventHandler; diff --git a/Datura/src/main/java/me/totalfreedom/datura/Datura.java b/Datura/src/main/java/fns/datura/Datura.java similarity index 81% rename from Datura/src/main/java/me/totalfreedom/datura/Datura.java rename to Datura/src/main/java/fns/datura/Datura.java index 57097cb..f28a9c1 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/Datura.java +++ b/Datura/src/main/java/fns/datura/Datura.java @@ -1,13 +1,13 @@ -package me.totalfreedom.datura; +package fns.datura; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.datura.features.Fuckoff; -import me.totalfreedom.datura.features.CommandSpy; -import me.totalfreedom.datura.punishment.Cager; -import me.totalfreedom.datura.punishment.Halter; -import me.totalfreedom.datura.punishment.Locker; -import me.totalfreedom.datura.sql.MySQL; -import me.totalfreedom.service.SubscriptionProvider; +import fns.datura.features.CommandSpy; +import fns.datura.features.Fuckoff; +import fns.datura.punishment.Cager; +import fns.datura.punishment.Halter; +import fns.datura.punishment.Locker; +import fns.datura.sql.MySQL; +import fns.patchwork.base.Patchwork; +import fns.patchwork.service.SubscriptionProvider; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java b/Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java similarity index 85% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java rename to Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java index 38151d4..ab38001 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/AdminChatCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java @@ -1,11 +1,11 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Base; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; +import fns.patchwork.base.Patchwork; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Base; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import net.kyori.adventure.text.Component; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java b/Datura/src/main/java/fns/datura/cmd/CageCommand.java similarity index 89% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java rename to Datura/src/main/java/fns/datura/cmd/CageCommand.java index 1fbdb7e..ecec841 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CageCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/CageCommand.java @@ -19,15 +19,15 @@ * THE SOFTWARE. */ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.datura.Datura; +import fns.datura.Datura; +import fns.patchwork.base.Shortcuts; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java b/Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java similarity index 87% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java rename to Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java index 71be5ba..99828f8 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearDropsCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java @@ -1,15 +1,15 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Base; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.datura.Datura; +import fns.datura.Datura; +import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Shortcuts; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Base; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java b/Datura/src/main/java/fns/datura/cmd/ClearEntitiesCommand.java similarity index 85% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java rename to Datura/src/main/java/fns/datura/cmd/ClearEntitiesCommand.java index 60ab898..fd14a1c 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ClearEntitiesCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/ClearEntitiesCommand.java @@ -1,12 +1,12 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Base; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.utils.Tagged; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Base; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; +import fns.patchwork.utils.Tagged; import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java b/Datura/src/main/java/fns/datura/cmd/CommandSpyCommand.java similarity index 74% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java rename to Datura/src/main/java/fns/datura/cmd/CommandSpyCommand.java index d099696..bd9a13d 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/CommandSpyCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/CommandSpyCommand.java @@ -1,11 +1,10 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Base; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.datura.Datura; -import org.bukkit.command.CommandSender; +import fns.datura.Datura; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Base; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; @@ -24,7 +23,7 @@ public class CommandSpyCommand extends Commander * * @param plugin The plugin which contains this command. */ - public CommandSpyCommand(@NotNull JavaPlugin plugin) + public CommandSpyCommand(@NotNull final Datura plugin) { super(plugin); } @@ -33,10 +32,10 @@ public class CommandSpyCommand extends Commander public void commandSpy(final Player sender) { final var commandSpy = ((Datura) getPlugin()). - getCommandSpy(); + getCommandSpy(); final var uuid = sender. - getUniqueId(); + getUniqueId(); if (commandSpy.isSpying(uuid)) { diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java b/Datura/src/main/java/fns/datura/cmd/FuckoffCommand.java similarity index 83% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java rename to Datura/src/main/java/fns/datura/cmd/FuckoffCommand.java index 5b41ef4..a24822d 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/FuckoffCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/FuckoffCommand.java @@ -1,10 +1,12 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.*; -import me.totalfreedom.datura.Datura; -import org.bukkit.command.CommandSender; +import fns.datura.Datura; +import fns.patchwork.base.Shortcuts; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; @@ -26,7 +28,7 @@ public class FuckoffCommand extends Commander * * @param plugin The plugin which contains this command. */ - public FuckoffCommand(@NotNull JavaPlugin plugin) + public FuckoffCommand(@NotNull final JavaPlugin plugin) { super(plugin); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java b/Datura/src/main/java/fns/datura/cmd/HaltCommand.java similarity index 89% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java rename to Datura/src/main/java/fns/datura/cmd/HaltCommand.java index 5471cd7..82b7559 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/HaltCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/HaltCommand.java @@ -1,12 +1,12 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.datura.Datura; +import fns.datura.Datura; +import fns.patchwork.base.Shortcuts; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.Bukkit; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java b/Datura/src/main/java/fns/datura/cmd/LockerCommand.java similarity index 79% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java rename to Datura/src/main/java/fns/datura/cmd/LockerCommand.java index 0623c84..8ddffcf 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/LockerCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/LockerCommand.java @@ -1,11 +1,11 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.datura.Datura; +import fns.datura.Datura; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java b/Datura/src/main/java/fns/datura/cmd/ManageUserCommand.java similarity index 86% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java rename to Datura/src/main/java/fns/datura/cmd/ManageUserCommand.java index 32d223a..1bd446e 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/ManageUserCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/ManageUserCommand.java @@ -1,17 +1,17 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; +import fns.datura.perms.PermissionNodeBuilder; +import fns.patchwork.base.Shortcuts; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; +import fns.patchwork.security.Node; +import fns.patchwork.security.NodeType; +import fns.patchwork.security.PermissionHolder; +import fns.patchwork.user.User; import java.time.Duration; -import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.datura.perms.PermissionNodeBuilder; -import me.totalfreedom.security.Node; -import me.totalfreedom.security.NodeType; -import me.totalfreedom.security.PermissionHolder; -import me.totalfreedom.user.User; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; diff --git a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java b/Datura/src/main/java/fns/datura/cmd/SmiteCommand.java similarity index 85% rename from Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java rename to Datura/src/main/java/fns/datura/cmd/SmiteCommand.java index f47e267..1e83ff9 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/cmd/SmiteCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/SmiteCommand.java @@ -1,10 +1,10 @@ -package me.totalfreedom.datura.cmd; +package fns.datura.cmd; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Datura/src/main/java/me/totalfreedom/datura/event/UserDataUpdateEvent.java b/Datura/src/main/java/fns/datura/event/UserDataUpdateEvent.java similarity index 76% rename from Datura/src/main/java/me/totalfreedom/datura/event/UserDataUpdateEvent.java rename to Datura/src/main/java/fns/datura/event/UserDataUpdateEvent.java index b3ef7b4..8bbd675 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/event/UserDataUpdateEvent.java +++ b/Datura/src/main/java/fns/datura/event/UserDataUpdateEvent.java @@ -1,7 +1,7 @@ -package me.totalfreedom.datura.event; +package fns.datura.event; -import me.totalfreedom.event.FEvent; -import me.totalfreedom.user.UserData; +import fns.patchwork.event.FEvent; +import fns.patchwork.user.UserData; public class UserDataUpdateEvent extends FEvent { diff --git a/Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java b/Datura/src/main/java/fns/datura/features/CommandSpy.java similarity index 97% rename from Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java rename to Datura/src/main/java/fns/datura/features/CommandSpy.java index 00ba408..8f761fa 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/features/CommandSpy.java +++ b/Datura/src/main/java/fns/datura/features/CommandSpy.java @@ -1,5 +1,8 @@ -package me.totalfreedom.datura.features; +package fns.datura.features; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.Bukkit; @@ -7,10 +10,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - public class CommandSpy implements Listener { diff --git a/Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java b/Datura/src/main/java/fns/datura/features/Fuckoff.java similarity index 53% rename from Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java rename to Datura/src/main/java/fns/datura/features/Fuckoff.java index dd20579..2bf25cf 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/features/Fuckoff.java +++ b/Datura/src/main/java/fns/datura/features/Fuckoff.java @@ -1,13 +1,13 @@ -package me.totalfreedom.datura.features; +package fns.datura.features; -import me.totalfreedom.service.Service; +import fns.patchwork.service.Service; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - public class Fuckoff extends Service { private final Map players = new ConcurrentHashMap<>(); @@ -30,7 +30,7 @@ public class Fuckoff extends Service @Override public void tick() { - for (Map.Entry entry : players.entrySet()) + for (final Map.Entry entry : players.entrySet()) { final var player = Bukkit.getPlayer(entry.getKey()); @@ -47,13 +47,15 @@ public class Fuckoff extends Service private void pushPlayers(@NotNull final Player player, final int radius) { Bukkit.getOnlinePlayers() - .stream() - .filter(onlinePlayer -> onlinePlayer.getLocation().distanceSquared(player.getLocation()) < (radius * radius)) - .forEach(onlinePlayer -> { - onlinePlayer.setVelocity( - player.getLocation().toVector() - .add(onlinePlayer.getLocation().toVector()).normalize().multiply(radius) - ); - }); + .stream() + .filter(onlinePlayer -> onlinePlayer.getLocation() + .clone() + .distanceSquared(player.getLocation()) < Math.pow(radius, 2)) + .forEach(onlinePlayer -> + onlinePlayer.setVelocity(player.getLocation() + .toVector() + .add(onlinePlayer.getLocation().toVector()) + .normalize() + .multiply(radius))); } } diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/DefaultNodes.java b/Datura/src/main/java/fns/datura/perms/DefaultNodes.java similarity index 90% rename from Datura/src/main/java/me/totalfreedom/datura/perms/DefaultNodes.java rename to Datura/src/main/java/fns/datura/perms/DefaultNodes.java index 6357cdc..71a9af4 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/DefaultNodes.java +++ b/Datura/src/main/java/fns/datura/perms/DefaultNodes.java @@ -1,7 +1,7 @@ -package me.totalfreedom.datura.perms; +package fns.datura.perms; -import me.totalfreedom.security.Node; -import me.totalfreedom.security.NodeType; +import fns.patchwork.security.Node; +import fns.patchwork.security.NodeType; public class DefaultNodes { diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java b/Datura/src/main/java/fns/datura/perms/FreedomGroup.java similarity index 97% rename from Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java rename to Datura/src/main/java/fns/datura/perms/FreedomGroup.java index 7627933..0077a5f 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomGroup.java +++ b/Datura/src/main/java/fns/datura/perms/FreedomGroup.java @@ -1,8 +1,12 @@ -package me.totalfreedom.datura.perms; +package fns.datura.perms; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.security.Group; -import me.totalfreedom.security.Node; +import fns.patchwork.base.Patchwork; +import fns.patchwork.security.Group; +import fns.patchwork.security.Node; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; import net.kyori.adventure.text.Component; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionAttachment; @@ -11,11 +15,6 @@ import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; -import java.util.stream.Collectors; - public class FreedomGroup implements Group { private final Component name; diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java b/Datura/src/main/java/fns/datura/perms/FreedomUser.java similarity index 93% rename from Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java rename to Datura/src/main/java/fns/datura/perms/FreedomUser.java index a055351..367ccd6 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/FreedomUser.java +++ b/Datura/src/main/java/fns/datura/perms/FreedomUser.java @@ -1,11 +1,16 @@ -package me.totalfreedom.datura.perms; +package fns.datura.perms; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.datura.Datura; -import me.totalfreedom.datura.user.SimpleUserData; -import me.totalfreedom.security.Node; -import me.totalfreedom.user.User; -import me.totalfreedom.user.UserData; +import fns.datura.Datura; +import fns.datura.user.SimpleUserData; +import fns.patchwork.base.Patchwork; +import fns.patchwork.security.Node; +import fns.patchwork.user.User; +import fns.patchwork.user.UserData; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -16,12 +21,6 @@ import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - /** * The superinterface User extends PermissionHolder, which is an extension of * {@link org.bukkit.permissions.Permissible}. This means that our permission data can be interchanged with other @@ -33,7 +32,7 @@ public class FreedomUser implements User private final Set permissions; private final Map bukkitAttachments = new HashMap<>(); private final Component displayName; - private final String NOT_ONLINE = "Player is not online"; + private static final String NOT_ONLINE = "Player is not online"; private final UserData userData; public FreedomUser(final Player player) @@ -96,7 +95,8 @@ public class FreedomUser implements User @Override public boolean addPermission(final Node node) { - final PermissionAttachment attachment = addAttachment(Patchwork.getInstance(), node.key(), node.value()); + final boolean value = !node.isTemporary() || node.isExpired(); + final PermissionAttachment attachment = addAttachment(Patchwork.getInstance(), node.key(), value); bukkitAttachments.put(node, attachment); return permissions().add(node); } diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java b/Datura/src/main/java/fns/datura/perms/PermissionNode.java similarity index 86% rename from Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java rename to Datura/src/main/java/fns/datura/perms/PermissionNode.java index a83c115..bb70275 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNode.java +++ b/Datura/src/main/java/fns/datura/perms/PermissionNode.java @@ -1,7 +1,7 @@ -package me.totalfreedom.datura.perms; +package fns.datura.perms; -import me.totalfreedom.security.Node; -import me.totalfreedom.security.NodeType; +import fns.patchwork.security.Node; +import fns.patchwork.security.NodeType; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; diff --git a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java b/Datura/src/main/java/fns/datura/perms/PermissionNodeBuilder.java similarity index 83% rename from Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java rename to Datura/src/main/java/fns/datura/perms/PermissionNodeBuilder.java index 87b8fa0..b1c3a0b 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/perms/PermissionNodeBuilder.java +++ b/Datura/src/main/java/fns/datura/perms/PermissionNodeBuilder.java @@ -1,8 +1,8 @@ -package me.totalfreedom.datura.perms; +package fns.datura.perms; -import me.totalfreedom.security.Node; -import me.totalfreedom.security.NodeBuilder; -import me.totalfreedom.security.NodeType; +import fns.patchwork.security.Node; +import fns.patchwork.security.NodeBuilder; +import fns.patchwork.security.NodeType; public class PermissionNodeBuilder implements NodeBuilder { diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java b/Datura/src/main/java/fns/datura/punishment/Cager.java similarity index 97% rename from Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java rename to Datura/src/main/java/fns/datura/punishment/Cager.java index 5b3ef49..b411052 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Cager.java +++ b/Datura/src/main/java/fns/datura/punishment/Cager.java @@ -1,17 +1,8 @@ -package me.totalfreedom.datura.punishment; - -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.service.Service; -import me.totalfreedom.utils.ShapeUtils; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.player.PlayerQuitEvent; +package fns.datura.punishment; +import fns.patchwork.base.Patchwork; +import fns.patchwork.service.Service; +import fns.patchwork.utils.ShapeUtils; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; @@ -20,6 +11,14 @@ import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.function.DoubleUnaryOperator; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.player.PlayerQuitEvent; public class Cager extends Service { diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java b/Datura/src/main/java/fns/datura/punishment/Halter.java similarity index 95% rename from Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java rename to Datura/src/main/java/fns/datura/punishment/Halter.java index 5ffff30..d417bbf 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Halter.java +++ b/Datura/src/main/java/fns/datura/punishment/Halter.java @@ -1,12 +1,11 @@ -package me.totalfreedom.datura.punishment; - -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerMoveEvent; +package fns.datura.punishment; import java.util.HashSet; import java.util.Set; import java.util.UUID; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerMoveEvent; public class Halter implements Listener { diff --git a/Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java b/Datura/src/main/java/fns/datura/punishment/Locker.java similarity index 95% rename from Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java rename to Datura/src/main/java/fns/datura/punishment/Locker.java index c459037..71a0abd 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/punishment/Locker.java +++ b/Datura/src/main/java/fns/datura/punishment/Locker.java @@ -1,18 +1,17 @@ -package me.totalfreedom.datura.punishment; +package fns.datura.punishment; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.service.Service; +import fns.patchwork.base.Patchwork; +import fns.patchwork.service.Service; +import java.util.HashSet; +import java.util.Set; +import java.util.SplittableRandom; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; -import java.util.HashSet; -import java.util.Set; -import java.util.SplittableRandom; -import java.util.UUID; - public class Locker extends Service { private final Set lockedPlayers = new HashSet<>(); diff --git a/Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java b/Datura/src/main/java/fns/datura/sql/MySQL.java similarity index 98% rename from Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java rename to Datura/src/main/java/fns/datura/sql/MySQL.java index ae2debf..e3485e7 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/sql/MySQL.java +++ b/Datura/src/main/java/fns/datura/sql/MySQL.java @@ -1,9 +1,8 @@ -package me.totalfreedom.datura.sql; - -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.sql.SQL; -import me.totalfreedom.utils.container.Identity; +package fns.datura.sql; +import fns.patchwork.base.Patchwork; +import fns.patchwork.sql.SQL; +import fns.patchwork.utils.container.Identity; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; diff --git a/Datura/src/main/java/me/totalfreedom/datura/sql/Result.java b/Datura/src/main/java/fns/datura/sql/Result.java similarity index 83% rename from Datura/src/main/java/me/totalfreedom/datura/sql/Result.java rename to Datura/src/main/java/fns/datura/sql/Result.java index 9fd214b..7f51cee 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/sql/Result.java +++ b/Datura/src/main/java/fns/datura/sql/Result.java @@ -1,4 +1,4 @@ -package me.totalfreedom.datura.sql; +package fns.datura.sql; import com.google.errorprone.annotations.Immutable; diff --git a/Datura/src/main/java/me/totalfreedom/datura/user/ServerEconomyHolder.java b/Datura/src/main/java/fns/datura/user/ServerEconomyHolder.java similarity index 96% rename from Datura/src/main/java/me/totalfreedom/datura/user/ServerEconomyHolder.java rename to Datura/src/main/java/fns/datura/user/ServerEconomyHolder.java index 768ac91..5ac8649 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/user/ServerEconomyHolder.java +++ b/Datura/src/main/java/fns/datura/user/ServerEconomyHolder.java @@ -1,7 +1,7 @@ -package me.totalfreedom.datura.user; +package fns.datura.user; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.EconomicEntityData; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.EconomicEntityData; /** * Represents the server's economy holder. diff --git a/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java b/Datura/src/main/java/fns/datura/user/SimpleUserData.java similarity index 93% rename from Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java rename to Datura/src/main/java/fns/datura/user/SimpleUserData.java index c8d95e7..234306d 100644 --- a/Datura/src/main/java/me/totalfreedom/datura/user/SimpleUserData.java +++ b/Datura/src/main/java/fns/datura/user/SimpleUserData.java @@ -1,24 +1,23 @@ -package me.totalfreedom.datura.user; +package fns.datura.user; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.datura.event.UserDataUpdateEvent; -import me.totalfreedom.datura.perms.FreedomUser; -import me.totalfreedom.display.adminchat.AdminChatFormat; -import me.totalfreedom.security.Group; -import me.totalfreedom.sql.SQL; -import me.totalfreedom.user.User; -import me.totalfreedom.user.UserData; -import me.totalfreedom.utils.logging.FreedomLogger; +import fns.datura.event.UserDataUpdateEvent; +import fns.datura.perms.FreedomUser; +import fns.patchwork.base.Patchwork; +import fns.patchwork.display.adminchat.AdminChatFormat; +import fns.patchwork.security.Group; +import fns.patchwork.sql.SQL; +import fns.patchwork.user.User; +import fns.patchwork.user.UserData; +import fns.patchwork.utils.logging.FreedomLogger; +import java.sql.SQLException; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; import org.apache.commons.lang3.exception.ExceptionUtils; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.sql.SQLException; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicLong; - public class SimpleUserData implements UserData { private final UUID uuid; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java b/Fossil/src/main/java/fns/fossil/Fossil.java similarity index 73% rename from Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java rename to Fossil/src/main/java/fns/fossil/Fossil.java index a4eda38..e32ce9b 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/Fossil.java +++ b/Fossil/src/main/java/fns/fossil/Fossil.java @@ -1,9 +1,9 @@ -package me.totalfreedom.fossil; +package fns.fossil; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.base.Registration; -import me.totalfreedom.fossil.trail.Trailer; -import me.totalfreedom.service.SubscriptionProvider; +import fns.fossil.trail.Trailer; +import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; +import fns.patchwork.service.SubscriptionProvider; import org.bukkit.plugin.java.JavaPlugin; public class Fossil extends JavaPlugin diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/BouncyPad.java b/Fossil/src/main/java/fns/fossil/bouncypads/BouncyPad.java similarity index 99% rename from Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/BouncyPad.java rename to Fossil/src/main/java/fns/fossil/bouncypads/BouncyPad.java index cacd37a..176af05 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/BouncyPad.java +++ b/Fossil/src/main/java/fns/fossil/bouncypads/BouncyPad.java @@ -1,12 +1,11 @@ -package me.totalfreedom.fossil.bouncypads; +package fns.fossil.bouncypads; import com.google.errorprone.annotations.Immutable; +import java.util.SplittableRandom; import org.bukkit.block.BlockFace; import org.bukkit.entity.Player; import org.bukkit.util.Vector; -import java.util.SplittableRandom; - /** * Represents a bouncy pad. Has a velocity and a type. */ diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java b/Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java similarity index 97% rename from Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java rename to Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java index 7af351b..93b5f91 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadHolder.java +++ b/Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java @@ -1,7 +1,11 @@ -package me.totalfreedom.fossil.bouncypads; +package fns.fossil.bouncypads; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.fossil.Fossil; +import fns.fossil.Fossil; +import fns.patchwork.base.Patchwork; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.stream.Stream; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Tag; @@ -12,11 +16,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerMoveEvent; import org.jetbrains.annotations.Nullable; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import java.util.stream.Stream; - /** * Holds all the active pads for each player, and also manages player pad interaction. */ diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadType.java b/Fossil/src/main/java/fns/fossil/bouncypads/PadType.java similarity index 94% rename from Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadType.java rename to Fossil/src/main/java/fns/fossil/bouncypads/PadType.java index 2c58591..a6f4c33 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/bouncypads/PadType.java +++ b/Fossil/src/main/java/fns/fossil/bouncypads/PadType.java @@ -1,4 +1,4 @@ -package me.totalfreedom.fossil.bouncypads; +package fns.fossil.bouncypads; import org.bukkit.block.BlockFace; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/cmd/CakeCommand.java b/Fossil/src/main/java/fns/fossil/cmd/CakeCommand.java similarity index 73% rename from Fossil/src/main/java/me/totalfreedom/fossil/cmd/CakeCommand.java rename to Fossil/src/main/java/fns/fossil/cmd/CakeCommand.java index 7a5c7b0..3328a66 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/cmd/CakeCommand.java +++ b/Fossil/src/main/java/fns/fossil/cmd/CakeCommand.java @@ -19,13 +19,13 @@ * THE SOFTWARE. */ -package me.totalfreedom.fossil.cmd; +package fns.fossil.cmd; -import me.totalfreedom.command.Commander; -import me.totalfreedom.command.annotation.Base; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.utils.kyori.FreedomMiniMessage; +import fns.patchwork.command.Commander; +import fns.patchwork.command.annotation.Base; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.utils.kyori.FreedomMiniMessage; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.command.CommandSender; @@ -46,9 +46,11 @@ public class CakeCommand extends Commander @Base public void broadcastCake(final CommandSender sender) { - Bukkit.broadcast(FreedomMiniMessage.deserialize(true, - "But there's no sense crying over every mistake. You just keep on trying till you run out of " + - "cake.")); + Bukkit.getServer().sendMessage(FreedomMiniMessage.deserialize(true, + "But there's no sense crying over " + + "every mistake. You just keep on trying " + + "till you run out of " + + "cake.")); final ItemStack stack = new ItemStack(Material.CAKE, 1); final ItemMeta meta = stack.getItemMeta(); diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleCompletedTransaction.java b/Fossil/src/main/java/fns/fossil/economy/SimpleCompletedTransaction.java similarity index 80% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleCompletedTransaction.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleCompletedTransaction.java index d9c666a..fe0af1f 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleCompletedTransaction.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleCompletedTransaction.java @@ -1,9 +1,9 @@ -package me.totalfreedom.fossil.economy; +package fns.fossil.economy; -import me.totalfreedom.economy.CompletedTransaction; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.Transaction; -import me.totalfreedom.economy.TransactionResult; +import fns.patchwork.economy.CompletedTransaction; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.Transaction; +import fns.patchwork.economy.TransactionResult; public class SimpleCompletedTransaction implements CompletedTransaction { diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleLoggedTransactor.java b/Fossil/src/main/java/fns/fossil/economy/SimpleLoggedTransactor.java similarity index 79% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleLoggedTransactor.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleLoggedTransactor.java index 440c0b3..3a18dcc 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleLoggedTransactor.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleLoggedTransactor.java @@ -1,9 +1,9 @@ -package me.totalfreedom.fossil.economy; +package fns.fossil.economy; -import me.totalfreedom.economy.CompletedTransaction; -import me.totalfreedom.economy.MutableTransaction; -import me.totalfreedom.economy.TransactionLogger; -import me.totalfreedom.economy.Transactor; +import fns.patchwork.economy.CompletedTransaction; +import fns.patchwork.economy.MutableTransaction; +import fns.patchwork.economy.TransactionLogger; +import fns.patchwork.economy.Transactor; public class SimpleLoggedTransactor implements Transactor { diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleMutableTransaction.java b/Fossil/src/main/java/fns/fossil/economy/SimpleMutableTransaction.java similarity index 81% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleMutableTransaction.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleMutableTransaction.java index 9aadb26..9c46559 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleMutableTransaction.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleMutableTransaction.java @@ -1,7 +1,7 @@ -package me.totalfreedom.fossil.economy; +package fns.fossil.economy; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.MutableTransaction; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.MutableTransaction; public class SimpleMutableTransaction extends SimpleTransaction implements MutableTransaction { diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java b/Fossil/src/main/java/fns/fossil/economy/SimpleTransaction.java similarity index 85% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleTransaction.java index 93bf7b7..1d1fcc9 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleTransaction.java @@ -1,8 +1,7 @@ -package me.totalfreedom.fossil.economy; - -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.Transaction; +package fns.fossil.economy; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.Transaction; import java.util.concurrent.atomic.AtomicLong; public class SimpleTransaction implements Transaction diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java b/Fossil/src/main/java/fns/fossil/economy/SimpleTransactionLogger.java similarity index 84% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleTransactionLogger.java index 80ba2d2..3f5730f 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionLogger.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleTransactionLogger.java @@ -1,11 +1,11 @@ -package me.totalfreedom.fossil.economy; +package fns.fossil.economy; -import me.totalfreedom.audience.MutableAudienceForwarder; -import me.totalfreedom.economy.CompletedTransaction; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.TransactionLogger; -import me.totalfreedom.economy.TransactionResult; -import me.totalfreedom.utils.logging.FreedomLogger; +import fns.patchwork.audience.MutableAudienceForwarder; +import fns.patchwork.economy.CompletedTransaction; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.TransactionLogger; +import fns.patchwork.economy.TransactionResult; +import fns.patchwork.utils.logging.FreedomLogger; import net.kyori.adventure.text.Component; public class SimpleTransactionLogger implements TransactionLogger diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionResult.java b/Fossil/src/main/java/fns/fossil/economy/SimpleTransactionResult.java similarity index 75% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionResult.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleTransactionResult.java index e0ee389..1f15eb4 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactionResult.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleTransactionResult.java @@ -1,6 +1,6 @@ -package me.totalfreedom.fossil.economy; +package fns.fossil.economy; -import me.totalfreedom.economy.TransactionResult; +import fns.patchwork.economy.TransactionResult; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; @@ -15,20 +15,20 @@ public class SimpleTransactionResult implements TransactionResult "The source has an insufficient balance to carry out this transaction.", false); private final String message; private final Component component; - private final boolean successful; + private final boolean isSuccessful; - public SimpleTransactionResult(final String message, final boolean successful) + public SimpleTransactionResult(final String message, final boolean isSuccessful) { - this(message, Component.text(message, successful - ? NamedTextColor.GREEN - : NamedTextColor.RED), successful); + this(message, Component.text(message, isSuccessful + ? NamedTextColor.GREEN + : NamedTextColor.RED), isSuccessful); } - public SimpleTransactionResult(final String message, final Component component, final boolean successful) + public SimpleTransactionResult(final String message, final Component component, final boolean isSuccessful) { this.message = message; this.component = component; - this.successful = successful; + this.isSuccessful = isSuccessful; } @Override @@ -40,7 +40,7 @@ public class SimpleTransactionResult implements TransactionResult @Override public boolean isSuccessful() { - return successful; + return isSuccessful; } @Override diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactor.java b/Fossil/src/main/java/fns/fossil/economy/SimpleTransactor.java similarity index 84% rename from Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactor.java rename to Fossil/src/main/java/fns/fossil/economy/SimpleTransactor.java index 7524174..926468c 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransactor.java +++ b/Fossil/src/main/java/fns/fossil/economy/SimpleTransactor.java @@ -1,10 +1,10 @@ -package me.totalfreedom.fossil.economy; +package fns.fossil.economy; -import me.totalfreedom.economy.CompletedTransaction; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.EconomicEntityData; -import me.totalfreedom.economy.MutableTransaction; -import me.totalfreedom.economy.Transactor; +import fns.patchwork.economy.CompletedTransaction; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.EconomicEntityData; +import fns.patchwork.economy.MutableTransaction; +import fns.patchwork.economy.Transactor; public class SimpleTransactor implements Transactor { diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/items/ClownfishItem.java b/Fossil/src/main/java/fns/fossil/items/ClownfishItem.java similarity index 95% rename from Fossil/src/main/java/me/totalfreedom/fossil/items/ClownfishItem.java rename to Fossil/src/main/java/fns/fossil/items/ClownfishItem.java index 0bf1131..972094a 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/items/ClownfishItem.java +++ b/Fossil/src/main/java/fns/fossil/items/ClownfishItem.java @@ -1,4 +1,4 @@ -package me.totalfreedom.fossil.items; +package fns.fossil.items; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/items/ShopItem.java b/Fossil/src/main/java/fns/fossil/items/ShopItem.java similarity index 95% rename from Fossil/src/main/java/me/totalfreedom/fossil/items/ShopItem.java rename to Fossil/src/main/java/fns/fossil/items/ShopItem.java index 04f6bb9..5ec1c9d 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/items/ShopItem.java +++ b/Fossil/src/main/java/fns/fossil/items/ShopItem.java @@ -1,4 +1,4 @@ -package me.totalfreedom.fossil.items; +package fns.fossil.items; import org.bukkit.Material; import org.bukkit.entity.Entity; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/items/TrailItem.java b/Fossil/src/main/java/fns/fossil/items/TrailItem.java similarity index 91% rename from Fossil/src/main/java/me/totalfreedom/fossil/items/TrailItem.java rename to Fossil/src/main/java/fns/fossil/items/TrailItem.java index ea95de6..9ecae33 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/items/TrailItem.java +++ b/Fossil/src/main/java/fns/fossil/items/TrailItem.java @@ -1,4 +1,4 @@ -package me.totalfreedom.fossil.items; +package fns.fossil.items; import org.bukkit.Material; import org.bukkit.entity.Entity; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/reactions/CopyCatReaction.java b/Fossil/src/main/java/fns/fossil/reactions/CopyCatReaction.java similarity index 78% rename from Fossil/src/main/java/me/totalfreedom/fossil/reactions/CopyCatReaction.java rename to Fossil/src/main/java/fns/fossil/reactions/CopyCatReaction.java index 52460e8..6ec3932 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/reactions/CopyCatReaction.java +++ b/Fossil/src/main/java/fns/fossil/reactions/CopyCatReaction.java @@ -1,15 +1,13 @@ -package me.totalfreedom.fossil.reactions; +package fns.fossil.reactions; -import me.totalfreedom.display.BossBarDisplay; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.shop.Reaction; -import me.totalfreedom.shop.ReactionType; +import fns.patchwork.display.BossBarDisplay; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.shop.Reaction; +import fns.patchwork.shop.ReactionType; +import java.util.SplittableRandom; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.bossbar.BossBar; -import java.util.SplittableRandom; -import java.util.function.Consumer; - /** * Represents a single chat reaction that can be performed by a player. */ @@ -29,12 +27,6 @@ public final class CopyCatReaction extends Reaction return reward; } - @Override - public void onReact(final Consumer entity) - { - entity.accept(null); - } - @Override public void display(final Audience audience) { @@ -44,6 +36,12 @@ public final class CopyCatReaction extends Reaction .build(); } + @Override + public void onReact(final EconomicEntity entity) + { + // + } + public String getRandomCharacterString() { final SplittableRandom random = new SplittableRandom(); diff --git a/Fossil/src/main/java/fns/fossil/shop/Shoppe.java b/Fossil/src/main/java/fns/fossil/shop/Shoppe.java new file mode 100644 index 0000000..8836bae --- /dev/null +++ b/Fossil/src/main/java/fns/fossil/shop/Shoppe.java @@ -0,0 +1,5 @@ +package fns.fossil.shop; + +public class Shoppe +{ +} diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/shop/menus/MainMenu.java b/Fossil/src/main/java/fns/fossil/shop/menus/MainMenu.java similarity index 59% rename from Fossil/src/main/java/me/totalfreedom/fossil/shop/menus/MainMenu.java rename to Fossil/src/main/java/fns/fossil/shop/menus/MainMenu.java index c637c56..2ea0394 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/shop/menus/MainMenu.java +++ b/Fossil/src/main/java/fns/fossil/shop/menus/MainMenu.java @@ -1,6 +1,6 @@ -package me.totalfreedom.fossil.shop.menus; +package fns.fossil.shop.menus; -import me.totalfreedom.display.AbstractMenu; +import fns.patchwork.display.AbstractMenu; public final class MainMenu extends AbstractMenu { diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/Trailer.java b/Fossil/src/main/java/fns/fossil/trail/Trailer.java similarity index 85% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/Trailer.java rename to Fossil/src/main/java/fns/fossil/trail/Trailer.java index b530595..ef9e05b 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/Trailer.java +++ b/Fossil/src/main/java/fns/fossil/trail/Trailer.java @@ -1,8 +1,7 @@ -package me.totalfreedom.fossil.trail; - -import me.totalfreedom.particle.Trail; -import me.totalfreedom.service.Service; +package fns.fossil.trail; +import fns.patchwork.particle.Trail; +import fns.patchwork.service.Service; import java.util.ArrayList; import java.util.List; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/BasicTrail.java b/Fossil/src/main/java/fns/fossil/trail/types/BasicTrail.java similarity index 92% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/BasicTrail.java rename to Fossil/src/main/java/fns/fossil/trail/types/BasicTrail.java index 6d6ee9b..f9746f8 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/BasicTrail.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/BasicTrail.java @@ -1,6 +1,6 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; -import me.totalfreedom.particle.TrailType; +import fns.patchwork.particle.TrailType; import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Particle; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/FlameTrail.java b/Fossil/src/main/java/fns/fossil/trail/types/FlameTrail.java similarity index 90% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/FlameTrail.java rename to Fossil/src/main/java/fns/fossil/trail/types/FlameTrail.java index 2fe823e..e141cb7 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/FlameTrail.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/FlameTrail.java @@ -1,6 +1,6 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; -import me.totalfreedom.particle.TrailType; +import fns.patchwork.particle.TrailType; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.util.Vector; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/HeartTrail.java b/Fossil/src/main/java/fns/fossil/trail/types/HeartTrail.java similarity index 88% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/HeartTrail.java rename to Fossil/src/main/java/fns/fossil/trail/types/HeartTrail.java index 968a6ef..8bc2784 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/HeartTrail.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/HeartTrail.java @@ -1,6 +1,6 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; -import me.totalfreedom.particle.TrailType; +import fns.patchwork.particle.TrailType; import org.bukkit.Location; import org.bukkit.entity.Player; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/RainbowTrail.java b/Fossil/src/main/java/fns/fossil/trail/types/RainbowTrail.java similarity index 90% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/RainbowTrail.java rename to Fossil/src/main/java/fns/fossil/trail/types/RainbowTrail.java index b020349..5f80dd9 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/RainbowTrail.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/RainbowTrail.java @@ -1,14 +1,13 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; -import me.totalfreedom.particle.TrailType; -import me.totalfreedom.utils.InterpolationUtils; +import fns.patchwork.particle.TrailType; +import fns.patchwork.utils.InterpolationUtils; +import java.util.Iterator; import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Particle; import org.bukkit.entity.Player; -import java.util.Iterator; - public final class RainbowTrail extends SimpleTrail { private Iterator currentColor; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/SimpleTrail.java b/Fossil/src/main/java/fns/fossil/trail/types/SimpleTrail.java similarity index 93% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/SimpleTrail.java rename to Fossil/src/main/java/fns/fossil/trail/types/SimpleTrail.java index 6988ba5..bf2c249 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/SimpleTrail.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/SimpleTrail.java @@ -1,7 +1,9 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; -import me.totalfreedom.particle.Trail; -import me.totalfreedom.particle.TrailType; +import fns.patchwork.particle.Trail; +import fns.patchwork.particle.TrailType; +import java.util.Set; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.OfflinePlayer; @@ -9,9 +11,6 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Set; -import java.util.UUID; - public abstract class SimpleTrail implements Trail { private final UUID associatedPlayerUUID; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/StrobeTrail.java b/Fossil/src/main/java/fns/fossil/trail/types/StrobeTrail.java similarity index 91% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/StrobeTrail.java rename to Fossil/src/main/java/fns/fossil/trail/types/StrobeTrail.java index 1e444c5..541aa93 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/StrobeTrail.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/StrobeTrail.java @@ -1,6 +1,6 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; -import me.totalfreedom.particle.TrailType; +import fns.patchwork.particle.TrailType; import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Particle; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/TrailProvider.java b/Fossil/src/main/java/fns/fossil/trail/types/TrailProvider.java similarity index 80% rename from Fossil/src/main/java/me/totalfreedom/fossil/trail/types/TrailProvider.java rename to Fossil/src/main/java/fns/fossil/trail/types/TrailProvider.java index 1110266..55ec075 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/trail/types/TrailProvider.java +++ b/Fossil/src/main/java/fns/fossil/trail/types/TrailProvider.java @@ -1,4 +1,4 @@ -package me.totalfreedom.fossil.trail.types; +package fns.fossil.trail.types; import org.bukkit.entity.Player; diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/shop/Shoppe.java b/Fossil/src/main/java/me/totalfreedom/fossil/shop/Shoppe.java deleted file mode 100644 index d586412..0000000 --- a/Fossil/src/main/java/me/totalfreedom/fossil/shop/Shoppe.java +++ /dev/null @@ -1,5 +0,0 @@ -package me.totalfreedom.fossil.shop; - -public class Shoppe -{ -} diff --git a/Patchwork/src/main/java/me/totalfreedom/api/Context.java b/Patchwork/src/main/java/fns/patchwork/api/Context.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/api/Context.java rename to Patchwork/src/main/java/fns/patchwork/api/Context.java index 321cca6..063a48b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/api/Context.java +++ b/Patchwork/src/main/java/fns/patchwork/api/Context.java @@ -1,6 +1,7 @@ -package me.totalfreedom.api; +package fns.patchwork.api; -import me.totalfreedom.provider.ContextProvider; +import fns.patchwork.provider.ContextProvider; +import java.util.function.Function; import net.kyori.adventure.text.Component; import org.bukkit.Location; import org.bukkit.World; @@ -12,8 +13,6 @@ import org.bukkit.event.block.Action; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.function.Function; - /** * Represents an object context. This class is a simple generic type wrapper that can be used to ensure data types. This * class is also used to provide a simple way to map data types. diff --git a/Patchwork/src/main/java/me/totalfreedom/api/Interpolator.java b/Patchwork/src/main/java/fns/patchwork/api/Interpolator.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/api/Interpolator.java rename to Patchwork/src/main/java/fns/patchwork/api/Interpolator.java index 0a6c598..1acd20c 100644 --- a/Patchwork/src/main/java/me/totalfreedom/api/Interpolator.java +++ b/Patchwork/src/main/java/fns/patchwork/api/Interpolator.java @@ -1,4 +1,4 @@ -package me.totalfreedom.api; +package fns.patchwork.api; /** * Interpolates a range of values and returns the results in a {@link Double} array. diff --git a/Patchwork/src/main/java/me/totalfreedom/api/Serializable.java b/Patchwork/src/main/java/fns/patchwork/api/Serializable.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/api/Serializable.java rename to Patchwork/src/main/java/fns/patchwork/api/Serializable.java index 3dc62a6..37b38ff 100644 --- a/Patchwork/src/main/java/me/totalfreedom/api/Serializable.java +++ b/Patchwork/src/main/java/fns/patchwork/api/Serializable.java @@ -1,4 +1,4 @@ -package me.totalfreedom.api; +package fns.patchwork.api; /** * This interface represents a Serializable object. Objects which require custom serialization and cannot simply diff --git a/Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java b/Patchwork/src/main/java/fns/patchwork/audience/MutableAudienceForwarder.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java rename to Patchwork/src/main/java/fns/patchwork/audience/MutableAudienceForwarder.java index 38eaf1a..802154f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/audience/MutableAudienceForwarder.java +++ b/Patchwork/src/main/java/fns/patchwork/audience/MutableAudienceForwarder.java @@ -1,4 +1,4 @@ -package me.totalfreedom.audience; +package fns.patchwork.audience; import java.util.HashSet; import java.util.Set; diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java b/Patchwork/src/main/java/fns/patchwork/base/Patchwork.java similarity index 92% rename from Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java rename to Patchwork/src/main/java/fns/patchwork/base/Patchwork.java index e12ed34..964180f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Patchwork.java +++ b/Patchwork/src/main/java/fns/patchwork/base/Patchwork.java @@ -1,9 +1,9 @@ -package me.totalfreedom.base; +package fns.patchwork.base; -import me.totalfreedom.display.adminchat.AdminChatDisplay; -import me.totalfreedom.event.EventBus; -import me.totalfreedom.service.FreedomExecutor; -import me.totalfreedom.service.SubscriptionProvider; +import fns.patchwork.display.adminchat.AdminChatDisplay; +import fns.patchwork.event.EventBus; +import fns.patchwork.service.FreedomExecutor; +import fns.patchwork.service.SubscriptionProvider; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Registration.java b/Patchwork/src/main/java/fns/patchwork/base/Registration.java similarity index 88% rename from Patchwork/src/main/java/me/totalfreedom/base/Registration.java rename to Patchwork/src/main/java/fns/patchwork/base/Registration.java index db58a4f..c5aeee8 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Registration.java +++ b/Patchwork/src/main/java/fns/patchwork/base/Registration.java @@ -1,11 +1,11 @@ -package me.totalfreedom.base; +package fns.patchwork.base; -import me.totalfreedom.data.ConfigRegistry; -import me.totalfreedom.data.EventRegistry; -import me.totalfreedom.data.GroupRegistry; -import me.totalfreedom.data.ModuleRegistry; -import me.totalfreedom.data.ServiceTaskRegistry; -import me.totalfreedom.data.UserRegistry; +import fns.patchwork.data.ConfigRegistry; +import fns.patchwork.data.EventRegistry; +import fns.patchwork.data.GroupRegistry; +import fns.patchwork.data.ModuleRegistry; +import fns.patchwork.data.ServiceTaskRegistry; +import fns.patchwork.data.UserRegistry; /** * This class is a holder for each registry in the data package. diff --git a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java b/Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java similarity index 88% rename from Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java rename to Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java index 0cb80e0..2e57e68 100644 --- a/Patchwork/src/main/java/me/totalfreedom/base/Shortcuts.java +++ b/Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java @@ -1,7 +1,6 @@ -package me.totalfreedom.base; +package fns.patchwork.base; -import me.totalfreedom.api.Context; -import me.totalfreedom.user.User; +import fns.patchwork.user.User; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java b/Patchwork/src/main/java/fns/patchwork/command/BukkitDelegate.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java rename to Patchwork/src/main/java/fns/patchwork/command/BukkitDelegate.java index 6ac04ff..45b4965 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/BukkitDelegate.java +++ b/Patchwork/src/main/java/fns/patchwork/command/BukkitDelegate.java @@ -1,13 +1,13 @@ -package me.totalfreedom.command; +package fns.patchwork.command; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Subcommand; +import fns.patchwork.provider.ContextProvider; +import fns.patchwork.utils.logging.FreedomLogger; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Set; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Subcommand; -import me.totalfreedom.provider.ContextProvider; -import me.totalfreedom.utils.logging.FreedomLogger; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/CommandHandler.java b/Patchwork/src/main/java/fns/patchwork/command/CommandHandler.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/command/CommandHandler.java rename to Patchwork/src/main/java/fns/patchwork/command/CommandHandler.java index cfcdd90..0851811 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/CommandHandler.java +++ b/Patchwork/src/main/java/fns/patchwork/command/CommandHandler.java @@ -1,4 +1,4 @@ -package me.totalfreedom.command; +package fns.patchwork.command; import org.bukkit.Bukkit; import org.bukkit.command.CommandMap; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/Commander.java b/Patchwork/src/main/java/fns/patchwork/command/Commander.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/command/Commander.java rename to Patchwork/src/main/java/fns/patchwork/command/Commander.java index 2830a84..07b893c 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/Commander.java +++ b/Patchwork/src/main/java/fns/patchwork/command/Commander.java @@ -1,14 +1,10 @@ -package me.totalfreedom.command; - -import me.totalfreedom.command.annotation.Base; -import me.totalfreedom.command.annotation.Completion; -import me.totalfreedom.command.annotation.Info; -import me.totalfreedom.command.annotation.Permissive; -import me.totalfreedom.command.annotation.Subcommand; -import org.bukkit.plugin.java.JavaPlugin; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +package fns.patchwork.command; +import fns.patchwork.command.annotation.Base; +import fns.patchwork.command.annotation.Completion; +import fns.patchwork.command.annotation.Info; +import fns.patchwork.command.annotation.Permissive; +import fns.patchwork.command.annotation.Subcommand; import java.lang.reflect.Method; import java.util.HashMap; import java.util.HashSet; @@ -16,6 +12,9 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Stream; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * This is the base command class which should be extended when creating a new command. Commands must be annotated with diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Base.java b/Patchwork/src/main/java/fns/patchwork/command/annotation/Base.java similarity index 88% rename from Patchwork/src/main/java/me/totalfreedom/command/annotation/Base.java rename to Patchwork/src/main/java/fns/patchwork/command/annotation/Base.java index c230186..765a04a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Base.java +++ b/Patchwork/src/main/java/fns/patchwork/command/annotation/Base.java @@ -1,4 +1,4 @@ -package me.totalfreedom.command.annotation; +package fns.patchwork.command.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java b/Patchwork/src/main/java/fns/patchwork/command/annotation/Completion.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java rename to Patchwork/src/main/java/fns/patchwork/command/annotation/Completion.java index 1613184..b52a08a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completion.java +++ b/Patchwork/src/main/java/fns/patchwork/command/annotation/Completion.java @@ -1,4 +1,4 @@ -package me.totalfreedom.command.annotation; +package fns.patchwork.command.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Repeatable; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java b/Patchwork/src/main/java/fns/patchwork/command/annotation/Completions.java similarity index 92% rename from Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java rename to Patchwork/src/main/java/fns/patchwork/command/annotation/Completions.java index cdcfb15..aa06d6f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Completions.java +++ b/Patchwork/src/main/java/fns/patchwork/command/annotation/Completions.java @@ -1,4 +1,4 @@ -package me.totalfreedom.command.annotation; +package fns.patchwork.command.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Info.java b/Patchwork/src/main/java/fns/patchwork/command/annotation/Info.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/command/annotation/Info.java rename to Patchwork/src/main/java/fns/patchwork/command/annotation/Info.java index 5ab0bbc..a6ba2a9 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Info.java +++ b/Patchwork/src/main/java/fns/patchwork/command/annotation/Info.java @@ -1,4 +1,4 @@ -package me.totalfreedom.command.annotation; +package fns.patchwork.command.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Permissive.java b/Patchwork/src/main/java/fns/patchwork/command/annotation/Permissive.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/command/annotation/Permissive.java rename to Patchwork/src/main/java/fns/patchwork/command/annotation/Permissive.java index 90c5739..60f1218 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Permissive.java +++ b/Patchwork/src/main/java/fns/patchwork/command/annotation/Permissive.java @@ -1,4 +1,4 @@ -package me.totalfreedom.command.annotation; +package fns.patchwork.command.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java b/Patchwork/src/main/java/fns/patchwork/command/annotation/Subcommand.java similarity index 94% rename from Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java rename to Patchwork/src/main/java/fns/patchwork/command/annotation/Subcommand.java index 679fdb1..9315599 100644 --- a/Patchwork/src/main/java/me/totalfreedom/command/annotation/Subcommand.java +++ b/Patchwork/src/main/java/fns/patchwork/command/annotation/Subcommand.java @@ -1,8 +1,7 @@ -package me.totalfreedom.command.annotation; - -import me.totalfreedom.command.CommandHandler; -import me.totalfreedom.provider.ContextProvider; +package fns.patchwork.command.annotation; +import fns.patchwork.command.CommandHandler; +import fns.patchwork.provider.ContextProvider; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Patchwork/src/main/java/me/totalfreedom/config/Configuration.java b/Patchwork/src/main/java/fns/patchwork/config/Configuration.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/config/Configuration.java rename to Patchwork/src/main/java/fns/patchwork/config/Configuration.java index 728ead2..10a630a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/config/Configuration.java +++ b/Patchwork/src/main/java/fns/patchwork/config/Configuration.java @@ -1,8 +1,7 @@ -package me.totalfreedom.config; - -import me.totalfreedom.api.Context; -import me.totalfreedom.provider.ContextProvider; +package fns.patchwork.config; +import fns.patchwork.api.Context; +import fns.patchwork.provider.ContextProvider; import java.io.File; import java.io.IOException; import java.util.List; diff --git a/Patchwork/src/main/java/me/totalfreedom/config/YamlWrapper.java b/Patchwork/src/main/java/fns/patchwork/config/YamlWrapper.java similarity index 53% rename from Patchwork/src/main/java/me/totalfreedom/config/YamlWrapper.java rename to Patchwork/src/main/java/fns/patchwork/config/YamlWrapper.java index eefd27c..d38933a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/config/YamlWrapper.java +++ b/Patchwork/src/main/java/fns/patchwork/config/YamlWrapper.java @@ -1,4 +1,4 @@ -package me.totalfreedom.config; +package fns.patchwork.config; public final class YamlWrapper { diff --git a/Patchwork/src/main/java/me/totalfreedom/data/ConfigRegistry.java b/Patchwork/src/main/java/fns/patchwork/data/ConfigRegistry.java similarity index 93% rename from Patchwork/src/main/java/me/totalfreedom/data/ConfigRegistry.java rename to Patchwork/src/main/java/fns/patchwork/data/ConfigRegistry.java index 7db90f2..f45e4f0 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/ConfigRegistry.java +++ b/Patchwork/src/main/java/fns/patchwork/data/ConfigRegistry.java @@ -1,7 +1,6 @@ -package me.totalfreedom.data; - -import me.totalfreedom.config.Configuration; +package fns.patchwork.data; +import fns.patchwork.config.Configuration; import java.util.HashMap; import java.util.Map; diff --git a/Patchwork/src/main/java/me/totalfreedom/data/EventRegistry.java b/Patchwork/src/main/java/fns/patchwork/data/EventRegistry.java similarity index 91% rename from Patchwork/src/main/java/me/totalfreedom/data/EventRegistry.java rename to Patchwork/src/main/java/fns/patchwork/data/EventRegistry.java index c5fb292..2130b46 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/EventRegistry.java +++ b/Patchwork/src/main/java/fns/patchwork/data/EventRegistry.java @@ -1,8 +1,7 @@ -package me.totalfreedom.data; - -import me.totalfreedom.event.FEvent; -import me.totalfreedom.provider.EventProvider; +package fns.patchwork.data; +import fns.patchwork.event.FEvent; +import fns.patchwork.provider.EventProvider; import java.util.ArrayList; import java.util.List; diff --git a/Patchwork/src/main/java/me/totalfreedom/data/GroupRegistry.java b/Patchwork/src/main/java/fns/patchwork/data/GroupRegistry.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/data/GroupRegistry.java rename to Patchwork/src/main/java/fns/patchwork/data/GroupRegistry.java index aec9b76..66c6456 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/GroupRegistry.java +++ b/Patchwork/src/main/java/fns/patchwork/data/GroupRegistry.java @@ -1,10 +1,9 @@ -package me.totalfreedom.data; - -import me.totalfreedom.security.Group; -import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; +package fns.patchwork.data; +import fns.patchwork.security.Group; import java.util.ArrayList; import java.util.List; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; /** * A registry for {@link Group}s. diff --git a/Patchwork/src/main/java/me/totalfreedom/data/ModuleRegistry.java b/Patchwork/src/main/java/fns/patchwork/data/ModuleRegistry.java similarity index 94% rename from Patchwork/src/main/java/me/totalfreedom/data/ModuleRegistry.java rename to Patchwork/src/main/java/fns/patchwork/data/ModuleRegistry.java index cdc26c0..ecd4c43 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/ModuleRegistry.java +++ b/Patchwork/src/main/java/fns/patchwork/data/ModuleRegistry.java @@ -1,10 +1,9 @@ -package me.totalfreedom.data; - -import me.totalfreedom.provider.ModuleProvider; -import org.bukkit.plugin.java.JavaPlugin; +package fns.patchwork.data; +import fns.patchwork.provider.ModuleProvider; import java.util.ArrayList; import java.util.List; +import org.bukkit.plugin.java.JavaPlugin; /** * A registry for modules. diff --git a/Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java b/Patchwork/src/main/java/fns/patchwork/data/ServiceTaskRegistry.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java rename to Patchwork/src/main/java/fns/patchwork/data/ServiceTaskRegistry.java index e734b8e..fa7eaaf 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/ServiceTaskRegistry.java +++ b/Patchwork/src/main/java/fns/patchwork/data/ServiceTaskRegistry.java @@ -1,14 +1,13 @@ -package me.totalfreedom.data; - -import me.totalfreedom.service.Service; -import me.totalfreedom.service.ServiceSubscription; -import me.totalfreedom.service.SubscriptionProvider; -import me.totalfreedom.service.Task; -import me.totalfreedom.service.TaskSubscription; -import org.jetbrains.annotations.Nullable; +package fns.patchwork.data; +import fns.patchwork.service.Service; +import fns.patchwork.service.ServiceSubscription; +import fns.patchwork.service.SubscriptionProvider; +import fns.patchwork.service.Task; +import fns.patchwork.service.TaskSubscription; import java.util.ArrayList; import java.util.List; +import org.jetbrains.annotations.Nullable; /** * A registry for all services and tasks registered with Patchwork. diff --git a/Patchwork/src/main/java/me/totalfreedom/data/UserRegistry.java b/Patchwork/src/main/java/fns/patchwork/data/UserRegistry.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/data/UserRegistry.java rename to Patchwork/src/main/java/fns/patchwork/data/UserRegistry.java index 64bf824..19b5ec3 100644 --- a/Patchwork/src/main/java/me/totalfreedom/data/UserRegistry.java +++ b/Patchwork/src/main/java/fns/patchwork/data/UserRegistry.java @@ -1,11 +1,10 @@ -package me.totalfreedom.data; - -import me.totalfreedom.user.User; -import me.totalfreedom.user.UserData; -import org.bukkit.entity.Player; +package fns.patchwork.data; +import fns.patchwork.user.User; +import fns.patchwork.user.UserData; import java.util.HashMap; import java.util.Map; +import org.bukkit.entity.Player; /** * A registry for {@link UserData} objects. diff --git a/Patchwork/src/main/java/me/totalfreedom/display/AbstractMenu.java b/Patchwork/src/main/java/fns/patchwork/display/AbstractMenu.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/display/AbstractMenu.java rename to Patchwork/src/main/java/fns/patchwork/display/AbstractMenu.java index 9baa4df..7377e38 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/AbstractMenu.java +++ b/Patchwork/src/main/java/fns/patchwork/display/AbstractMenu.java @@ -1,5 +1,10 @@ -package me.totalfreedom.display; +package fns.patchwork.display; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.Material; @@ -9,12 +14,6 @@ import org.bukkit.inventory.meta.ItemMeta; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - /** * Represents a menu that can be opened by a player. */ diff --git a/Patchwork/src/main/java/me/totalfreedom/display/BossBarDisplay.java b/Patchwork/src/main/java/fns/patchwork/display/BossBarDisplay.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/display/BossBarDisplay.java rename to Patchwork/src/main/java/fns/patchwork/display/BossBarDisplay.java index 2239b4b..2720f12 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/BossBarDisplay.java +++ b/Patchwork/src/main/java/fns/patchwork/display/BossBarDisplay.java @@ -1,5 +1,8 @@ -package me.totalfreedom.display; +package fns.patchwork.display; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.audience.ForwardingAudience; import net.kyori.adventure.bossbar.BossBar; @@ -7,10 +10,6 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.TextColor; import org.jetbrains.annotations.Range; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - /** * This class is a wrapper for {@link BossBar} objects. It provides some handy methods for changing the boss bar's * properties, displaying the bar to {@link Audience}s, and a {@link BossBarBuilder} to easily create new boss bars. diff --git a/Patchwork/src/main/java/me/totalfreedom/display/BossBarTimer.java b/Patchwork/src/main/java/fns/patchwork/display/BossBarTimer.java similarity index 93% rename from Patchwork/src/main/java/me/totalfreedom/display/BossBarTimer.java rename to Patchwork/src/main/java/fns/patchwork/display/BossBarTimer.java index dfa3eb1..dd66c5d 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/BossBarTimer.java +++ b/Patchwork/src/main/java/fns/patchwork/display/BossBarTimer.java @@ -1,9 +1,8 @@ -package me.totalfreedom.display; - -import me.totalfreedom.service.Task; -import org.bukkit.Bukkit; +package fns.patchwork.display; +import fns.patchwork.service.Task; import java.time.Duration; +import org.bukkit.Bukkit; public class BossBarTimer extends Task { diff --git a/Patchwork/src/main/java/me/totalfreedom/display/ClickAction.java b/Patchwork/src/main/java/fns/patchwork/display/ClickAction.java similarity index 92% rename from Patchwork/src/main/java/me/totalfreedom/display/ClickAction.java rename to Patchwork/src/main/java/fns/patchwork/display/ClickAction.java index 70aa1ad..afdd8a7 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/ClickAction.java +++ b/Patchwork/src/main/java/fns/patchwork/display/ClickAction.java @@ -1,4 +1,4 @@ -package me.totalfreedom.display; +package fns.patchwork.display; import org.bukkit.entity.Player; diff --git a/Patchwork/src/main/java/me/totalfreedom/display/Displayable.java b/Patchwork/src/main/java/fns/patchwork/display/Displayable.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/display/Displayable.java rename to Patchwork/src/main/java/fns/patchwork/display/Displayable.java index 56a5fff..f790422 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/Displayable.java +++ b/Patchwork/src/main/java/fns/patchwork/display/Displayable.java @@ -1,5 +1,9 @@ -package me.totalfreedom.display; +package fns.patchwork.display; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.HumanEntity; @@ -10,11 +14,6 @@ import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.ListIterator; - /** * A class that represents an inventory that can be displayed to players. This class also represents the inventory * holder which contains the inventory. diff --git a/Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java b/Patchwork/src/main/java/fns/patchwork/display/DisplayableView.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java rename to Patchwork/src/main/java/fns/patchwork/display/DisplayableView.java index 7c4e2ec..7f27bd4 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/DisplayableView.java +++ b/Patchwork/src/main/java/fns/patchwork/display/DisplayableView.java @@ -1,6 +1,6 @@ -package me.totalfreedom.display; +package fns.patchwork.display; -import me.totalfreedom.utils.kyori.FreedomAdventure; +import fns.patchwork.utils.kyori.FreedomAdventure; import org.bukkit.entity.HumanEntity; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; diff --git a/Patchwork/src/main/java/me/totalfreedom/display/TitleDisplay.java b/Patchwork/src/main/java/fns/patchwork/display/TitleDisplay.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/display/TitleDisplay.java rename to Patchwork/src/main/java/fns/patchwork/display/TitleDisplay.java index b6bf7cc..a225c66 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/TitleDisplay.java +++ b/Patchwork/src/main/java/fns/patchwork/display/TitleDisplay.java @@ -1,13 +1,12 @@ -package me.totalfreedom.display; +package fns.patchwork.display; +import java.time.Duration; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.audience.ForwardingAudience; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.TextColor; import net.kyori.adventure.title.Title; -import java.time.Duration; - /** * A wrapper class for {@link Title}s that allows for easy display to an {@link Audience}. */ diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java b/Patchwork/src/main/java/fns/patchwork/display/adminchat/ACFormatBuilder.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java rename to Patchwork/src/main/java/fns/patchwork/display/adminchat/ACFormatBuilder.java index b676936..44730ad 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/ACFormatBuilder.java +++ b/Patchwork/src/main/java/fns/patchwork/display/adminchat/ACFormatBuilder.java @@ -1,4 +1,4 @@ -package me.totalfreedom.display.adminchat; +package fns.patchwork.display.adminchat; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextColor; diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java b/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java rename to Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java index 1c27cff..8e70100 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatDisplay.java +++ b/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java @@ -1,10 +1,15 @@ -package me.totalfreedom.display.adminchat; +package fns.patchwork.display.adminchat; +import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Shortcuts; +import fns.patchwork.security.Groups; +import fns.patchwork.user.UserData; import io.papermc.paper.event.player.AsyncChatEvent; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.base.Shortcuts; -import me.totalfreedom.security.Groups; -import me.totalfreedom.user.UserData; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; @@ -13,12 +18,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - public class AdminChatDisplay { protected static final String ACPERM = "patchwork.adminchat"; diff --git a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java b/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatFormat.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java rename to Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatFormat.java index 5580c9e..03cf434 100644 --- a/Patchwork/src/main/java/me/totalfreedom/display/adminchat/AdminChatFormat.java +++ b/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatFormat.java @@ -1,4 +1,4 @@ -package me.totalfreedom.display.adminchat; +package fns.patchwork.display.adminchat; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.TextComponent; diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/CompletedTransaction.java b/Patchwork/src/main/java/fns/patchwork/economy/CompletedTransaction.java similarity index 90% rename from Patchwork/src/main/java/me/totalfreedom/economy/CompletedTransaction.java rename to Patchwork/src/main/java/fns/patchwork/economy/CompletedTransaction.java index 50af8c9..63d72b2 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/CompletedTransaction.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/CompletedTransaction.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * Represents an immutable transaction that has been fully handled by a {@link Transactor} instance diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/EconomicEntity.java b/Patchwork/src/main/java/fns/patchwork/economy/EconomicEntity.java similarity index 94% rename from Patchwork/src/main/java/me/totalfreedom/economy/EconomicEntity.java rename to Patchwork/src/main/java/fns/patchwork/economy/EconomicEntity.java index f2b2c69..887e5a3 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/EconomicEntity.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/EconomicEntity.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * An entity that is able to transfer sums of currency between other {@link EconomicEntity} diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/EconomicEntityData.java b/Patchwork/src/main/java/fns/patchwork/economy/EconomicEntityData.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/economy/EconomicEntityData.java rename to Patchwork/src/main/java/fns/patchwork/economy/EconomicEntityData.java index ac3d372..80065f0 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/EconomicEntityData.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/EconomicEntityData.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * Metadata associated with a {@link EconomicEntity} diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/MutableTransaction.java b/Patchwork/src/main/java/fns/patchwork/economy/MutableTransaction.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/economy/MutableTransaction.java rename to Patchwork/src/main/java/fns/patchwork/economy/MutableTransaction.java index 89a14a4..8ea0540 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/MutableTransaction.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/MutableTransaction.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * A transaction that can be changed. diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java b/Patchwork/src/main/java/fns/patchwork/economy/Transaction.java similarity index 92% rename from Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java rename to Patchwork/src/main/java/fns/patchwork/economy/Transaction.java index 5968265..7780f07 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/Transaction.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * A class that denotes the transfer of currency between two EconomicEntity instances. diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/TransactionLogger.java b/Patchwork/src/main/java/fns/patchwork/economy/TransactionLogger.java similarity index 91% rename from Patchwork/src/main/java/me/totalfreedom/economy/TransactionLogger.java rename to Patchwork/src/main/java/fns/patchwork/economy/TransactionLogger.java index 1d57fdd..000ca77 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/TransactionLogger.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/TransactionLogger.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * A class that intercepts transactions after they are completed and logs them to a data point diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/TransactionResult.java b/Patchwork/src/main/java/fns/patchwork/economy/TransactionResult.java similarity index 87% rename from Patchwork/src/main/java/me/totalfreedom/economy/TransactionResult.java rename to Patchwork/src/main/java/fns/patchwork/economy/TransactionResult.java index 9859a99..74cb16b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/TransactionResult.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/TransactionResult.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; import net.kyori.adventure.text.Component; diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/Transactor.java b/Patchwork/src/main/java/fns/patchwork/economy/Transactor.java similarity index 90% rename from Patchwork/src/main/java/me/totalfreedom/economy/Transactor.java rename to Patchwork/src/main/java/fns/patchwork/economy/Transactor.java index 60e1b3c..5bbf78a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/Transactor.java +++ b/Patchwork/src/main/java/fns/patchwork/economy/Transactor.java @@ -1,4 +1,4 @@ -package me.totalfreedom.economy; +package fns.patchwork.economy; /** * A class that implements the completion of transactions. diff --git a/Patchwork/src/main/java/me/totalfreedom/event/Callback.java b/Patchwork/src/main/java/fns/patchwork/event/Callback.java similarity index 75% rename from Patchwork/src/main/java/me/totalfreedom/event/Callback.java rename to Patchwork/src/main/java/fns/patchwork/event/Callback.java index 585d144..bc8b280 100644 --- a/Patchwork/src/main/java/me/totalfreedom/event/Callback.java +++ b/Patchwork/src/main/java/fns/patchwork/event/Callback.java @@ -1,4 +1,4 @@ -package me.totalfreedom.event; +package fns.patchwork.event; @FunctionalInterface public interface Callback diff --git a/Patchwork/src/main/java/me/totalfreedom/event/EventBus.java b/Patchwork/src/main/java/fns/patchwork/event/EventBus.java similarity index 93% rename from Patchwork/src/main/java/me/totalfreedom/event/EventBus.java rename to Patchwork/src/main/java/fns/patchwork/event/EventBus.java index e012d6f..1a08182 100644 --- a/Patchwork/src/main/java/me/totalfreedom/event/EventBus.java +++ b/Patchwork/src/main/java/fns/patchwork/event/EventBus.java @@ -1,9 +1,8 @@ -package me.totalfreedom.event; - -import me.totalfreedom.api.Context; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.service.Service; +package fns.patchwork.event; +import fns.patchwork.api.Context; +import fns.patchwork.base.Patchwork; +import fns.patchwork.service.Service; import java.util.HashSet; import java.util.Set; diff --git a/Patchwork/src/main/java/me/totalfreedom/event/EventSubscription.java b/Patchwork/src/main/java/fns/patchwork/event/EventSubscription.java similarity index 88% rename from Patchwork/src/main/java/me/totalfreedom/event/EventSubscription.java rename to Patchwork/src/main/java/fns/patchwork/event/EventSubscription.java index ac7bad1..902c250 100644 --- a/Patchwork/src/main/java/me/totalfreedom/event/EventSubscription.java +++ b/Patchwork/src/main/java/fns/patchwork/event/EventSubscription.java @@ -1,4 +1,4 @@ -package me.totalfreedom.event; +package fns.patchwork.event; public record EventSubscription(T event, Callback callback) { diff --git a/Patchwork/src/main/java/me/totalfreedom/event/FEvent.java b/Patchwork/src/main/java/fns/patchwork/event/FEvent.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/event/FEvent.java rename to Patchwork/src/main/java/fns/patchwork/event/FEvent.java index 9aa68d7..5f74134 100644 --- a/Patchwork/src/main/java/me/totalfreedom/event/FEvent.java +++ b/Patchwork/src/main/java/fns/patchwork/event/FEvent.java @@ -1,4 +1,4 @@ -package me.totalfreedom.event; +package fns.patchwork.event; public abstract class FEvent { diff --git a/Patchwork/src/main/java/me/totalfreedom/event/SubscriptionBox.java b/Patchwork/src/main/java/fns/patchwork/event/SubscriptionBox.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/event/SubscriptionBox.java rename to Patchwork/src/main/java/fns/patchwork/event/SubscriptionBox.java index c93a230..d990273 100644 --- a/Patchwork/src/main/java/me/totalfreedom/event/SubscriptionBox.java +++ b/Patchwork/src/main/java/fns/patchwork/event/SubscriptionBox.java @@ -1,4 +1,4 @@ -package me.totalfreedom.event; +package fns.patchwork.event; import java.util.ArrayList; import java.util.List; diff --git a/Patchwork/src/main/java/me/totalfreedom/logging/BlockInteraction.java b/Patchwork/src/main/java/fns/patchwork/logging/BlockInteraction.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/logging/BlockInteraction.java rename to Patchwork/src/main/java/fns/patchwork/logging/BlockInteraction.java index ae64341..ef617ca 100644 --- a/Patchwork/src/main/java/me/totalfreedom/logging/BlockInteraction.java +++ b/Patchwork/src/main/java/fns/patchwork/logging/BlockInteraction.java @@ -1,13 +1,12 @@ -package me.totalfreedom.logging; +package fns.patchwork.logging; +import java.time.Instant; +import java.util.UUID; import org.bukkit.Location; import org.bukkit.block.data.BlockData; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -import java.time.Instant; -import java.util.UUID; - public final class BlockInteraction implements Interaction { private final Location location; diff --git a/Patchwork/src/main/java/me/totalfreedom/logging/ContainerInteraction.java b/Patchwork/src/main/java/fns/patchwork/logging/ContainerInteraction.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/logging/ContainerInteraction.java rename to Patchwork/src/main/java/fns/patchwork/logging/ContainerInteraction.java index c09efee..a134f1b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/logging/ContainerInteraction.java +++ b/Patchwork/src/main/java/fns/patchwork/logging/ContainerInteraction.java @@ -1,16 +1,15 @@ -package me.totalfreedom.logging; - -import org.bukkit.Location; -import org.bukkit.block.Container; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; +package fns.patchwork.logging; import java.time.Instant; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.UUID; +import org.bukkit.Location; +import org.bukkit.block.Container; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; public final class ContainerInteraction implements Interaction> { diff --git a/Patchwork/src/main/java/me/totalfreedom/logging/Interaction.java b/Patchwork/src/main/java/fns/patchwork/logging/Interaction.java similarity index 94% rename from Patchwork/src/main/java/me/totalfreedom/logging/Interaction.java rename to Patchwork/src/main/java/fns/patchwork/logging/Interaction.java index 75aeb63..bb0bed5 100644 --- a/Patchwork/src/main/java/me/totalfreedom/logging/Interaction.java +++ b/Patchwork/src/main/java/fns/patchwork/logging/Interaction.java @@ -1,11 +1,10 @@ -package me.totalfreedom.logging; +package fns.patchwork.logging; import com.google.errorprone.annotations.Immutable; -import org.bukkit.Location; -import org.jetbrains.annotations.NotNull; - import java.time.Instant; import java.util.UUID; +import org.bukkit.Location; +import org.jetbrains.annotations.NotNull; @Immutable public interface Interaction diff --git a/Patchwork/src/main/java/me/totalfreedom/logging/InteractionFormatter.java b/Patchwork/src/main/java/fns/patchwork/logging/InteractionFormatter.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/logging/InteractionFormatter.java rename to Patchwork/src/main/java/fns/patchwork/logging/InteractionFormatter.java index 19a5f01..ec660b3 100644 --- a/Patchwork/src/main/java/me/totalfreedom/logging/InteractionFormatter.java +++ b/Patchwork/src/main/java/fns/patchwork/logging/InteractionFormatter.java @@ -1,12 +1,11 @@ -package me.totalfreedom.logging; +package fns.patchwork.logging; +import java.time.Instant; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.inventory.ItemStack; -import java.time.Instant; - public final class InteractionFormatter { public String formatInteraction(final Interaction interaction) diff --git a/Patchwork/src/main/java/me/totalfreedom/particle/NoteColorUtil.java b/Patchwork/src/main/java/fns/patchwork/particle/NoteColorUtil.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/particle/NoteColorUtil.java rename to Patchwork/src/main/java/fns/patchwork/particle/NoteColorUtil.java index a415118..691eccb 100644 --- a/Patchwork/src/main/java/me/totalfreedom/particle/NoteColorUtil.java +++ b/Patchwork/src/main/java/fns/patchwork/particle/NoteColorUtil.java @@ -1,4 +1,4 @@ -package me.totalfreedom.particle; +package fns.patchwork.particle; import org.bukkit.Particle; import org.bukkit.World; diff --git a/Patchwork/src/main/java/me/totalfreedom/particle/Trail.java b/Patchwork/src/main/java/fns/patchwork/particle/Trail.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/particle/Trail.java rename to Patchwork/src/main/java/fns/patchwork/particle/Trail.java index f9f934a..9ffb2c5 100644 --- a/Patchwork/src/main/java/me/totalfreedom/particle/Trail.java +++ b/Patchwork/src/main/java/fns/patchwork/particle/Trail.java @@ -1,16 +1,15 @@ -package me.totalfreedom.particle; +package fns.patchwork.particle; -import me.totalfreedom.api.Interpolator; -import me.totalfreedom.utils.InterpolationUtils; +import fns.patchwork.api.Interpolator; +import fns.patchwork.utils.InterpolationUtils; +import java.util.Set; +import java.util.UUID; import org.bukkit.Color; import org.bukkit.OfflinePlayer; import org.bukkit.Particle; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Set; -import java.util.UUID; - /** * Represents a Trail instance for a specific player. */ diff --git a/Patchwork/src/main/java/me/totalfreedom/particle/TrailType.java b/Patchwork/src/main/java/fns/patchwork/particle/TrailType.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/particle/TrailType.java rename to Patchwork/src/main/java/fns/patchwork/particle/TrailType.java index e7afbe2..f87269c 100644 --- a/Patchwork/src/main/java/me/totalfreedom/particle/TrailType.java +++ b/Patchwork/src/main/java/fns/patchwork/particle/TrailType.java @@ -1,4 +1,4 @@ -package me.totalfreedom.particle; +package fns.patchwork.particle; import org.bukkit.Particle; diff --git a/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java b/Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java similarity index 65% rename from Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java rename to Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java index aaf5d2d..a33a7d9 100644 --- a/Patchwork/src/main/java/me/totalfreedom/provider/ContextProvider.java +++ b/Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java @@ -1,8 +1,11 @@ -package me.totalfreedom.provider; +package fns.patchwork.provider; -import me.totalfreedom.api.Context; -import me.totalfreedom.command.BukkitDelegate; -import me.totalfreedom.command.annotation.Subcommand; +import fns.patchwork.command.BukkitDelegate; +import fns.patchwork.command.annotation.Subcommand; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Stream; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -13,9 +16,6 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Objects; -import java.util.stream.Stream; - /** * This class is used to provide context to subcommand methods. This class is used by the BukkitDelegate to parse * arguments for subcommands. The following types are supported: @@ -34,6 +34,7 @@ import java.util.stream.Stream; * * All of these types can be parsed from a String input. If the String cannot be parsed into any of * these types, then null will be returned. + * * @see #fromString(String, Class) */ public class ContextProvider @@ -41,15 +42,15 @@ public class ContextProvider public T fromString(final String string, final Class clazz) { return Stream.of(toBoolean(string, clazz), - toDouble(string, clazz), - toInt(string, clazz), - toLong(string, clazz), - toFloat(string, clazz), - toMaterial(string, clazz), - toPlayer(string, clazz), - toWorld(string, clazz), - toLocation(string, clazz), - toComponent(string, clazz)) + toDouble(string, clazz), + toInt(string, clazz), + toLong(string, clazz), + toFloat(string, clazz), + toMaterial(string, clazz), + toPlayer(string, clazz), + toWorld(string, clazz), + toLocation(string, clazz), + toComponent(string, clazz)) .filter(Objects::nonNull) .findFirst() .map(clazz::cast) @@ -58,24 +59,29 @@ public class ContextProvider private @Nullable Boolean toBoolean(final String string, final Class clazz) { - if (clazz != Boolean.class) return null; + if (clazz != Boolean.class) + return null; // Previously we used Boolean#parseBoolean, but that will always return a value and does not throw // an exception. This means that if the string is not "true" or "false", it will return false. - if (string.equalsIgnoreCase("true")) return true; - if (string.equalsIgnoreCase("false")) return false; + if (string.equalsIgnoreCase("true")) + return true; + if (string.equalsIgnoreCase("false")) + return false; return null; } private @Nullable Double toDouble(final String string, final Class clazz) { - if (clazz != Double.class) return null; + if (clazz != Double.class) + return null; try { return Double.parseDouble(string); - } catch (NumberFormatException ignored) + } + catch (NumberFormatException ignored) { return null; } @@ -83,12 +89,14 @@ public class ContextProvider private @Nullable Integer toInt(final String string, final Class clazz) { - if (clazz != Integer.class) return null; + if (clazz != Integer.class) + return null; try { return Integer.parseInt(string); - } catch (NumberFormatException ignored) + } + catch (NumberFormatException ignored) { return null; } @@ -96,12 +104,14 @@ public class ContextProvider private @Nullable Long toLong(final String string, final Class clazz) { - if (clazz != Long.class) return null; + if (clazz != Long.class) + return null; try { return Long.parseLong(string); - } catch (NumberFormatException ignored) + } + catch (NumberFormatException ignored) { return null; } @@ -109,12 +119,14 @@ public class ContextProvider private @Nullable Float toFloat(final String string, final Class clazz) { - if (clazz != Float.class) return null; + if (clazz != Float.class) + return null; try { return Float.parseFloat(string); - } catch (NumberFormatException ignored) + } + catch (NumberFormatException ignored) { return null; } @@ -122,19 +134,22 @@ public class ContextProvider private @Nullable Material toMaterial(final String string, final Class clazz) { - if (clazz != Material.class) return null; + if (clazz != Material.class) + return null; return Material.matchMaterial(string); } private @Nullable Player toPlayer(final String string, final Class clazz) { - if (clazz != Player.class) return null; + if (clazz != Player.class) + return null; return Bukkit.getPlayer(string); } private @Nullable World toWorld(final String string, final Class clazz) { - if (clazz != World.class) return null; + if (clazz != World.class) + return null; return Bukkit.getWorld(string); } @@ -145,30 +160,46 @@ public class ContextProvider * * @param string The string to parse * @return A location object if xyz is valid - * @see BukkitDelegate#processSubCommands(String[], CommandSender, ContextProvider, Subcommand) + * @see BukkitDelegate#processSubCommands(String[], CommandSender, ContextProvider, Subcommand) */ private @Nullable Location toLocation(final String string, final Class clazz) { - if (clazz != Location.class) return null; + if (clazz != Location.class) + return null; final String[] split = string.split(" "); - if (split.length != 4 || toWorld(split[0], World.class) == null) return null; + if (split.length != 4 || toWorld(split[0], World.class) == null) + return null; - try { + try + { final double x = Double.parseDouble(split[1]); final double y = Double.parseDouble(split[2]); final double z = Double.parseDouble(split[3]); return new Location(toWorld(split[0], World.class), x, y, z); - } catch (NumberFormatException ex) { + } + catch (NumberFormatException ex) + { return null; } } private @Nullable Component toComponent(final String string, final Class clazz) { - if (clazz != Component.class) return null; + if (clazz != Component.class) + return null; return Component.text(string); } + + public @NotNull List<@Nullable T> getList(final List resolvable, final Class clazz) + { + final List resolved = new ArrayList<>(); + for (final String entry : resolvable) + { + resolved.add(this.fromString(entry, clazz)); + } + return resolved; + } } diff --git a/Patchwork/src/main/java/me/totalfreedom/provider/EventProvider.java b/Patchwork/src/main/java/fns/patchwork/provider/EventProvider.java similarity index 56% rename from Patchwork/src/main/java/me/totalfreedom/provider/EventProvider.java rename to Patchwork/src/main/java/fns/patchwork/provider/EventProvider.java index 242fc10..a48e0f7 100644 --- a/Patchwork/src/main/java/me/totalfreedom/provider/EventProvider.java +++ b/Patchwork/src/main/java/fns/patchwork/provider/EventProvider.java @@ -1,6 +1,6 @@ -package me.totalfreedom.provider; +package fns.patchwork.provider; -import me.totalfreedom.event.FEvent; +import fns.patchwork.event.FEvent; @FunctionalInterface public interface EventProvider diff --git a/Patchwork/src/main/java/me/totalfreedom/provider/ModuleProvider.java b/Patchwork/src/main/java/fns/patchwork/provider/ModuleProvider.java similarity index 80% rename from Patchwork/src/main/java/me/totalfreedom/provider/ModuleProvider.java rename to Patchwork/src/main/java/fns/patchwork/provider/ModuleProvider.java index 65c9bd1..2b46744 100644 --- a/Patchwork/src/main/java/me/totalfreedom/provider/ModuleProvider.java +++ b/Patchwork/src/main/java/fns/patchwork/provider/ModuleProvider.java @@ -1,4 +1,4 @@ -package me.totalfreedom.provider; +package fns.patchwork.provider; import org.bukkit.plugin.java.JavaPlugin; diff --git a/Patchwork/src/main/java/me/totalfreedom/provider/ServiceProvider.java b/Patchwork/src/main/java/fns/patchwork/provider/ServiceProvider.java similarity index 51% rename from Patchwork/src/main/java/me/totalfreedom/provider/ServiceProvider.java rename to Patchwork/src/main/java/fns/patchwork/provider/ServiceProvider.java index e9a3387..f58c4c9 100644 --- a/Patchwork/src/main/java/me/totalfreedom/provider/ServiceProvider.java +++ b/Patchwork/src/main/java/fns/patchwork/provider/ServiceProvider.java @@ -1,6 +1,6 @@ -package me.totalfreedom.provider; +package fns.patchwork.provider; -import me.totalfreedom.service.Service; +import fns.patchwork.service.Service; public interface ServiceProvider { diff --git a/Patchwork/src/main/java/me/totalfreedom/security/Group.java b/Patchwork/src/main/java/fns/patchwork/security/Group.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/security/Group.java rename to Patchwork/src/main/java/fns/patchwork/security/Group.java index 41b2825..284eb2e 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/Group.java +++ b/Patchwork/src/main/java/fns/patchwork/security/Group.java @@ -1,4 +1,4 @@ -package me.totalfreedom.security; +package fns.patchwork.security; import net.kyori.adventure.text.Component; diff --git a/Patchwork/src/main/java/me/totalfreedom/security/Groups.java b/Patchwork/src/main/java/fns/patchwork/security/Groups.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/security/Groups.java rename to Patchwork/src/main/java/fns/patchwork/security/Groups.java index 105a54a..e4ee003 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/Groups.java +++ b/Patchwork/src/main/java/fns/patchwork/security/Groups.java @@ -1,4 +1,4 @@ -package me.totalfreedom.security; +package fns.patchwork.security; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Patchwork/src/main/java/me/totalfreedom/security/Node.java b/Patchwork/src/main/java/fns/patchwork/security/Node.java similarity index 90% rename from Patchwork/src/main/java/me/totalfreedom/security/Node.java rename to Patchwork/src/main/java/fns/patchwork/security/Node.java index 38fe451..cc1b5b2 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/Node.java +++ b/Patchwork/src/main/java/fns/patchwork/security/Node.java @@ -1,8 +1,7 @@ -package me.totalfreedom.security; - -import org.bukkit.permissions.Permission; +package fns.patchwork.security; import javax.annotation.concurrent.Immutable; +import org.bukkit.permissions.Permission; @Immutable public interface Node diff --git a/Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java b/Patchwork/src/main/java/fns/patchwork/security/NodeBuilder.java similarity index 85% rename from Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java rename to Patchwork/src/main/java/fns/patchwork/security/NodeBuilder.java index 05c3ee9..34ded3d 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/NodeBuilder.java +++ b/Patchwork/src/main/java/fns/patchwork/security/NodeBuilder.java @@ -1,4 +1,4 @@ -package me.totalfreedom.security; +package fns.patchwork.security; public interface NodeBuilder { diff --git a/Patchwork/src/main/java/me/totalfreedom/security/NodeType.java b/Patchwork/src/main/java/fns/patchwork/security/NodeType.java similarity index 73% rename from Patchwork/src/main/java/me/totalfreedom/security/NodeType.java rename to Patchwork/src/main/java/fns/patchwork/security/NodeType.java index 11293a9..e9d5f41 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/NodeType.java +++ b/Patchwork/src/main/java/fns/patchwork/security/NodeType.java @@ -1,4 +1,4 @@ -package me.totalfreedom.security; +package fns.patchwork.security; public enum NodeType { diff --git a/Patchwork/src/main/java/me/totalfreedom/security/PermissionHolder.java b/Patchwork/src/main/java/fns/patchwork/security/PermissionHolder.java similarity index 88% rename from Patchwork/src/main/java/me/totalfreedom/security/PermissionHolder.java rename to Patchwork/src/main/java/fns/patchwork/security/PermissionHolder.java index 05f7e7c..9e6a96b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/security/PermissionHolder.java +++ b/Patchwork/src/main/java/fns/patchwork/security/PermissionHolder.java @@ -1,9 +1,8 @@ -package me.totalfreedom.security; - -import org.bukkit.permissions.Permissible; +package fns.patchwork.security; import java.util.Set; import java.util.UUID; +import org.bukkit.permissions.Permissible; public interface PermissionHolder extends Permissible { diff --git a/Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java b/Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java rename to Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java index 2b52f4e..a67d031 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/FreedomExecutor.java +++ b/Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java @@ -1,11 +1,10 @@ -package me.totalfreedom.service; - -import me.totalfreedom.base.Patchwork; -import org.bukkit.Bukkit; -import org.bukkit.plugin.java.JavaPlugin; +package fns.patchwork.service; +import fns.patchwork.base.Patchwork; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; +import org.bukkit.Bukkit; +import org.bukkit.plugin.java.JavaPlugin; /** * This is a holder class for {@link Executor} objects that are used to delegate runnable tasks to the Bukkit Scheduler. diff --git a/Patchwork/src/main/java/me/totalfreedom/service/Service.java b/Patchwork/src/main/java/fns/patchwork/service/Service.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/service/Service.java rename to Patchwork/src/main/java/fns/patchwork/service/Service.java index 927fb36..5da461a 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/Service.java +++ b/Patchwork/src/main/java/fns/patchwork/service/Service.java @@ -1,4 +1,4 @@ -package me.totalfreedom.service; +package fns.patchwork.service; /** * Represents a ticking service. Services may be asynchronous or synchronous, however there are some restrictions: diff --git a/Patchwork/src/main/java/me/totalfreedom/service/ServiceSubscription.java b/Patchwork/src/main/java/fns/patchwork/service/ServiceSubscription.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/service/ServiceSubscription.java rename to Patchwork/src/main/java/fns/patchwork/service/ServiceSubscription.java index dd8b543..af5faaf 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/ServiceSubscription.java +++ b/Patchwork/src/main/java/fns/patchwork/service/ServiceSubscription.java @@ -1,12 +1,11 @@ -package me.totalfreedom.service; +package fns.patchwork.service; +import java.util.concurrent.Executor; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitTask; import org.jetbrains.annotations.NotNull; -import java.util.concurrent.Executor; - /** * Represents a subscription to a {@link Service}. *

diff --git a/Patchwork/src/main/java/me/totalfreedom/service/SubscriptionProvider.java b/Patchwork/src/main/java/fns/patchwork/service/SubscriptionProvider.java similarity index 99% rename from Patchwork/src/main/java/me/totalfreedom/service/SubscriptionProvider.java rename to Patchwork/src/main/java/fns/patchwork/service/SubscriptionProvider.java index 3a3c8ab..989a3cd 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/SubscriptionProvider.java +++ b/Patchwork/src/main/java/fns/patchwork/service/SubscriptionProvider.java @@ -1,4 +1,4 @@ -package me.totalfreedom.service; +package fns.patchwork.service; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.Contract; diff --git a/Patchwork/src/main/java/me/totalfreedom/service/Task.java b/Patchwork/src/main/java/fns/patchwork/service/Task.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/service/Task.java rename to Patchwork/src/main/java/fns/patchwork/service/Task.java index 3275705..a03773c 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/Task.java +++ b/Patchwork/src/main/java/fns/patchwork/service/Task.java @@ -1,9 +1,8 @@ -package me.totalfreedom.service; - -import me.totalfreedom.utils.DurationTools; -import org.bukkit.scheduler.BukkitRunnable; +package fns.patchwork.service; +import fns.patchwork.utils.DurationTools; import java.time.Duration; +import org.bukkit.scheduler.BukkitRunnable; /** * Represents a task that can be run asynchronously or synchronously. diff --git a/Patchwork/src/main/java/me/totalfreedom/service/TaskSubscription.java b/Patchwork/src/main/java/fns/patchwork/service/TaskSubscription.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/service/TaskSubscription.java rename to Patchwork/src/main/java/fns/patchwork/service/TaskSubscription.java index 9e5c3e1..f79c17b 100644 --- a/Patchwork/src/main/java/me/totalfreedom/service/TaskSubscription.java +++ b/Patchwork/src/main/java/fns/patchwork/service/TaskSubscription.java @@ -1,13 +1,12 @@ -package me.totalfreedom.service; +package fns.patchwork.service; -import me.totalfreedom.utils.container.Pair; +import fns.patchwork.utils.container.Pair; +import java.util.concurrent.Executor; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitScheduler; import org.bukkit.scheduler.BukkitTask; -import java.util.concurrent.Executor; - /** * Represents a subscription to a task. Task subscriptions offer a nice wrapper for managing tasks, which are inevitably * just bukkit runnables with a bit more lenience in terms of instantiation modification and execution. It also offers a diff --git a/Patchwork/src/main/java/me/totalfreedom/shop/Reactable.java b/Patchwork/src/main/java/fns/patchwork/shop/Reactable.java similarity index 82% rename from Patchwork/src/main/java/me/totalfreedom/shop/Reactable.java rename to Patchwork/src/main/java/fns/patchwork/shop/Reactable.java index 86ddec4..36b0d55 100644 --- a/Patchwork/src/main/java/me/totalfreedom/shop/Reactable.java +++ b/Patchwork/src/main/java/fns/patchwork/shop/Reactable.java @@ -1,11 +1,10 @@ -package me.totalfreedom.shop; +package fns.patchwork.shop; -import me.totalfreedom.economy.EconomicEntity; +import fns.patchwork.economy.EconomicEntity; +import java.time.Duration; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.text.Component; -import java.time.Duration; - public interface Reactable { Component getReactionMessage(); diff --git a/Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java b/Patchwork/src/main/java/fns/patchwork/shop/Reaction.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java rename to Patchwork/src/main/java/fns/patchwork/shop/Reaction.java index ad1c761..28f4a27 100644 --- a/Patchwork/src/main/java/me/totalfreedom/shop/Reaction.java +++ b/Patchwork/src/main/java/fns/patchwork/shop/Reaction.java @@ -1,4 +1,4 @@ -package me.totalfreedom.shop; +package fns.patchwork.shop; import java.time.Duration; import net.kyori.adventure.text.Component; diff --git a/Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java b/Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java similarity index 87% rename from Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java rename to Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java index f27f5c6..3af5916 100644 --- a/Patchwork/src/main/java/me/totalfreedom/shop/ReactionTask.java +++ b/Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java @@ -1,11 +1,11 @@ -package me.totalfreedom.shop; +package fns.patchwork.shop; +import fns.patchwork.base.Patchwork; +import fns.patchwork.display.BossBarDisplay; +import fns.patchwork.display.BossBarTimer; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.service.Task; import io.papermc.paper.event.player.AsyncChatEvent; -import me.totalfreedom.base.Patchwork; -import me.totalfreedom.display.BossBarDisplay; -import me.totalfreedom.display.BossBarTimer; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.service.Task; import net.kyori.adventure.bossbar.BossBar; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/Patchwork/src/main/java/me/totalfreedom/shop/ReactionType.java b/Patchwork/src/main/java/fns/patchwork/shop/ReactionType.java similarity index 67% rename from Patchwork/src/main/java/me/totalfreedom/shop/ReactionType.java rename to Patchwork/src/main/java/fns/patchwork/shop/ReactionType.java index e36a3da..905b1c9 100644 --- a/Patchwork/src/main/java/me/totalfreedom/shop/ReactionType.java +++ b/Patchwork/src/main/java/fns/patchwork/shop/ReactionType.java @@ -1,4 +1,4 @@ -package me.totalfreedom.shop; +package fns.patchwork.shop; public enum ReactionType { diff --git a/Patchwork/src/main/java/me/totalfreedom/sql/SQL.java b/Patchwork/src/main/java/fns/patchwork/sql/SQL.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/sql/SQL.java rename to Patchwork/src/main/java/fns/patchwork/sql/SQL.java index 4e9adc1..fb51021 100644 --- a/Patchwork/src/main/java/me/totalfreedom/sql/SQL.java +++ b/Patchwork/src/main/java/fns/patchwork/sql/SQL.java @@ -1,4 +1,4 @@ -package me.totalfreedom.sql; +package fns.patchwork.sql; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Patchwork/src/main/java/me/totalfreedom/sql/SQLProperties.java b/Patchwork/src/main/java/fns/patchwork/sql/SQLProperties.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/sql/SQLProperties.java rename to Patchwork/src/main/java/fns/patchwork/sql/SQLProperties.java index 5a0566b..c1bc098 100644 --- a/Patchwork/src/main/java/me/totalfreedom/sql/SQLProperties.java +++ b/Patchwork/src/main/java/fns/patchwork/sql/SQLProperties.java @@ -1,4 +1,4 @@ -package me.totalfreedom.sql; +package fns.patchwork.sql; import java.io.File; import java.util.Properties; diff --git a/Patchwork/src/main/java/me/totalfreedom/user/User.java b/Patchwork/src/main/java/fns/patchwork/user/User.java similarity index 72% rename from Patchwork/src/main/java/me/totalfreedom/user/User.java rename to Patchwork/src/main/java/fns/patchwork/user/User.java index f925492..bf25338 100644 --- a/Patchwork/src/main/java/me/totalfreedom/user/User.java +++ b/Patchwork/src/main/java/fns/patchwork/user/User.java @@ -1,8 +1,8 @@ -package me.totalfreedom.user; +package fns.patchwork.user; -import me.totalfreedom.economy.EconomicEntity; -import me.totalfreedom.economy.EconomicEntityData; -import me.totalfreedom.security.PermissionHolder; +import fns.patchwork.economy.EconomicEntity; +import fns.patchwork.economy.EconomicEntityData; +import fns.patchwork.security.PermissionHolder; import net.kyori.adventure.text.Component; public interface User extends PermissionHolder, EconomicEntity diff --git a/Patchwork/src/main/java/me/totalfreedom/user/UserData.java b/Patchwork/src/main/java/fns/patchwork/user/UserData.java similarity index 78% rename from Patchwork/src/main/java/me/totalfreedom/user/UserData.java rename to Patchwork/src/main/java/fns/patchwork/user/UserData.java index a2c4b4a..51afa7e 100644 --- a/Patchwork/src/main/java/me/totalfreedom/user/UserData.java +++ b/Patchwork/src/main/java/fns/patchwork/user/UserData.java @@ -1,13 +1,12 @@ -package me.totalfreedom.user; +package fns.patchwork.user; -import me.totalfreedom.display.adminchat.AdminChatFormat; -import me.totalfreedom.economy.EconomicEntityData; -import me.totalfreedom.security.Group; +import fns.patchwork.display.adminchat.AdminChatFormat; +import fns.patchwork.economy.EconomicEntityData; +import fns.patchwork.security.Group; +import java.util.UUID; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.UUID; - public interface UserData extends EconomicEntityData { @NotNull UUID getUniqueId(); diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/DurationTools.java b/Patchwork/src/main/java/fns/patchwork/utils/DurationTools.java similarity index 95% rename from Patchwork/src/main/java/me/totalfreedom/utils/DurationTools.java rename to Patchwork/src/main/java/fns/patchwork/utils/DurationTools.java index b629f09..84d1531 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/DurationTools.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/DurationTools.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils; +package fns.patchwork.utils; import java.time.Duration; diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/InterpolationUtils.java b/Patchwork/src/main/java/fns/patchwork/utils/InterpolationUtils.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/utils/InterpolationUtils.java rename to Patchwork/src/main/java/fns/patchwork/utils/InterpolationUtils.java index 7be41c0..f8ca964 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/InterpolationUtils.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/InterpolationUtils.java @@ -1,13 +1,12 @@ -package me.totalfreedom.utils; +package fns.patchwork.utils; -import me.totalfreedom.api.Interpolator; +import fns.patchwork.api.Interpolator; +import java.util.LinkedHashSet; +import java.util.Set; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextColor; import org.bukkit.Color; -import java.util.LinkedHashSet; -import java.util.Set; - public final class InterpolationUtils { private InterpolationUtils() diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/ShapeUtils.java b/Patchwork/src/main/java/fns/patchwork/utils/ShapeUtils.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/utils/ShapeUtils.java rename to Patchwork/src/main/java/fns/patchwork/utils/ShapeUtils.java index e4b533c..08f1f33 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/ShapeUtils.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/ShapeUtils.java @@ -1,11 +1,10 @@ -package me.totalfreedom.utils; - -import org.bukkit.Location; -import org.bukkit.World; +package fns.patchwork.utils; import java.util.LinkedList; import java.util.List; import java.util.function.DoubleUnaryOperator; +import org.bukkit.Location; +import org.bukkit.World; public class ShapeUtils { diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java b/Patchwork/src/main/java/fns/patchwork/utils/Tagged.java similarity index 96% rename from Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java rename to Patchwork/src/main/java/fns/patchwork/utils/Tagged.java index 568233e..b2f0e08 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/Tagged.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/Tagged.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils; +package fns.patchwork.utils; import java.util.ArrayList; import java.util.List; @@ -80,16 +80,17 @@ public final class Tagged EntityType.BLOCK_DISPLAY, EntityType.ITEM_DISPLAY); - private final List tagged; + private final List taggable; - private Tagged(final T... tagged) + private Tagged(final T... taggable) { - this.tagged = new ArrayList<>(); + this.taggable = new ArrayList<>(); + this.taggable.addAll(List.of(taggable)); } public boolean isTagged(final @NotNull T object) { - for (final T t : this.tagged) + for (final T t : this.taggable) { if (object.equals(t)) return true; diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/Identity.java b/Patchwork/src/main/java/fns/patchwork/utils/container/Identity.java similarity index 89% rename from Patchwork/src/main/java/me/totalfreedom/utils/container/Identity.java rename to Patchwork/src/main/java/fns/patchwork/utils/container/Identity.java index 0770962..5a4415f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/Identity.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/container/Identity.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils.container; +package fns.patchwork.utils.container; import java.util.UUID; diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/Pair.java b/Patchwork/src/main/java/fns/patchwork/utils/container/Pair.java similarity index 52% rename from Patchwork/src/main/java/me/totalfreedom/utils/container/Pair.java rename to Patchwork/src/main/java/fns/patchwork/utils/container/Pair.java index 0cf4e76..1c6d3c7 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/Pair.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/container/Pair.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils.container; +package fns.patchwork.utils.container; public record Pair(K key, V value) { diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java b/Patchwork/src/main/java/fns/patchwork/utils/container/Trio.java similarity index 62% rename from Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java rename to Patchwork/src/main/java/fns/patchwork/utils/container/Trio.java index e3d61c2..77c95e2 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/Trio.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/container/Trio.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils.container; +package fns.patchwork.utils.container; public record Trio(A primary, B secondary, C tertiary) { diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java b/Patchwork/src/main/java/fns/patchwork/utils/container/UnaryPair.java similarity index 55% rename from Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java rename to Patchwork/src/main/java/fns/patchwork/utils/container/UnaryPair.java index 908cccf..6015249 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryPair.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/container/UnaryPair.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils.container; +package fns.patchwork.utils.container; public record UnaryPair(T first, T second) { diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java b/Patchwork/src/main/java/fns/patchwork/utils/container/UnaryTrio.java similarity index 62% rename from Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java rename to Patchwork/src/main/java/fns/patchwork/utils/container/UnaryTrio.java index ac455cd..de936f6 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/container/UnaryTrio.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/container/UnaryTrio.java @@ -1,4 +1,4 @@ -package me.totalfreedom.utils.container; +package fns.patchwork.utils.container; public record UnaryTrio(T primary, T secondary, T tertiary) { diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/FreedomAdventure.java b/Patchwork/src/main/java/fns/patchwork/utils/kyori/FreedomAdventure.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/utils/kyori/FreedomAdventure.java rename to Patchwork/src/main/java/fns/patchwork/utils/kyori/FreedomAdventure.java index 3dc548a..5599756 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/FreedomAdventure.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/kyori/FreedomAdventure.java @@ -1,9 +1,8 @@ -package me.totalfreedom.utils.kyori; - -import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; +package fns.patchwork.utils.kyori; import java.util.function.Supplier; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; /** * This class contains the only reference to plain text component serializer, and allows access to it via wrapper diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/FreedomMiniMessage.java b/Patchwork/src/main/java/fns/patchwork/utils/kyori/FreedomMiniMessage.java similarity index 90% rename from Patchwork/src/main/java/me/totalfreedom/utils/kyori/FreedomMiniMessage.java rename to Patchwork/src/main/java/fns/patchwork/utils/kyori/FreedomMiniMessage.java index 3db5cdc..1a3b28f 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/FreedomMiniMessage.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/kyori/FreedomMiniMessage.java @@ -19,7 +19,7 @@ * THE SOFTWARE. */ -package me.totalfreedom.utils.kyori; +package fns.patchwork.utils.kyori; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.TextDecoration; @@ -60,11 +60,11 @@ public class FreedomMiniMessage * @param placeholders Custom placeholders to use when processing the input * @return A processed Component */ - public static Component deserialize(boolean safe, String input, TagResolver... placeholders) + public static Component deserialize(final boolean safe, final String input, final TagResolver... placeholders) { return (safe - ? FreedomMiniMessage.safe - : unsafe).deserialize(input, placeholders); + ? FreedomMiniMessage.safe + : unsafe).deserialize(input, placeholders); } /** @@ -75,10 +75,10 @@ public class FreedomMiniMessage * @param input An already processed component * @return A processed Component */ - public static String serialize(boolean safe, Component input) + public static String serialize(final boolean safe, final Component input) { return (safe - ? FreedomMiniMessage.safe - : unsafe).serialize(input); + ? FreedomMiniMessage.safe + : unsafe).serialize(input); } } diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java b/Patchwork/src/main/java/fns/patchwork/utils/kyori/KyoriConstants.java similarity index 97% rename from Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java rename to Patchwork/src/main/java/fns/patchwork/utils/kyori/KyoriConstants.java index aa33c59..4820f35 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/kyori/KyoriConstants.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/kyori/KyoriConstants.java @@ -1,6 +1,6 @@ -package me.totalfreedom.utils.kyori; +package fns.patchwork.utils.kyori; -import me.totalfreedom.base.Patchwork; +import fns.patchwork.base.Patchwork; import net.kyori.adventure.chat.ChatType; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; diff --git a/Patchwork/src/main/java/me/totalfreedom/utils/logging/FreedomLogger.java b/Patchwork/src/main/java/fns/patchwork/utils/logging/FreedomLogger.java similarity index 98% rename from Patchwork/src/main/java/me/totalfreedom/utils/logging/FreedomLogger.java rename to Patchwork/src/main/java/fns/patchwork/utils/logging/FreedomLogger.java index 97cec23..8630f28 100644 --- a/Patchwork/src/main/java/me/totalfreedom/utils/logging/FreedomLogger.java +++ b/Patchwork/src/main/java/fns/patchwork/utils/logging/FreedomLogger.java @@ -1,6 +1,7 @@ -package me.totalfreedom.utils.logging; +package fns.patchwork.utils.logging; -import me.totalfreedom.utils.kyori.FreedomAdventure; +import fns.patchwork.utils.kyori.FreedomAdventure; +import java.util.function.Supplier; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.chat.ChatType; import net.kyori.adventure.chat.SignedMessage; @@ -10,8 +11,6 @@ import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.function.Supplier; - public class FreedomLogger implements Audience { private final Logger logger; From 169e387a5ac0159cb9e8d81f898dfddd05b27d4e Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:58:40 +0200 Subject: [PATCH 14/18] Bump Gradle to latest, updated Dev list (#18) * Bump Gradle to latest, updated Dev list * Thanks git --- README.md | 2 ++ gradle/wrapper/gradle-wrapper.jar | Bin 60756 -> 63375 bytes gradle/wrapper/gradle-wrapper.properties | 5 ++-- gradlew | 30 +++++++++++++++++------ gradlew.bat | 15 +++++++----- 5 files changed, 36 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1fd5129..3e0c956 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,8 @@ This proof-of-concept also uses the following libraries: [](https://github.com/VideoGameSmash12)
[](https://github.com/allinkdev) +
+[](https://github.com/FlorianMichael) # To Do List diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832f090a2944b7473328c07c9755baa3196..033e24c4cdf41af1ab109bc7f253b2b887023340 100644 GIT binary patch delta 41134 zcmY(qV{|6avMn0hwr$(CZQJ%2r(@f;ZQD*dR>w9vd42YM@1D2+tXgBN`Z=p+tyxto zzd_?~LBW+|LBY@x3(ymBP=V1B8Jzze1*HFTpeJsk|HmeS0pnw$0Rcfl0RaIC1BIWh zds4yx0U2Nd0nsEcOkgD6Wk4iHY#{@3wIKa)SMk3M=su4hM@8pUFl2H@npokWgGQjC z~D(f!&sbISWNOI)HyK0oz*_`XY9{=B2#& zdN$QKZ#V$@kI#31{=WLnBMN%o`U7!9Kf@SQ9J*|mh>S)bKbUm(hz-iBt4RTzzzxdw zPhcEgj?e>oR6q<$4_Ccn3ESW9b-?RYl_`-g?|i)9Akf-|iIzcS{cydUV4Ee9?L|2S3$n20zu=_Ca9;DvFewxpFuTy_ZqT&yFqCTDaqag2`(eno=(fKO&RcUnY zt;vM0bDu<{`jsA59wO z1^d&UJ(*HVc`fS0XAc!BGr`OAx#dHWi_b0atesMg@Z$DzS}+Y;KrV*PYdV?HD_cOf z?Ity_?tq}IBTtsb_EL^I4qt63NWfW=^rwJ8utb-+a~{P1MT(BRfx$#)n0`1-0F6^; zjLzR}r9r1F=i1n_T`?X&Zk@t7Xc#1ZKw3({yX0=0@pZu;2fjjgO6w+D@O$)ECcUqz zb4dAWaoVIPuSE%&m{6nK^35;gb`!OB6$n9%(@Sow_|}%}$k05zq%i^~r-=%e1-U#5 zQt5`)3?d&6bKFQ!Ze?${-{lh%qRf)lSVyP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qo1Nl7N8@ zhLm>BKi%VAM?<`tNO#QEk)WwB2-LQd0N#G?|BK`A_fh`_-_k=ONf8eGABpUFpDg(2 eeI(M@AcFmbJ`Fe^yQ`5R1)7zDf@^5^um1rxyy^h} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 39d04d3..9f4197d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Thu Apr 13 15:32:14 CDT 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..fcb6fca 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +130,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +213,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd3..93e3f59 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal From 9bb7ebb7708ee98a4ec6ab5eddc1f08cdd7f40e6 Mon Sep 17 00:00:00 2001 From: Paldiu Date: Sun, 6 Aug 2023 17:07:49 -0500 Subject: [PATCH 15/18] Changed phrasing to match latest changes. --- Patchwork/src/main/java/fns/patchwork/command/Commander.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Patchwork/src/main/java/fns/patchwork/command/Commander.java b/Patchwork/src/main/java/fns/patchwork/command/Commander.java index 07b893c..920a853 100644 --- a/Patchwork/src/main/java/fns/patchwork/command/Commander.java +++ b/Patchwork/src/main/java/fns/patchwork/command/Commander.java @@ -27,9 +27,7 @@ import org.jetbrains.annotations.Nullable; * You are allowed to have as many methods as you want which are annotated with the {@link Subcommand} annotation. These * methods will be called when the command is executed with the specified subcommand. *
- * You are also allowed to use multiple {@link Completion} annotations per method to define multiple tab completions for - * a single subcommand. This would be useful in the case where you would like to include specific completion cases, but - * also support basic String completion cases. + * You are also allowed to use multiple {@link Completion} annotations per class to define the tab completions for each method. *
* When creating {@link Completion} annotations, you only need to register arguments a single time per class. For more * information, see {@link Subcommand}. From 60b63b58578367292a1fc0f957078cbe81d4796a Mon Sep 17 00:00:00 2001 From: Paldiu Date: Sun, 6 Aug 2023 17:41:41 -0500 Subject: [PATCH 16/18] Fix readme incorrectly stating "proof of concept" --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3e0c956..f1f8f61 100644 --- a/README.md +++ b/README.md @@ -44,16 +44,17 @@ # ![Header Image](https://simplexdev.app/images/fns-content/fnslogo.png) -This is a proof of concept for a new suite of modules supported by a common library. +This project is a collection of plugins supported by a common library designed for creative-based freedom servers (servers which grant generous amounts of permission nodes to all players.) This is designed to encompass the ideologies of a Freedom server, while maintaining full customization through modules. -This is a ground up rewrite of [TotalFreedomMod]. +Most modules are designed to be either optional or interchangable, except Patchwork (API) and Datura (Data Manager). These two are required to run any of the other modules. +This is NOT a ground up rewrite of [TotalFreedomMod]. This is a completely new project designed to be entirely ambiguous.

Honorable mention:
[](https://github.com/plexusorg/Plex) -This proof-of-concept also uses the following libraries: +This plugin suite also uses the following libraries: - [Google GSON] for Json interpretation - [Jetbrains Annotations] for additional compiler annotations @@ -92,8 +93,8 @@ Patchwork (API): Datura (Data Manager): -- [ ] Permission Handling *(In Progress...)* -- [ ] Permission Registration & Assignment *(In Progress...)* +- [x] Permission Handling +- [x] Permission Registration & Assignment - [ ] SQL Data Handling *(In Progress...)* - [ ] Configuration Implementations - [ ] User Data Implementations *(In Progress...)* From 368f3cae1239cd034e6f3d23a5c2ceff9bd0fec4 Mon Sep 17 00:00:00 2001 From: Paldiu Date: Sun, 6 Aug 2023 17:44:39 -0500 Subject: [PATCH 17/18] Modify banner formatting --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1f8f61..5bcfe6e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,13 @@ ![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/AtlasMediaGroup/Freedom-Network-Suite?style=for-the-badge) ![TFM Used](https://img.shields.io/static/v1?label=TFM%20Code%20Used&message=0%25&color=red&style=for-the-badge&logo=tensorflow) -# ![Header Image](https://simplexdev.app/images/fns-content/fnslogo.png) +# + +

+ FNS Banner +

+ +# This project is a collection of plugins supported by a common library designed for creative-based freedom servers (servers which grant generous amounts of permission nodes to all players.) This is designed to encompass the ideologies of a Freedom server, while maintaining full customization through modules. From 3e8c63221d7aca3a2f3f33c8fa3bc86c7e09c417 Mon Sep 17 00:00:00 2001 From: Eva <66324759+evallll@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:15:36 +0100 Subject: [PATCH 18/18] Overhaul of Patchwork and Registration system, fix-up for all plugin.yml files and removal of .negates(0 and .value() from DefaultNodes in turn for the .expiry() system removing the redundancies. (#21) Co-authored-by: eva <66324759+evax64@users.noreply.github.com> --- Corvo/src/main/java/fns/corvo/Corvo.java | 9 ++-- Corvo/src/main/resources/plugin.yml | 3 +- Datura/src/main/java/fns/datura/Datura.java | 24 ++++------ .../java/fns/datura/cmd/AdminChatCommand.java | 7 +-- .../fns/datura/cmd/ClearDropsCommand.java | 4 +- .../java/fns/datura/perms/DefaultNodes.java | 12 ++--- .../java/fns/datura/perms/FreedomGroup.java | 3 +- .../java/fns/datura/perms/FreedomUser.java | 13 ++--- .../java/fns/datura/punishment/Cager.java | 7 ++- .../java/fns/datura/punishment/Locker.java | 3 +- .../src/main/java/fns/datura/sql/MySQL.java | 17 +++---- .../java/fns/datura/user/SimpleUserData.java | 9 ++-- Datura/src/main/resources/plugin.yml | 3 +- Fossil/src/main/java/fns/fossil/Fossil.java | 12 ++--- .../java/fns/fossil/bouncypads/PadHolder.java | 10 ++-- Fossil/src/main/resources/plugin.yml | 3 +- .../java/fns/patchwork/base/Patchwork.java | 48 ++++++------------- .../java/fns/patchwork/base/Registration.java | 41 +++++++--------- .../java/fns/patchwork/base/Shortcuts.java | 12 ++--- .../display/adminchat/AdminChatDisplay.java | 13 +++-- .../patchwork/provider/ContextProvider.java | 1 - .../patchwork/service/FreedomExecutor.java | 6 +-- .../java/fns/patchwork/shop/ReactionTask.java | 8 ++-- Patchwork/src/main/resources/plugin.yml | 3 +- 24 files changed, 113 insertions(+), 158 deletions(-) diff --git a/Corvo/src/main/java/fns/corvo/Corvo.java b/Corvo/src/main/java/fns/corvo/Corvo.java index 8b021ec..69d9c7a 100644 --- a/Corvo/src/main/java/fns/corvo/Corvo.java +++ b/Corvo/src/main/java/fns/corvo/Corvo.java @@ -1,6 +1,7 @@ package fns.corvo; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; import org.bukkit.plugin.java.JavaPlugin; public class Corvo extends JavaPlugin @@ -8,18 +9,14 @@ public class Corvo extends JavaPlugin @Override public void onDisable() { - Patchwork.getInstance() - .getRegistrations() - .getModuleRegistry() + Registration.getModuleRegistry() .removeModule(this); } @Override public void onEnable() { - Patchwork.getInstance() - .getRegistrations() - .getModuleRegistry() + Registration.getModuleRegistry() .addModule(this); } } diff --git a/Corvo/src/main/resources/plugin.yml b/Corvo/src/main/resources/plugin.yml index 557f40e..db2b827 100644 --- a/Corvo/src/main/resources/plugin.yml +++ b/Corvo/src/main/resources/plugin.yml @@ -1,5 +1,6 @@ name: Corvo -main: me.totalfreedom.corvo.Corvo +main: fns.corvo.Corvo +api-version: 1.20 version: 1.0.0 author: TotalFreedom description: Services and Listeners for the Freedom Network Suite diff --git a/Datura/src/main/java/fns/datura/Datura.java b/Datura/src/main/java/fns/datura/Datura.java index f28a9c1..cebc77e 100644 --- a/Datura/src/main/java/fns/datura/Datura.java +++ b/Datura/src/main/java/fns/datura/Datura.java @@ -6,7 +6,7 @@ import fns.datura.punishment.Cager; import fns.datura.punishment.Halter; import fns.datura.punishment.Locker; import fns.datura.sql.MySQL; -import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; import fns.patchwork.service.SubscriptionProvider; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; @@ -18,7 +18,7 @@ public class Datura extends JavaPlugin // Punishment private final Halter halter = new Halter(); private final Locker locker = new Locker(); - private final Cager cager = new Cager(); + private Cager cager; // Features private final CommandSpy commandSpy = new CommandSpy(); @@ -27,28 +27,22 @@ public class Datura extends JavaPlugin @Override public void onEnable() { - Patchwork.getInstance() - .getRegistrations() - .getModuleRegistry() - .addModule(this); + cager = new Cager(this); - Patchwork.getInstance() - .getRegistrations() - .getServiceTaskRegistry() + Registration.getServiceTaskRegistry() .registerService(SubscriptionProvider.syncService(this, locker)); - Patchwork.getInstance() - .getRegistrations() - .getServiceTaskRegistry() + Registration.getServiceTaskRegistry() .registerService(SubscriptionProvider.syncService(this, cager)); - Patchwork.getInstance() - .getRegistrations() - .getServiceTaskRegistry() + Registration.getServiceTaskRegistry() .registerService(SubscriptionProvider.syncService(this, fuckoff)); Bukkit.getPluginManager() .registerEvents(halter, this); Bukkit.getPluginManager() .registerEvents(commandSpy, this); + + Registration.getModuleRegistry() + .addModule(this); } public MySQL getSQL() diff --git a/Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java b/Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java index ab38001..aff79a4 100644 --- a/Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/AdminChatCommand.java @@ -1,6 +1,7 @@ package fns.datura.cmd; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Shortcuts; import fns.patchwork.command.Commander; import fns.patchwork.command.annotation.Base; import fns.patchwork.command.annotation.Info; @@ -38,11 +39,11 @@ public class AdminChatCommand extends Commander final Player player = (Player) sender; - Patchwork.getInstance() + Shortcuts.provideModule(Patchwork.class) .getAdminChatDisplay() .toggleChat(player); - final boolean toggled = Patchwork.getInstance() + final boolean toggled = Shortcuts.provideModule(Patchwork.class) .getAdminChatDisplay() .isToggled(player); @@ -57,7 +58,7 @@ public class AdminChatCommand extends Commander @Subcommand(permission = "patchwork.adminchat", args = {String.class}) public void sendMessage(final CommandSender sender, final String message) { - Patchwork.getInstance() + Shortcuts.provideModule(Patchwork.class) .getAdminChatDisplay() .adminChatMessage(sender, Component.text(message)); } diff --git a/Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java b/Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java index 99828f8..e0912cf 100644 --- a/Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java +++ b/Datura/src/main/java/fns/datura/cmd/ClearDropsCommand.java @@ -51,7 +51,7 @@ public class ClearDropsCommand extends Commander } final Player player = (Player) sender; - Patchwork.getInstance() + Shortcuts.provideModule(Patchwork.class) .getExecutor() .delayedExecutor(Shortcuts.provideModule(Datura.class), 20 * 10L) .execute(() -> @@ -73,7 +73,7 @@ public class ClearDropsCommand extends Commander @Subcommand(permission = "datura.cleardrops", args = {World.class}) public void clearDrops(final CommandSender sender, final World world) { - Patchwork.getInstance() + Shortcuts.provideModule(Patchwork.class) .getExecutor() .delayedExecutor(Shortcuts.provideModule(Datura.class), 20 * 10L) .execute(() -> diff --git a/Datura/src/main/java/fns/datura/perms/DefaultNodes.java b/Datura/src/main/java/fns/datura/perms/DefaultNodes.java index 71a9af4..fd85f65 100644 --- a/Datura/src/main/java/fns/datura/perms/DefaultNodes.java +++ b/Datura/src/main/java/fns/datura/perms/DefaultNodes.java @@ -7,30 +7,26 @@ public class DefaultNodes { public static final Node OP = new PermissionNodeBuilder() .key("freedom.master_key") - .value(true) + .expiry(-1) .type(NodeType.PERMISSION) - .negated(false) .wildcard(true) .build(); public static final Node NON_OP = new PermissionNodeBuilder() .key("freedom.default") - .value(true) + .expiry(-1) .type(NodeType.PERMISSION) - .negated(false) .wildcard(false) .build(); public static final Node ALL = new PermissionNodeBuilder() .key("*") - .value(true) + .expiry(-1) .type(NodeType.PERMISSION) - .negated(false) .wildcard(true) .build(); public static final Node NONE = new PermissionNodeBuilder() .key("freedom.none") - .value(true) + .expiry(-1) .type(NodeType.PERMISSION) - .negated(false) .wildcard(false) .build(); diff --git a/Datura/src/main/java/fns/datura/perms/FreedomGroup.java b/Datura/src/main/java/fns/datura/perms/FreedomGroup.java index 0077a5f..7694147 100644 --- a/Datura/src/main/java/fns/datura/perms/FreedomGroup.java +++ b/Datura/src/main/java/fns/datura/perms/FreedomGroup.java @@ -1,6 +1,7 @@ package fns.datura.perms; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Shortcuts; import fns.patchwork.security.Group; import fns.patchwork.security.Node; import java.util.HashSet; @@ -40,7 +41,7 @@ public class FreedomGroup implements Group this.isDefault = isDefault; this.isHidden = isHidden; this.permissions = new HashSet<>(); - this.attachment = new PermissionAttachment(Patchwork.getInstance(), this); + this.attachment = new PermissionAttachment(Shortcuts.provideModule(Patchwork.class), this); } @Override diff --git a/Datura/src/main/java/fns/datura/perms/FreedomUser.java b/Datura/src/main/java/fns/datura/perms/FreedomUser.java index 367ccd6..d246cad 100644 --- a/Datura/src/main/java/fns/datura/perms/FreedomUser.java +++ b/Datura/src/main/java/fns/datura/perms/FreedomUser.java @@ -3,6 +3,8 @@ package fns.datura.perms; import fns.datura.Datura; import fns.datura.user.SimpleUserData; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; +import fns.patchwork.base.Shortcuts; import fns.patchwork.security.Node; import fns.patchwork.user.User; import fns.patchwork.user.UserData; @@ -41,11 +43,7 @@ public class FreedomUser implements User this.permissions = new HashSet<>(); this.displayName = player.displayName(); - final Datura datura = Patchwork.getInstance() - .getRegistrations() - .getModuleRegistry() - .getProvider(Datura.class) - .getModule(); + final Datura datura = Shortcuts.provideModule(Datura.class); UserData data = SimpleUserData.fromSQL(datura.getSQL(), uuid.toString()); @@ -56,8 +54,7 @@ public class FreedomUser implements User this.userData = data; - Patchwork.getInstance() - .getRegistrations() + Registration .getUserRegistry() .registerUserData(this, userData); } @@ -96,7 +93,7 @@ public class FreedomUser implements User public boolean addPermission(final Node node) { final boolean value = !node.isTemporary() || node.isExpired(); - final PermissionAttachment attachment = addAttachment(Patchwork.getInstance(), node.key(), value); + final PermissionAttachment attachment = addAttachment(Shortcuts.provideModule(Patchwork.class), node.key(), value); bukkitAttachments.put(node, attachment); return permissions().add(node); } diff --git a/Datura/src/main/java/fns/datura/punishment/Cager.java b/Datura/src/main/java/fns/datura/punishment/Cager.java index b411052..3a962d0 100644 --- a/Datura/src/main/java/fns/datura/punishment/Cager.java +++ b/Datura/src/main/java/fns/datura/punishment/Cager.java @@ -1,5 +1,6 @@ package fns.datura.punishment; +import fns.datura.Datura; import fns.patchwork.base.Patchwork; import fns.patchwork.service.Service; import fns.patchwork.utils.ShapeUtils; @@ -20,18 +21,20 @@ import org.bukkit.event.Listener; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.player.PlayerQuitEvent; +import javax.sound.midi.Patch; + public class Cager extends Service { private final Set cagedPlayers; private final Map cageLocations; - public Cager() + public Cager(final Datura datura) { super("cager-service"); this.cagedPlayers = new HashSet<>(); this.cageLocations = new HashMap<>(); Bukkit.getPluginManager() - .registerEvents(new CageListener(), Patchwork.getInstance()); + .registerEvents(new CageListener(), datura); } /** diff --git a/Datura/src/main/java/fns/datura/punishment/Locker.java b/Datura/src/main/java/fns/datura/punishment/Locker.java index 71a0abd..4649ff0 100644 --- a/Datura/src/main/java/fns/datura/punishment/Locker.java +++ b/Datura/src/main/java/fns/datura/punishment/Locker.java @@ -1,6 +1,7 @@ package fns.datura.punishment; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Shortcuts; import fns.patchwork.service.Service; import java.util.HashSet; import java.util.Set; @@ -34,7 +35,7 @@ public class Locker extends Service @Override public void tick() { - lockedPlayers.removeIf(uuid -> !Patchwork.getInstance() + lockedPlayers.removeIf(uuid -> !Shortcuts.provideModule(Patchwork.class) .getServer() .getOfflinePlayer(uuid) .isOnline()); diff --git a/Datura/src/main/java/fns/datura/sql/MySQL.java b/Datura/src/main/java/fns/datura/sql/MySQL.java index e3485e7..57afd1b 100644 --- a/Datura/src/main/java/fns/datura/sql/MySQL.java +++ b/Datura/src/main/java/fns/datura/sql/MySQL.java @@ -1,6 +1,7 @@ package fns.datura.sql; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Shortcuts; import fns.patchwork.sql.SQL; import fns.patchwork.utils.container.Identity; import java.sql.Connection; @@ -74,7 +75,7 @@ public class MySQL implements SQL throw new CompletionException("Failed to prepare statement: " + query + "\n", ex); } - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -91,7 +92,7 @@ public class MySQL implements SQL throw new CompletionException("Failed to connect to the database: " + url.toString() + "\n", ex); } - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -111,7 +112,7 @@ public class MySQL implements SQL "Failed to retrieve a result set from query: " + query + "\n", ex); } - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -130,7 +131,7 @@ public class MySQL implements SQL throw new CompletionException("Failed to execute update: " + query + "\n", ex); } - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -149,7 +150,7 @@ public class MySQL implements SQL throw new CompletionException("Failed to execute statement: " + query + "\n", ex); } - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -193,7 +194,7 @@ public class MySQL implements SQL ex); } return null; - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -202,7 +203,7 @@ public class MySQL implements SQL final String key, final Identity identity) { return executeUpdate("UPDATE ? SET ? = ? WHERE ? = ?", table, column, value, key, identity.getId()) - .thenApplyAsync(result -> result > 0, Patchwork.getInstance() + .thenApplyAsync(result -> result > 0, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } @@ -210,7 +211,7 @@ public class MySQL implements SQL public CompletableFuture deleteRow(final String table, final String key, final Identity identity) { return executeUpdate("DELETE FROM ? WHERE ? = ?", table, key, identity.getId()) - .thenApplyAsync(result -> result > 0, Patchwork.getInstance() + .thenApplyAsync(result -> result > 0, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()); } diff --git a/Datura/src/main/java/fns/datura/user/SimpleUserData.java b/Datura/src/main/java/fns/datura/user/SimpleUserData.java index 234306d..f313ef3 100644 --- a/Datura/src/main/java/fns/datura/user/SimpleUserData.java +++ b/Datura/src/main/java/fns/datura/user/SimpleUserData.java @@ -3,6 +3,8 @@ package fns.datura.user; import fns.datura.event.UserDataUpdateEvent; import fns.datura.perms.FreedomUser; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; +import fns.patchwork.base.Shortcuts; import fns.patchwork.display.adminchat.AdminChatFormat; import fns.patchwork.security.Group; import fns.patchwork.sql.SQL; @@ -38,7 +40,7 @@ public class SimpleUserData implements UserData this.username = player.getName(); this.user = new FreedomUser(player); - Patchwork.getInstance() + Shortcuts.provideModule(Patchwork.class) .getEventBus() .addEvent(event); } @@ -84,8 +86,7 @@ public class SimpleUserData implements UserData throw new IllegalStateException("Player should be online but they are not!"); final User user = new FreedomUser(player); - final Group group = Patchwork.getInstance() - .getRegistrations() + final Group group = Registration .getGroupRegistry() .getGroup(g); @@ -116,7 +117,7 @@ public class SimpleUserData implements UserData if (player == null) throw new IllegalStateException("Player should be online but they are not!"); return new SimpleUserData(player); - }, Patchwork.getInstance() + }, Shortcuts.provideModule(Patchwork.class) .getExecutor() .getAsync()) .join(); diff --git a/Datura/src/main/resources/plugin.yml b/Datura/src/main/resources/plugin.yml index 0455676..a70371e 100644 --- a/Datura/src/main/resources/plugin.yml +++ b/Datura/src/main/resources/plugin.yml @@ -1,5 +1,6 @@ name: Datura -main: me.totalfreedom.datura.Datura +main: fns.datura.Datura +api-version: 1.20 version: 1.0.0 author: TotalFreedom description: Data Manager for the Freedom Network Suite diff --git a/Fossil/src/main/java/fns/fossil/Fossil.java b/Fossil/src/main/java/fns/fossil/Fossil.java index e32ce9b..7a470b5 100644 --- a/Fossil/src/main/java/fns/fossil/Fossil.java +++ b/Fossil/src/main/java/fns/fossil/Fossil.java @@ -1,7 +1,6 @@ package fns.fossil; import fns.fossil.trail.Trailer; -import fns.patchwork.base.Patchwork; import fns.patchwork.base.Registration; import fns.patchwork.service.SubscriptionProvider; import org.bukkit.plugin.java.JavaPlugin; @@ -9,17 +8,14 @@ import org.bukkit.plugin.java.JavaPlugin; public class Fossil extends JavaPlugin { private final Trailer trailer = new Trailer(); - private final Registration registration = Patchwork.getInstance() - .getRegistrations(); - @Override public void onEnable() { - registration.getModuleRegistry() - .addModule(this); - - registration.getServiceTaskRegistry() + Registration.getServiceTaskRegistry() .registerService( SubscriptionProvider.syncService(this, trailer)); + + Registration.getModuleRegistry() + .addModule(this); } } diff --git a/Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java b/Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java index 93b5f91..487a263 100644 --- a/Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java +++ b/Fossil/src/main/java/fns/fossil/bouncypads/PadHolder.java @@ -1,11 +1,12 @@ package fns.fossil.bouncypads; import fns.fossil.Fossil; -import fns.patchwork.base.Patchwork; import java.util.HashMap; import java.util.Map; import java.util.UUID; import java.util.stream.Stream; + +import fns.patchwork.base.Shortcuts; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Tag; @@ -32,12 +33,7 @@ public class PadHolder implements Listener public PadHolder() { Bukkit.getPluginManager() - .registerEvents(this, Patchwork - .getInstance() - .getRegistrations() - .getModuleRegistry() - .getProvider(Fossil.class) - .getModule()); + .registerEvents(this, Shortcuts.provideModule(Fossil.class)); } /** diff --git a/Fossil/src/main/resources/plugin.yml b/Fossil/src/main/resources/plugin.yml index 99f537c..f3212a7 100644 --- a/Fossil/src/main/resources/plugin.yml +++ b/Fossil/src/main/resources/plugin.yml @@ -1,6 +1,7 @@ name: Fossil version: 1.0 -main: me.totalfreedom.fossil.Fossil +main: fns.fossil.Fossil +api-version: 1.20 author: TotalFreedom description: The Fun Module for the Freedom Network. depend: diff --git a/Patchwork/src/main/java/fns/patchwork/base/Patchwork.java b/Patchwork/src/main/java/fns/patchwork/base/Patchwork.java index 964180f..64d4099 100644 --- a/Patchwork/src/main/java/fns/patchwork/base/Patchwork.java +++ b/Patchwork/src/main/java/fns/patchwork/base/Patchwork.java @@ -15,52 +15,45 @@ public class Patchwork extends JavaPlugin /** * The {@link EventBus} for this plugin. */ - private final EventBus eventBus = new EventBus(this); - /** - * The {@link Registration} object for this plugin. - */ - private final Registration registration = new Registration(); + private EventBus eventBus; /** * The {@link FreedomExecutor} for this plugin. */ - private final FreedomExecutor executor = new FreedomExecutor(); + private FreedomExecutor executor; /** * The {@link AdminChatDisplay} for this plugin. */ - private final AdminChatDisplay acdisplay = new AdminChatDisplay(); - - /** - * Provides this plugin instance through a safe static method. This is effectively the same thing as using - * {@link JavaPlugin#getPlugin(Class)} - * - * @return the plugin instance - */ - public static Patchwork getInstance() - { - return JavaPlugin.getPlugin(Patchwork.class); - } + private AdminChatDisplay acdisplay; @Override public void onDisable() { Bukkit.getScheduler() - .runTaskLater(this, () -> getRegistrations() + .runTaskLater(this, () -> Registration .getServiceTaskRegistry() .stopAllServices(), 1L); - getRegistrations().getServiceTaskRegistry() + Registration.getServiceTaskRegistry() .unregisterService(EventBus.class); } @Override public void onEnable() { - getRegistrations().getServiceTaskRegistry() + eventBus = new EventBus(this); + executor = new FreedomExecutor(this); + acdisplay = new AdminChatDisplay(this); + + + Registration.getServiceTaskRegistry() .registerService(SubscriptionProvider.asyncService(this, eventBus)); + getExecutor().getSync() - .execute(() -> getRegistrations() + .execute(() -> Registration .getServiceTaskRegistry() .startAllServices()); + + Registration.getModuleRegistry().addModule(this); } /** @@ -73,17 +66,6 @@ public class Patchwork extends JavaPlugin return executor; } - /** - * Get's the Registration object for this plugin. This object contains every registry class for the various features - * provided by this plugin. - * - * @return the Registration object - */ - public Registration getRegistrations() - { - return registration; - } - /** * Gets the {@link EventBus} for this plugin. The EventBus is used to register and listen to custom events provided * by Freedom Network Suite. diff --git a/Patchwork/src/main/java/fns/patchwork/base/Registration.java b/Patchwork/src/main/java/fns/patchwork/base/Registration.java index c5aeee8..bbe5048 100644 --- a/Patchwork/src/main/java/fns/patchwork/base/Registration.java +++ b/Patchwork/src/main/java/fns/patchwork/base/Registration.java @@ -11,53 +11,44 @@ import fns.patchwork.data.UserRegistry; * This class is a holder for each registry in the data package. *
* Registries such as {@link ModuleRegistry} and {@link ServiceTaskRegistry} can be found as final objects in this - * class. These registries should only ever be accessed through the single Registration object in CommonsBase using - * {@link Patchwork#getRegistrations()} + * class. */ public class Registration { /** * The {@link EventRegistry} */ - private final EventRegistry eventRegistry; + private static final EventRegistry eventRegistry = new EventRegistry(); /** * The {@link UserRegistry} */ - private final UserRegistry userRegistry; + private static final UserRegistry userRegistry = new UserRegistry(); /** * The {@link ServiceTaskRegistry} */ - private final ServiceTaskRegistry serviceTaskRegistry; + private static final ServiceTaskRegistry serviceTaskRegistry = new ServiceTaskRegistry(); /** * The {@link ModuleRegistry} */ - private final ModuleRegistry moduleRegistry; + private static final ModuleRegistry moduleRegistry = new ModuleRegistry(); /** * The {@link GroupRegistry} */ - private final GroupRegistry groupRegistry; + private static final GroupRegistry groupRegistry = new GroupRegistry(); /** * The {@link ConfigRegistry} */ - private final ConfigRegistry configRegistry; + private static final ConfigRegistry configRegistry = new ConfigRegistry(); - /** - * Constructs a new Registration object and initializes all registries. - */ - Registration() + private Registration() { - this.eventRegistry = new EventRegistry(); - this.userRegistry = new UserRegistry(); - this.serviceTaskRegistry = new ServiceTaskRegistry(); - this.moduleRegistry = new ModuleRegistry(); - this.groupRegistry = new GroupRegistry(); - this.configRegistry = new ConfigRegistry(); + throw new AssertionError(); } /** * @return The {@link ModuleRegistry} */ - public ModuleRegistry getModuleRegistry() + public static ModuleRegistry getModuleRegistry() { return moduleRegistry; } @@ -65,7 +56,7 @@ public class Registration /** * @return The {@link EventRegistry} */ - public EventRegistry getEventRegistry() + public static EventRegistry getEventRegistry() { return eventRegistry; } @@ -73,7 +64,7 @@ public class Registration /** * @return The {@link UserRegistry} */ - public UserRegistry getUserRegistry() + public static UserRegistry getUserRegistry() { return userRegistry; } @@ -81,7 +72,7 @@ public class Registration /** * @return The {@link ServiceTaskRegistry} */ - public ServiceTaskRegistry getServiceTaskRegistry() + public static ServiceTaskRegistry getServiceTaskRegistry() { return serviceTaskRegistry; } @@ -89,7 +80,7 @@ public class Registration /** * @return The {@link GroupRegistry} */ - public GroupRegistry getGroupRegistry() + public static GroupRegistry getGroupRegistry() { return groupRegistry; } @@ -97,8 +88,8 @@ public class Registration /** * @return The {@link ConfigRegistry} */ - public ConfigRegistry getConfigRegistry() + public static ConfigRegistry getConfigRegistry() { return configRegistry; } -} +} \ No newline at end of file diff --git a/Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java b/Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java index 2e57e68..b591929 100644 --- a/Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java +++ b/Patchwork/src/main/java/fns/patchwork/base/Shortcuts.java @@ -13,18 +13,14 @@ public final class Shortcuts public static T provideModule(final Class pluginClass) { - return Patchwork.getInstance() - .getRegistrations() - .getModuleRegistry() - .getProvider(pluginClass) - .getModule(); + return Registration.getModuleRegistry() + .getProvider(pluginClass) + .getModule(); } public static User getUser(final Player player) { - return Patchwork.getInstance() - .getRegistrations() - .getUserRegistry() + return Registration.getUserRegistry() .getUser(player); } } diff --git a/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java b/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java index 8e70100..3f6f250 100644 --- a/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java +++ b/Patchwork/src/main/java/fns/patchwork/display/adminchat/AdminChatDisplay.java @@ -1,6 +1,7 @@ package fns.patchwork.display.adminchat; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; import fns.patchwork.base.Shortcuts; import fns.patchwork.security.Groups; import fns.patchwork.user.UserData; @@ -24,9 +25,9 @@ public class AdminChatDisplay private final Map adminChatFormat = new HashMap<>(); private final Set toggledChat = new HashSet<>(); - public AdminChatDisplay() + public AdminChatDisplay(final Patchwork patchwork) { - new ACListener(this); + new ACListener(this, patchwork); } public void addPlayer(final Player player, final AdminChatFormat format) @@ -101,11 +102,11 @@ public class AdminChatDisplay { private final AdminChatDisplay display; - public ACListener(final AdminChatDisplay display) + public ACListener(final AdminChatDisplay display, final Patchwork patchwork) { this.display = display; Bukkit.getPluginManager() - .registerEvents(this, Shortcuts.provideModule(Patchwork.class)); + .registerEvents(this, patchwork); } @EventHandler @@ -124,9 +125,7 @@ public class AdminChatDisplay final Player player = event.getPlayer(); if (player.hasPermission(ACPERM)) { - final UserData data = Patchwork.getInstance() - .getRegistrations() - .getUserRegistry() + final UserData data = Registration.getUserRegistry() .fromPlayer(player); if (data.hasCustomACFormat()) { diff --git a/Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java b/Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java index a33a7d9..01f1807 100644 --- a/Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java +++ b/Patchwork/src/main/java/fns/patchwork/provider/ContextProvider.java @@ -160,7 +160,6 @@ public class ContextProvider * * @param string The string to parse * @return A location object if xyz is valid - * @see BukkitDelegate#processSubCommands(String[], CommandSender, ContextProvider, Subcommand) */ private @Nullable Location toLocation(final String string, final Class clazz) { diff --git a/Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java b/Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java index a67d031..c957279 100644 --- a/Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java +++ b/Patchwork/src/main/java/fns/patchwork/service/FreedomExecutor.java @@ -25,12 +25,12 @@ public class FreedomExecutor /** * Creates a new {@link FreedomExecutor} instance. */ - public FreedomExecutor() + public FreedomExecutor(final Patchwork patchwork) { syncExecutor = r -> Bukkit.getScheduler() - .runTask(Patchwork.getInstance(), r); + .runTask(patchwork, r); asyncExecutor = r -> Bukkit.getScheduler() - .runTaskAsynchronously(Patchwork.getInstance(), r); + .runTaskAsynchronously(patchwork, r); } /** diff --git a/Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java b/Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java index 3af5916..360781b 100644 --- a/Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java +++ b/Patchwork/src/main/java/fns/patchwork/shop/ReactionTask.java @@ -1,6 +1,8 @@ package fns.patchwork.shop; import fns.patchwork.base.Patchwork; +import fns.patchwork.base.Registration; +import fns.patchwork.base.Shortcuts; import fns.patchwork.display.BossBarDisplay; import fns.patchwork.display.BossBarTimer; import fns.patchwork.economy.EconomicEntity; @@ -36,7 +38,7 @@ public class ReactionTask extends Task implements Listener } final BossBarTimer timer = new BossBarTimer(bossBarDisplay, reaction.getReactionDuration()); - timer.runTaskTimer(Patchwork.getInstance(), 0L, timer.getInterval()); + timer.runTaskTimer(Shortcuts.provideModule(Patchwork.class), 0L, timer.getInterval()); } @EventHandler @@ -45,9 +47,7 @@ public class ReactionTask extends Task implements Listener if (event.message() .equals(reaction.getReactionMessage())) { - final EconomicEntity entity = Patchwork.getInstance() - .getRegistrations() - .getUserRegistry() + final EconomicEntity entity = Registration.getUserRegistry() .getUser(event.getPlayer()); reaction.onReact(entity); diff --git a/Patchwork/src/main/resources/plugin.yml b/Patchwork/src/main/resources/plugin.yml index 5cbde93..c51a0e3 100644 --- a/Patchwork/src/main/resources/plugin.yml +++ b/Patchwork/src/main/resources/plugin.yml @@ -1,5 +1,6 @@ name: Patchwork -main: me.totalfreedom.base.CommonsBase +main: fns.patchwork.base.Patchwork +api-version: 1.20 version: 1.0.0 author: TotalFreedom description: The Core of Freedom Network Suite \ No newline at end of file