mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-19 14:23:48 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
25
nms-patches/IChatBaseComponent.patch
Normal file
25
nms-patches/IChatBaseComponent.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
--- a/net/minecraft/server/IChatBaseComponent.java
|
||||
+++ b/net/minecraft/server/IChatBaseComponent.java
|
||||
@@ -22,8 +22,21 @@
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Nullable;
|
||||
+// CraftBukkit start
|
||||
+import com.google.common.collect.Streams;
|
||||
+import java.util.stream.Stream;
|
||||
|
||||
-public interface IChatBaseComponent extends Message, IChatFormatted {
|
||||
+public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IChatBaseComponent> {
|
||||
+
|
||||
+ default Stream<IChatBaseComponent> stream() {
|
||||
+ return 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 getChatModifier();
|
||||
|
Reference in New Issue
Block a user