From 80d5c13b1ff4103186258a1b0abce56dfbf4a8d5 Mon Sep 17 00:00:00 2001 From: srnyx <25808801+srnyx@users.noreply.github.com> Date: Sat, 30 Mar 2024 20:42:48 -0400 Subject: [PATCH] Add `AnnoyingSender#equalsSender(CommandSender)` --- .../srnyx/annoyingapi/command/AnnoyingSender.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/src/main/java/xyz/srnyx/annoyingapi/command/AnnoyingSender.java b/api/src/main/java/xyz/srnyx/annoyingapi/command/AnnoyingSender.java index 64c07c5..68cbb81 100644 --- a/api/src/main/java/xyz/srnyx/annoyingapi/command/AnnoyingSender.java +++ b/api/src/main/java/xyz/srnyx/annoyingapi/command/AnnoyingSender.java @@ -77,6 +77,18 @@ public AnnoyingPlugin getAnnoyingPlugin() { return plugin; } + + /** + * Checks if the provided {@link CommandSender} is the same as the {@link #cmdSender} + * + * @param sender the {@link CommandSender} to check + * + * @return if the provided {@link CommandSender} is the same as the {@link #cmdSender} + */ + public boolean equalsSender(@NotNull CommandSender sender) { + return cmdSender.equals(sender); + } + /** * Returns if the specified {@link #args} index is equal to any of the specified strings (case-insensitive) *