1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-21 03:03:02 +01:00

Add Tridents/Xbows (WIP)

This commit is contained in:
nossr50
2023-04-03 17:57:33 -07:00
parent 02c5aa4628
commit 8bb50fb53c
32 changed files with 183 additions and 69 deletions

View File

@@ -22,7 +22,6 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
public final class ItemUtils {
/**
@@ -45,6 +44,10 @@ public final class ItemUtils {
return mcMMO.getMaterialMapStore().isCrossbow(item.getType().getKey().getKey());
}
public static boolean isTrident(@NotNull ItemStack item) {
return mcMMO.getMaterialMapStore().isTrident(item.getType().getKey().getKey());
}
public static boolean hasItemInEitherHand(@NotNull Player player, Material material) {
return player.getInventory().getItemInMainHand().getType() == material || player.getInventory().getItemInOffHand().getType() == material;
}