mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Reworked and fixed isDust and isWand check #2
This commit is contained in:
parent
3e5efd4090
commit
cee6c7c999
@ -319,11 +319,12 @@ public class WandManager implements Listener {
|
|||||||
public static boolean isWand(Player p)
|
public static boolean isWand(Player p)
|
||||||
{
|
{
|
||||||
ItemStack is = p.getInventory().getItemInMainHand();
|
ItemStack is = p.getInventory().getItemInMainHand();
|
||||||
return is != null && is.equals(wand);
|
return is != null && isWand(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isWand(ItemStack is)
|
public static boolean isWand(ItemStack is)
|
||||||
{
|
{
|
||||||
|
ItemStack wand = createWand();
|
||||||
if (is.getItemMeta() == null) return false;
|
if (is.getItemMeta() == null) return false;
|
||||||
return is.getType().equals(wand.getType()) &&
|
return is.getType().equals(wand.getType()) &&
|
||||||
is.getItemMeta().getDisplayName().equals(wand.getItemMeta().getDisplayName()) &&
|
is.getItemMeta().getDisplayName().equals(wand.getItemMeta().getDisplayName()) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user