File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
adventure/src/main/java/me/flame/menus/adventure Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 7
7
import org .bukkit .inventory .ItemStack ;
8
8
import org .bukkit .inventory .meta .ItemMeta ;
9
9
10
+ import org .jetbrains .annotations .Contract ;
10
11
import org .jetbrains .annotations .NotNull ;
11
12
12
13
import java .util .ArrayList ;
@@ -19,13 +20,18 @@ public class Lore implements Iterable<TextHolder> {
19
20
private final ItemMeta meta ;
20
21
private final List <TextHolder > lore ;
21
22
22
- private static final Lore EMPTY = new Lore (null );
23
+ private static final Lore EMPTY = new Lore (( ItemMeta ) null );
23
24
private static final List <TextHolder > EMPTY_LORE = new ArrayList <>(0 );
24
25
25
26
public Lore (ItemMeta meta ) {
26
27
this .meta = meta ;
27
28
this .lore = (CompHolder .isNativeAdventureSupport ()) ? lore (meta ) : getLore (meta );
28
29
}
30
+ @ Contract (pure = true )
31
+ public Lore (@ NotNull Lore lore ) {
32
+ this .meta = lore .meta ;
33
+ this .lore = lore .lore ;
34
+ }
29
35
30
36
private static @ NotNull List <TextHolder > lore (ItemMeta meta ) {
31
37
if (meta == null || !meta .hasLore ()) return EMPTY_LORE ;
You can’t perform that action at this time.
0 commit comments