@@ -119,10 +119,28 @@ public static ComponentFlattener flattener() {
119119 * render each {@link Audience} their own version of
120120 * the received message.
121121 *
122+ * @param apply The function invoked to render
123+ * {@link Audience} specific component.
122124 * @return The virtual component
123125 */
124126 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 );
126144 }
127145
128146 private static Factory factory () {
@@ -151,6 +169,6 @@ Component render(
151169
152170 ComponentFlattener flattener ();
153171
154- VirtualComponent receiverVirtualComponent (Function <Audience , ComponentLike > apply );
172+ VirtualComponent receiverVirtualComponent (Function <Audience , ComponentLike > apply , String fallbackValue );
155173 }
156174}
0 commit comments