Files
OldSliceMC/patches/api/0009-Set-multiple-team-settings-at-once.patch
2023-04-10 08:53:32 -05:00

36 lines
1.6 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 0f1c08092577a7d66fdc1ea8b645ea67e0d9c6cf..f1b3d05901a4fe32366699280f44147a9cda2873 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -532,6 +532,24 @@ public interface Team {
boolean hasEntity(@NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException;
// Paper end
+ //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(net.kyori.adventure.text.Component displayName,
+ net.kyori.adventure.text.Component prefix,
+ net.kyori.adventure.text.Component suffix,
+ net.kyori.adventure.text.format.NamedTextColor color,
+ 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.
*/