Files
OldSliceMC/patches/api/0008-Set-multiple-team-settings-at-once.patch
2024-01-01 08:15:59 -06:00

36 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cryptite <cryptite@gmail.com>
Date: Mon, 10 Apr 2023 07:52:54 -0500
Subject: [PATCH] Set multiple team settings at once
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index cacb58d25c249e2ecd6083ed0f30d5ffb345220a..b0ed2c57321dae0d00b47dd23e67866592249993 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -514,6 +514,24 @@ public interface Team extends net.kyori.adventure.audience.ForwardingAudience {
boolean hasEntity(@NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException;
// Paper end - improve scoreboard entries
+ //Slice start
+ /**
+ * Fully set all team options, combining all 5 options into one packet send, rather than one packet sent
+ * for every single option change.
+ * @param displayName New display name
+ * @param prefix New prefix
+ * @param suffix New suffix
+ * @param color new color
+ * @param options A Paired list of options
+ * @throws IllegalStateException
+ */
+ void teamOptions(@Nullable net.kyori.adventure.text.Component displayName,
+ @Nullable net.kyori.adventure.text.Component prefix,
+ @Nullable net.kyori.adventure.text.Component suffix,
+ @Nullable net.kyori.adventure.text.format.NamedTextColor color,
+ @Nullable java.util.List<org.apache.commons.lang3.tuple.Pair<Option, OptionStatus>> options) throws IllegalStateException;
+ //Slice end
+
/**
* Represents an option which may be applied to this team.
*/