From f9f04e0398ff875e7a973cbbed763dc3945c8a54 Mon Sep 17 00:00:00 2001 From: salva Date: Mon, 1 Aug 2022 02:39:08 -0500 Subject: [PATCH] BREAKING API: make Sender annotation universal --- .../commandflow/bukkit/factory/BukkitModule.java | 2 +- .../commandflow/bungee/annotation/Sender.java | 11 ----------- .../commandflow/bungee/factory/BungeeModule.java | 2 +- .../commandflow/discord/annotation/Sender.java | 11 ----------- .../commandflow/discord/factory/DiscordModule.java | 2 +- .../commandflow/annotated}/annotation/Sender.java | 2 +- .../commandflow/velocity/annotation/Sender.java | 11 ----------- .../commandflow/velocity/factory/VelocityModule.java | 2 +- 8 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 Bungee/src/main/java/me/fixeddev/commandflow/bungee/annotation/Sender.java delete mode 100644 Discord/src/main/java/me/fixeddev/commandflow/discord/annotation/Sender.java rename {Bukkit/src/main/java/me/fixeddev/commandflow/bukkit => Universal/src/main/java/me/fixeddev/commandflow/annotated}/annotation/Sender.java (82%) delete mode 100644 Velocity/src/main/java/me/fixeddev/commandflow/velocity/annotation/Sender.java diff --git a/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/factory/BukkitModule.java b/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/factory/BukkitModule.java index d8c6bc5e..0d4dd12a 100644 --- a/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/factory/BukkitModule.java +++ b/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/factory/BukkitModule.java @@ -2,7 +2,7 @@ import me.fixeddev.commandflow.annotated.part.AbstractModule; import me.fixeddev.commandflow.annotated.part.Key; -import me.fixeddev.commandflow.bukkit.annotation.Sender; +import me.fixeddev.commandflow.annotated.annotation.Sender; import org.bukkit.GameMode; import org.bukkit.OfflinePlayer; diff --git a/Bungee/src/main/java/me/fixeddev/commandflow/bungee/annotation/Sender.java b/Bungee/src/main/java/me/fixeddev/commandflow/bungee/annotation/Sender.java deleted file mode 100644 index 6a0fd7ee..00000000 --- a/Bungee/src/main/java/me/fixeddev/commandflow/bungee/annotation/Sender.java +++ /dev/null @@ -1,11 +0,0 @@ -package me.fixeddev.commandflow.bungee.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.PARAMETER) -public @interface Sender { -} diff --git a/Bungee/src/main/java/me/fixeddev/commandflow/bungee/factory/BungeeModule.java b/Bungee/src/main/java/me/fixeddev/commandflow/bungee/factory/BungeeModule.java index fae33a33..0b12e29e 100644 --- a/Bungee/src/main/java/me/fixeddev/commandflow/bungee/factory/BungeeModule.java +++ b/Bungee/src/main/java/me/fixeddev/commandflow/bungee/factory/BungeeModule.java @@ -1,8 +1,8 @@ package me.fixeddev.commandflow.bungee.factory; +import me.fixeddev.commandflow.annotated.annotation.Sender; import me.fixeddev.commandflow.annotated.part.AbstractModule; import me.fixeddev.commandflow.annotated.part.Key; -import me.fixeddev.commandflow.bungee.annotation.Sender; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer; diff --git a/Discord/src/main/java/me/fixeddev/commandflow/discord/annotation/Sender.java b/Discord/src/main/java/me/fixeddev/commandflow/discord/annotation/Sender.java deleted file mode 100644 index e9237974..00000000 --- a/Discord/src/main/java/me/fixeddev/commandflow/discord/annotation/Sender.java +++ /dev/null @@ -1,11 +0,0 @@ -package me.fixeddev.commandflow.discord.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.PARAMETER) -public @interface Sender { -} diff --git a/Discord/src/main/java/me/fixeddev/commandflow/discord/factory/DiscordModule.java b/Discord/src/main/java/me/fixeddev/commandflow/discord/factory/DiscordModule.java index 32a7012c..95decc51 100644 --- a/Discord/src/main/java/me/fixeddev/commandflow/discord/factory/DiscordModule.java +++ b/Discord/src/main/java/me/fixeddev/commandflow/discord/factory/DiscordModule.java @@ -1,8 +1,8 @@ package me.fixeddev.commandflow.discord.factory; +import me.fixeddev.commandflow.annotated.annotation.Sender; import me.fixeddev.commandflow.annotated.part.AbstractModule; import me.fixeddev.commandflow.annotated.part.Key; -import me.fixeddev.commandflow.discord.annotation.Sender; import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.TextChannel; diff --git a/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/annotation/Sender.java b/Universal/src/main/java/me/fixeddev/commandflow/annotated/annotation/Sender.java similarity index 82% rename from Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/annotation/Sender.java rename to Universal/src/main/java/me/fixeddev/commandflow/annotated/annotation/Sender.java index b6328efb..94d00d45 100644 --- a/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/annotation/Sender.java +++ b/Universal/src/main/java/me/fixeddev/commandflow/annotated/annotation/Sender.java @@ -1,4 +1,4 @@ -package me.fixeddev.commandflow.bukkit.annotation; +package me.fixeddev.commandflow.annotated.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/Velocity/src/main/java/me/fixeddev/commandflow/velocity/annotation/Sender.java b/Velocity/src/main/java/me/fixeddev/commandflow/velocity/annotation/Sender.java deleted file mode 100644 index 9c5b0574..00000000 --- a/Velocity/src/main/java/me/fixeddev/commandflow/velocity/annotation/Sender.java +++ /dev/null @@ -1,11 +0,0 @@ -package me.fixeddev.commandflow.velocity.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.PARAMETER) -public @interface Sender { -} diff --git a/Velocity/src/main/java/me/fixeddev/commandflow/velocity/factory/VelocityModule.java b/Velocity/src/main/java/me/fixeddev/commandflow/velocity/factory/VelocityModule.java index 92371d24..afd4c8ba 100644 --- a/Velocity/src/main/java/me/fixeddev/commandflow/velocity/factory/VelocityModule.java +++ b/Velocity/src/main/java/me/fixeddev/commandflow/velocity/factory/VelocityModule.java @@ -3,9 +3,9 @@ import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.ProxyServer; +import me.fixeddev.commandflow.annotated.annotation.Sender; import me.fixeddev.commandflow.annotated.part.AbstractModule; import me.fixeddev.commandflow.annotated.part.Key; -import me.fixeddev.commandflow.velocity.annotation.Sender; public class VelocityModule extends AbstractModule {