@@ -156,22 +156,22 @@ sealed interface Builder permits AnimationImpl.BuilderImpl {
156156 * Sets the delay between invocations of the slot selector.
157157 *
158158 * @param tickDelay The delay between invocations of the slot selector.
159- * @return This {@link Builder Animation builder }
159+ * @return This {@link Builder}
160160 */
161161 Builder setTickDelay (int tickDelay );
162162
163163 /**
164164 * Adds a filter defining which slots are part of the animation.
165165 *
166166 * @param filter The filter defining which slots are part of the animation.
167- * @return This {@link Builder Animation builder }
167+ * @return This {@link Builder}
168168 */
169169 Builder addSlotFilter (BiPredicate <? super Gui , ? super Slot > filter );
170170
171171 /**
172172 * Adds a {@link #addSlotFilter(BiPredicate) filter} that ignores all empty slots.
173173 *
174- * @return This {@link Builder Animation builder }
174+ * @return This {@link Builder}
175175 */
176176 default Builder filterNonEmptySlots () {
177177 return addSlotFilter ((gui , slot ) -> gui .getSlotElement (slot .x (), slot .y ()) != null );
@@ -183,7 +183,7 @@ default Builder filterNonEmptySlots() {
183183 *
184184 * @param key The key to filter for
185185 * @param keys Additional keys to filter for
186- * @return This {@link Builder Animation builder }
186+ * @return This {@link Builder}
187187 * @see Gui#applyStructure(Structure)
188188 */
189189 default Builder filterTaggedSlots (char key , char ... keys ) {
@@ -197,7 +197,7 @@ default Builder filterTaggedSlots(char key, char... keys) {
197197 * @param sound The sound effect type
198198 * @param volume The volume of the sound
199199 * @param pitch The pitch of the sound
200- * @return This {@link Builder Animation builder }
200+ * @return This {@link Builder}
201201 */
202202 default Builder addSoundEffect (Sound sound , float volume , float pitch ) {
203203 return addShowHandler ((animation , slot ) ->
@@ -213,15 +213,15 @@ default Builder addSoundEffect(Sound sound, float volume, float pitch) {
213213 * Slot selectors need to show all slots of {@link State#getRemainingSlots()} in order to complete the animation.
214214 *
215215 * @param selector The slot selector for the animation.
216- * @return This {@link Builder Animation builder }
216+ * @return This {@link Builder}
217217 */
218218 Builder setSlotSelector (Function <? super State , ? extends Set <? extends Slot >> selector );
219219
220220 /**
221221 * Sets the intermediary {@link ItemProvider} that is displayed before the slots pop in.
222222 *
223223 * @param provider The intermediary {@link ItemProvider}.
224- * @return This {@link Builder Animation builder }
224+ * @return This {@link Builder}
225225 */
226226 default Builder setIntermediary (ItemProvider provider ) {
227227 return setIntermediary (Item .simple (provider ));
@@ -231,7 +231,7 @@ default Builder setIntermediary(ItemProvider provider) {
231231 * Sets the intermediary {@link Item} that is displayed before the slots pop in.
232232 *
233233 * @param item The intermediary {@link Item}.
234- * @return This {@link Builder Animation builder }
234+ * @return This {@link Builder}
235235 */
236236 default Builder setIntermediary (Item item ) {
237237 var element = new SlotElement .Item (item );
@@ -243,7 +243,7 @@ default Builder setIntermediary(Item item) {
243243 * before the {@link Gui Gui's} slots pop in.
244244 *
245245 * @param intermediaryGenerator The generator function that creates intermediary {@link ItemProvider ItemProviders}.
246- * @return This {@link Builder Animation builder }
246+ * @return This {@link Builder}
247247 */
248248 default Builder setIntermediaryGenerator (Function <? super Slot , ? extends @ Nullable ItemProvider > intermediaryGenerator ) {
249249 return setIntermediaryElementGenerator (slot -> {
@@ -257,26 +257,35 @@ default Builder setIntermediaryGenerator(Function<? super Slot, ? extends @Nulla
257257 * before the {@link Gui Gui's} slots pop in.
258258 *
259259 * @param intermediaryGenerator The generator function that creates intermediary {@link SlotElement SlotElements}.
260- * @return This {@link Builder Animation builder }
260+ * @return This {@link Builder}
261261 */
262262 Builder setIntermediaryElementGenerator (Function <? super Slot , ? extends @ Nullable SlotElement > intermediaryGenerator );
263263
264264 /**
265265 * Adds a handler that is called when slot(s) are shown.
266266 *
267267 * @param showHandler The handler that is called when slot(s) are shown.
268- * @return This {@link Builder Animation builder }
268+ * @return This {@link Builder}
269269 */
270270 Builder addShowHandler (BiConsumer <? super State , ? super Set <? extends Slot >> showHandler );
271271
272272 /**
273273 * Adds a handler that is called when the animation is finished.
274274 *
275275 * @param finishHandler The handler that is called when the animation is finished.
276- * @return This {@link Builder Animation builder }
276+ * @return This {@link Builder}
277277 */
278278 Builder addFinishHandler (Consumer <? super State > finishHandler );
279279
280+ /**
281+ * Sets whether the {@link Gui} that plays the animation should be frozen (i.e. not allow any interactions)
282+ * during it. Defaults to true.
283+ *
284+ * @param freezing Whether the {@link Gui} should be frozen during the animation.
285+ * @return This {@link Builder}
286+ */
287+ Builder setFreezing (boolean freezing );
288+
280289 /**
281290 * Builds the animation.
282291 *
0 commit comments