Comments for the inventories classes

This commit is contained in:
themode 2020-10-14 16:41:36 +02:00
parent bf0ec9f133
commit 3663a292f1
4 changed files with 16 additions and 7 deletions

View File

@ -8,6 +8,9 @@ public class MojangAuth {
@Getter
private static boolean usingMojangAuth = false;
/**
* Enable mojang authentication on the server.
*/
public static void init() {
if (MinecraftServer.getNettyServer().getAddress() == null) {
usingMojangAuth = true;

View File

@ -29,6 +29,12 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Represents an inventory which can be viewed by a collection of {@link Player}.
* <p>
* You can create one with {@link Inventory#Inventory(InventoryType, String)} or by making your own subclass.
* It can then be opened using {@link Player#openInventory(Inventory)}.
*/
public class Inventory implements InventoryModifier, InventoryClickHandler, Viewable {
// incremented each time an inventory is created (used in the window packets)

View File

@ -27,7 +27,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import static net.minestom.server.utils.inventory.PlayerInventoryUtils.*;
/**
* Represents the inventory of a {@link Player}.
* Represents the inventory of a {@link Player}, retrieved with {@link Player#getInventory()}.
*/
public class PlayerInventory implements InventoryModifier, InventoryClickHandler, EquipmentHandler {

View File

@ -607,7 +607,7 @@ public class ItemStack implements DataContainer {
}
/**
* Find the item meta based on the material type
* Find the {@link ItemMeta} based on the material type
*
* @return the item meta
*/
@ -680,7 +680,7 @@ public class ItemStack implements DataContainer {
// Callback events
/**
* Called when the player right clicks with this item
* Called when the player right clicks with this item.
*
* @param player the player who used the item
* @param hand the hand used
@ -689,7 +689,7 @@ public class ItemStack implements DataContainer {
}
/**
* Called when the player left clicks with this item
* Called when the player left clicks with this item.
*
* @param player the player who used the item
* @param hand the hand used
@ -698,7 +698,7 @@ public class ItemStack implements DataContainer {
}
/**
* Called when the player right clicks with this item on a block
* Called when the player right clicks with this item on a block.
*
* @param player the player who used the item
* @param hand the hand used
@ -711,9 +711,9 @@ public class ItemStack implements DataContainer {
}
/**
* Called when the player click on this item on an inventory
* Called when the player click on this item on an inventory.
* <p>
* Executed before any events
* Executed before any events.
*
* @param player the player who clicked on the item
* @param clickType the click type