MassiveCore - Skip Off Hand Interact Test 1
This commit is contained in:
parent
0af84a6193
commit
2d8f10eb00
@ -8,6 +8,8 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockMultiPlaceEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import com.massivecraft.massivecore.collections.MassiveSet;
|
||||
@ -174,7 +176,7 @@ public abstract class Engine implements Active, Listener, Runnable
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// UTIL
|
||||
// IS FAKE
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static final PredicateStartsWithIgnoreCase STARTING_WITH_FAKE = PredicateStartsWithIgnoreCase.get("fake");
|
||||
@ -191,4 +193,20 @@ public abstract class Engine implements Active, Listener, Runnable
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// IS OFF HAND
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static boolean isOffHand(PlayerInteractEntityEvent event)
|
||||
{
|
||||
try
|
||||
{
|
||||
return event.getHand() == org.bukkit.inventory.EquipmentSlot.OFF_HAND;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user