Class BukkitClickType
java.lang.Object
me.hsgamer.hscore.bukkit.clicktype.BukkitClickType
- All Implemented Interfaces:
MinecraftClickType
MinecraftClickType
for Bukkit-
Constructor Summary
ConstructorDescriptionBukkitClickType
(@NotNull org.bukkit.event.inventory.ClickType clickType) New click typeBukkitClickType
(@NotNull org.bukkit.event.inventory.ClickType clickType, int hotbarSlot) New click type -
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull org.bukkit.event.inventory.ClickType
Get the original click typeint
Get the hotbar slot (0-8) of the click type if it is number clickgetName()
Get the name of the click typeboolean
Check if the click type is left clickboolean
Check if the click type is number clickboolean
Check if the click type is right clickboolean
Check if the click type is shift click
-
Constructor Details
-
BukkitClickType
public BukkitClickType(@NotNull @NotNull org.bukkit.event.inventory.ClickType clickType, int hotbarSlot) New click type- Parameters:
clickType
- the original click typehotbarSlot
- the slot
-
BukkitClickType
public BukkitClickType(@NotNull @NotNull org.bukkit.event.inventory.ClickType clickType) New click type- Parameters:
clickType
- the original click type
-
-
Method Details
-
getBukkitClickType
@NotNull public final @NotNull org.bukkit.event.inventory.ClickType getBukkitClickType()Get the original click type- Returns:
- the Bukkit's click type
-
getName
Description copied from interface:MinecraftClickType
Get the name of the click type- Specified by:
getName
in interfaceMinecraftClickType
- Returns:
- the name
-
isLeftClick
public boolean isLeftClick()Description copied from interface:MinecraftClickType
Check if the click type is left click- Specified by:
isLeftClick
in interfaceMinecraftClickType
- Returns:
- true if it is
-
isRightClick
public boolean isRightClick()Description copied from interface:MinecraftClickType
Check if the click type is right click- Specified by:
isRightClick
in interfaceMinecraftClickType
- Returns:
- true if it is
-
isShiftClick
public boolean isShiftClick()Description copied from interface:MinecraftClickType
Check if the click type is shift click- Specified by:
isShiftClick
in interfaceMinecraftClickType
- Returns:
- true if it is
-
isNumberClick
public boolean isNumberClick()Description copied from interface:MinecraftClickType
Check if the click type is number click- Specified by:
isNumberClick
in interfaceMinecraftClickType
- Returns:
- true if it is
-
getHotbarSlot
public int getHotbarSlot()Description copied from interface:MinecraftClickType
Get the hotbar slot (0-8) of the click type if it is number click- Specified by:
getHotbarSlot
in interfaceMinecraftClickType
- Returns:
- the number, -1 if it is not number click or undefined
-