mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-24 00:51:34 +01:00
Annotation cleanup
This commit is contained in:
parent
bba9c70586
commit
aac32420de
@ -13,7 +13,7 @@ public interface TransactionOption<T> {
|
|||||||
* <p>
|
* <p>
|
||||||
* The remaining, can be air.
|
* The remaining, can be air.
|
||||||
*/
|
*/
|
||||||
TransactionOption<@NotNull ItemStack> ALL = (inventory, result, itemChangesMap) -> {
|
TransactionOption<ItemStack> ALL = (inventory, result, itemChangesMap) -> {
|
||||||
itemChangesMap.forEach(inventory::safeItemInsert);
|
itemChangesMap.forEach(inventory::safeItemInsert);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@ -23,7 +23,7 @@ public interface TransactionOption<T> {
|
|||||||
* <p>
|
* <p>
|
||||||
* Returns true if the item has been added, false if nothing changed.
|
* Returns true if the item has been added, false if nothing changed.
|
||||||
*/
|
*/
|
||||||
TransactionOption<@NotNull Boolean> ALL_OR_NOTHING = (inventory, result, itemChangesMap) -> {
|
TransactionOption<Boolean> ALL_OR_NOTHING = (inventory, result, itemChangesMap) -> {
|
||||||
if (result.isAir()) {
|
if (result.isAir()) {
|
||||||
// Item can be fully placed inside the inventory, do so
|
// Item can be fully placed inside the inventory, do so
|
||||||
itemChangesMap.forEach(inventory::safeItemInsert);
|
itemChangesMap.forEach(inventory::safeItemInsert);
|
||||||
@ -39,7 +39,7 @@ public interface TransactionOption<T> {
|
|||||||
* <p>
|
* <p>
|
||||||
* Returns true if the item can be fully added, false otherwise.
|
* Returns true if the item can be fully added, false otherwise.
|
||||||
*/
|
*/
|
||||||
TransactionOption<@NotNull Boolean> DRY_RUN = (inventory, result, itemChangesMap) -> result.isAir();
|
TransactionOption<Boolean> DRY_RUN = (inventory, result, itemChangesMap) -> result.isAir();
|
||||||
|
|
||||||
@NotNull T fill(@NotNull AbstractInventory inventory,
|
@NotNull T fill(@NotNull AbstractInventory inventory,
|
||||||
@NotNull ItemStack result,
|
@NotNull ItemStack result,
|
||||||
|
@ -12,6 +12,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Represents a type of transaction that you can apply to an {@link AbstractInventory}.
|
* Represents a type of transaction that you can apply to an {@link AbstractInventory}.
|
||||||
*/
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
public interface TransactionType {
|
public interface TransactionType {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user