Class BukkitCompatibility
java.lang.Object
eu.cloudnetservice.modules.npc.impl.platform.bukkit.BukkitCompatibility
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final CheckedFunction1<org.bukkit.event.player.PlayerInteractEntityEvent, org.bukkit.inventory.EquipmentSlot> private static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
GET_INTERACTION_HAND
private static final CheckedFunction1<org.bukkit.event.player.PlayerInteractEntityEvent, org.bukkit.inventory.EquipmentSlot> GET_INTERACTION_HAND
-
-
Constructor Details
-
BukkitCompatibility
private BukkitCompatibility()
-
-
Method Details
-
usedHand
@NonNull public static @NonNull org.bukkit.inventory.EquipmentSlot usedHand(@NonNull @NonNull org.bukkit.event.player.PlayerInteractEntityEvent event) Resolves the hand that triggered the given interact event. ReturnsEquipmentSlot.HANDin case the hand method doesn't exist or the hand couldn't be resolved.- Parameters:
event- the event to get the used hand from.- Returns:
- the equipment slot of the hand that triggered the given event.
- Throws:
NullPointerException- if the given interact event is null.
-