geforkt von Mirrors/Paper
eed041d629
By: md_5 <git@md-5.net>
27 Zeilen
915 B
Diff
27 Zeilen
915 B
Diff
--- a/net/minecraft/network/chat/IChatBaseComponent.java
|
|
+++ b/net/minecraft/network/chat/IChatBaseComponent.java
|
|
@@ -36,7 +36,22 @@
|
|
import net.minecraft.util.FormattedString;
|
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
|
|
|
-public interface IChatBaseComponent extends Message, IChatFormatted {
|
|
+// CraftBukkit start
|
|
+import java.util.stream.Stream;
|
|
+// CraftBukkit end
|
|
+
|
|
+public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IChatBaseComponent> { // CraftBukkit
|
|
+
|
|
+ // CraftBukkit start
|
|
+ default Stream<IChatBaseComponent> stream() {
|
|
+ return com.google.common.collect.Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(IChatBaseComponent::stream)});
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ default Iterator<IChatBaseComponent> iterator() {
|
|
+ return this.stream().iterator();
|
|
+ }
|
|
+ // CraftBukkit end
|
|
|
|
ChatModifier getStyle();
|
|
|