MassiveCore - Skip Off Hand Interact Test 1

This commit is contained in:
Olof Larsson 2016-06-06 20:59:59 +02:00
parent b1907b7682
commit 011a59eb47
No known key found for this signature in database
GPG Key ID: BBEF14F97DA52474
2 changed files with 6 additions and 0 deletions

View File

@ -1669,6 +1669,9 @@ public class EngineMain extends Engine
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerInteractEntity(PlayerInteractEntityEvent event)
{
// Ignore Off Hand
if (isOffHand(event)) return;
// Gather Info
final Player player = event.getPlayer();
final Entity entity = event.getRightClicked();

View File

@ -41,6 +41,9 @@ public class EngineSpigot extends Engine
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent event)
{
// Ignore Off Hand
if (isOffHand(event)) return;
// Gather Info
final Player player = event.getPlayer();
if (MUtil.isntPlayer(player)) return;