Commits
Y2K_ authored and md_5 committed 3d4295ccbf0
1 + | package org.bukkit.inventory.view.builder; |
2 + | |
3 + | import org.bukkit.entity.HumanEntity; |
4 + | import org.bukkit.inventory.InventoryView; |
5 + | import org.jetbrains.annotations.ApiStatus; |
6 + | import org.jetbrains.annotations.NotNull; |
7 + | |
8 + | /** |
9 + | * Generic Builder for InventoryView's with no special attributes or parameters |
10 + | * |
11 + | * @param <V> the type of InventoryView created from this builder |
12 + | */ |
13 + | Experimental | .
14 + | public interface InventoryViewBuilder<V extends InventoryView> { |
15 + | |
16 + | /** |
17 + | * Makes a copy of this builder |
18 + | * |
19 + | * @return a copy of this builder |
20 + | */ |
21 + | |
22 + | InventoryViewBuilder<V> copy(); |
23 + | |
24 + | /** |
25 + | * Sets the title of the builder |
26 + | * |
27 + | * @param title the title |
28 + | * @return this builder |
29 + | */ |
30 + | |
31 + | InventoryViewBuilder<V> title( final String title); |
32 + | |
33 + | /** |
34 + | * Builds this builder into a InventoryView |
35 + | * |
36 + | * @param player the player to assign to the view |
37 + | * @return the created InventoryView |
38 + | */ |
39 + | |
40 + | V build( final HumanEntity player); |
41 + | } |