mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-24 00:51:34 +01:00
Even more annotations
This commit is contained in:
parent
5807da47a6
commit
70191e23e9
@ -39,12 +39,13 @@ public class Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Contract(value = "_, -> new", pure = true)
|
@Contract(value = "_, -> new", pure = true)
|
||||||
public @NotNull Item with(@NotNull Consumer<ItemBuilder> builderConsumer) {
|
public @NotNull Item with(@NotNull Consumer<@NotNull ItemBuilder> builderConsumer) {
|
||||||
var builder = builder();
|
var builder = builder();
|
||||||
builderConsumer.accept(builder);
|
builderConsumer.accept(builder);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Contract(pure = true)
|
||||||
public int getAmount() {
|
public int getAmount() {
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
@ -59,6 +60,7 @@ public class Item {
|
|||||||
return withAmount(intUnaryOperator.applyAsInt(amount));
|
return withAmount(intUnaryOperator.applyAsInt(amount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Contract(pure = true)
|
||||||
public @Nullable Component getDisplayName() {
|
public @Nullable Component getDisplayName() {
|
||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
@ -73,6 +75,7 @@ public class Item {
|
|||||||
return withDisplayName(componentUnaryOperator.apply(displayName));
|
return withDisplayName(componentUnaryOperator.apply(displayName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Contract(pure = true)
|
||||||
public @Nullable List<@NotNull Component> getLore() {
|
public @Nullable List<@NotNull Component> getLore() {
|
||||||
return lore;
|
return lore;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user