mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-19 09:06:21 +01:00
Annotation style
This commit is contained in:
parent
5a5531723c
commit
81f2127a9d
@ -114,7 +114,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo
|
|||||||
* @param itemStacks items to add
|
* @param itemStacks items to add
|
||||||
* @return list of itemstacks that could not be successfully fully added, empty list otherwise
|
* @return list of itemstacks that could not be successfully fully added, empty list otherwise
|
||||||
*/
|
*/
|
||||||
public List<ItemStack> addItemStacks(@NotNull List<ItemStack> itemStacks) {
|
public @NotNull List<ItemStack> addItemStacks(@NotNull List<ItemStack> itemStacks) {
|
||||||
List<ItemStack> result = new ArrayList<>();
|
List<ItemStack> result = new ArrayList<>();
|
||||||
itemStacks.forEach(itemStack -> {
|
itemStacks.forEach(itemStack -> {
|
||||||
if (!addItemStack(itemStack)) {
|
if (!addItemStack(itemStack)) {
|
||||||
@ -212,7 +212,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo
|
|||||||
* @param itemStacks items to take
|
* @param itemStacks items to take
|
||||||
* @return list of itemstacks that could not be successfully fully taken, empty list otherwise
|
* @return list of itemstacks that could not be successfully fully taken, empty list otherwise
|
||||||
*/
|
*/
|
||||||
public List<ItemStack> takeItemStacks(@NotNull List<ItemStack> itemStacks) {
|
public @NotNull List<ItemStack> takeItemStacks(@NotNull List<ItemStack> itemStacks) {
|
||||||
List<ItemStack> result = new ArrayList<>();
|
List<ItemStack> result = new ArrayList<>();
|
||||||
itemStacks.forEach(itemStack -> {
|
itemStacks.forEach(itemStack -> {
|
||||||
if (!takeItemStack(itemStack)) {
|
if (!takeItemStack(itemStack)) {
|
||||||
@ -280,8 +280,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo
|
|||||||
* @param slot the slot to check
|
* @param slot the slot to check
|
||||||
* @return the item in the slot {@code slot}
|
* @return the item in the slot {@code slot}
|
||||||
*/
|
*/
|
||||||
@NotNull
|
public @NotNull ItemStack getItemStack(int slot) {
|
||||||
public ItemStack getItemStack(int slot) {
|
|
||||||
return itemStacks[slot];
|
return itemStacks[slot];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,8 +292,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo
|
|||||||
*
|
*
|
||||||
* @return an array containing all the inventory's items
|
* @return an array containing all the inventory's items
|
||||||
*/
|
*/
|
||||||
@NotNull
|
public @NotNull ItemStack[] getItemStacks() {
|
||||||
public ItemStack[] getItemStacks() {
|
|
||||||
return itemStacks.clone();
|
return itemStacks.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,8 +319,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo
|
|||||||
*
|
*
|
||||||
* @return a modifiable {@link List} containing all the inventory conditions
|
* @return a modifiable {@link List} containing all the inventory conditions
|
||||||
*/
|
*/
|
||||||
@NotNull
|
public @NotNull List<InventoryCondition> getInventoryConditions() {
|
||||||
public List<InventoryCondition> getInventoryConditions() {
|
|
||||||
return inventoryConditions;
|
return inventoryConditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user