From fd575c80a2214bb740c4fef6adf9b21331a0c730 Mon Sep 17 00:00:00 2001 From: srnyx <25808801+srnyx@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:37:26 -0400 Subject: [PATCH] Add `LazyEmbed#empty()` --- .../java/xyz/srnyx/lazylibrary/LazyEmbed.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/xyz/srnyx/lazylibrary/LazyEmbed.java b/src/main/java/xyz/srnyx/lazylibrary/LazyEmbed.java index 955c8fe..5371d77 100644 --- a/src/main/java/xyz/srnyx/lazylibrary/LazyEmbed.java +++ b/src/main/java/xyz/srnyx/lazylibrary/LazyEmbed.java @@ -662,6 +662,8 @@ public LazyEmbed addEmptyFields(int amount, boolean inline) { * @param rows the rows of fields to add * * @return this + * + * @see #gridFields(Map...) */ @NotNull public LazyEmbed gridFields(@NotNull Collection> rows) { @@ -687,6 +689,8 @@ public LazyEmbed gridFields(@NotNull Collection> rows) { * @param rows the rows of fields to add * * @return this + * + * @see #gridFields(Collection) */ @NotNull @SafeVarargs public final LazyEmbed gridFields(@NotNull Map... rows) { @@ -1072,4 +1076,18 @@ public static LazyEmbed invalidArguments(@NotNull Object... argumentsValues) { for (int i = 0; i < argumentsValues.length; i += 2) embed.addField(String.valueOf(argumentsValues[i]), String.valueOf(argumentsValues[i + 1]), true); return embed; } + + /** + * A pre-built {@link LazyEmbed} that has no color ({@code #2b2d31}, which blends in with the embed background) and has all default key values disabled + *
It's basically just a completely empty embed/rectangle for you to fill in + *
Works great with {@link LazyEmbed#gridFields(Collection)} + * + * @return the {@link LazyEmbed} + */ + @NotNull + public static LazyEmbed empty() { + return new LazyEmbed() + .setColor(0x2b2d31) + .disableDefaults(Key.values()); + } }