@@ -119,10 +119,28 @@ public static ComponentFlattener flattener() {
119
119
* render each {@link Audience} their own version of
120
120
* the received message.
121
121
*
122
+ * @param apply The function invoked to render
123
+ * {@link Audience} specific component.
122
124
* @return The virtual component
123
125
*/
124
126
public static VirtualComponent receiverVirtualComponent (final Function <Audience , ComponentLike > apply ) {
125
- return SpongeComponents .factory ().receiverVirtualComponent (apply );
127
+ return SpongeComponents .receiverVirtualComponent (apply , "" );
128
+ }
129
+
130
+ /**
131
+ * Creates a new {@link VirtualComponent} that will be used to
132
+ * render each {@link Audience} their own version of
133
+ * the received message.
134
+ *
135
+ * @param apply The function invoked to render
136
+ * {@link Audience} specific component.
137
+ * @param fallbackValue The fallback value used when this
138
+ * component has been serialized without
139
+ * being rendered.
140
+ * @return The virtual component
141
+ */
142
+ public static VirtualComponent receiverVirtualComponent (final Function <Audience , ComponentLike > apply , final String fallbackValue ) {
143
+ return SpongeComponents .factory ().receiverVirtualComponent (apply , fallbackValue );
126
144
}
127
145
128
146
private static Factory factory () {
@@ -151,6 +169,6 @@ Component render(
151
169
152
170
ComponentFlattener flattener ();
153
171
154
- VirtualComponent receiverVirtualComponent (Function <Audience , ComponentLike > apply );
172
+ VirtualComponent receiverVirtualComponent (Function <Audience , ComponentLike > apply , String fallbackValue );
155
173
}
156
174
}
0 commit comments