mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-03 23:17:48 +01:00
Comments for the inventories classes
This commit is contained in:
parent
bf0ec9f133
commit
3663a292f1
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user