mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-04 05:25:28 +02:00
tridents/xbows WIP part 1
This commit is contained in:
@@ -25,6 +25,11 @@ public final class ItemUtils {
|
||||
return mcMMO.getMaterialMapStore().isBow(item.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
public static boolean isCrossbow(ItemStack itemStack) {
|
||||
return mcMMO.getMaterialMapStore().isCrossbow(itemStack.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
|
||||
public static boolean hasItemInEitherHand(Player player, Material material) {
|
||||
return player.getInventory().getItemInMainHand().getType() == material || player.getInventory().getItemInOffHand().getType() == material;
|
||||
}
|
||||
@@ -39,6 +44,11 @@ public final class ItemUtils {
|
||||
return mcMMO.getMaterialMapStore().isSword(item.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
public static boolean isTrident(ItemStack itemStack) {
|
||||
return mcMMO.getMaterialMapStore().isTrident(itemStack.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the item is a hoe.
|
||||
*
|
||||
|
Reference in New Issue
Block a user