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

Partially finished merge

This commit is contained in:
nossr50
2019-08-20 11:24:47 -04:00
119 changed files with 2592 additions and 961 deletions

View File

@@ -5,6 +5,7 @@ import com.gmail.nossr50.datatypes.skills.ItemType;
import com.gmail.nossr50.mcMMO;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.FurnaceRecipe;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
@@ -114,6 +115,10 @@ public final class ItemTools {
}
}
public static boolean hasItemInEitherHand(Player player, Material material) {
return player.getInventory().getItemInMainHand().getType() == material || player.getInventory().getItemInOffHand().getType() == material;
}
/**
* Checks if the item is a sword.
*