Class AmmunitionUtil
java.lang.Object
com.github.imdabigboss.easydatapack.api.utils.AmmunitionUtil
Some utilities for ammunition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanusePlayerAmo(@NonNull org.bukkit.entity.Player player, int customModelData)Checks if a player has an item with the given custom model data and removes one from the player's inventory.static booleanusePlayerAmo(@NonNull org.bukkit.entity.Player player, @NonNull org.bukkit.Material material)Checks if a player has an item with the given material and removes one from the player's inventory.
-
Constructor Details
-
AmmunitionUtil
public AmmunitionUtil()
-
-
Method Details
-
usePlayerAmo
public static boolean usePlayerAmo(@NonNull org.bukkit.entity.Player player, int customModelData)Checks if a player has an item with the given custom model data and removes one from the player's inventory.- Parameters:
player- the playercustomModelData- the custom model data- Returns:
- true if the player had the item, false otherwise
-
usePlayerAmo
public static boolean usePlayerAmo(@NonNull org.bukkit.entity.Player player, @NonNull org.bukkit.Material material)Checks if a player has an item with the given material and removes one from the player's inventory.- Parameters:
player- the playermaterial- the material- Returns:
- true if the player had the item, false otherwise
-