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;