Skip to content

Commit

Permalink
Fix double right click events
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 8, 2016
1 parent 336dc57 commit 1462c82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/citizensnpcs/EventListen.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.bukkit.event.world.WorldLoadEvent;
import org.bukkit.event.world.WorldUnloadEvent;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.scoreboard.Team;

import com.google.common.base.Predicates;
Expand Down Expand Up @@ -377,7 +378,7 @@ public void onPlayerCreateNPC(PlayerCreateNPCEvent event) {
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
NPC npc = npcRegistry.getNPC(event.getRightClicked());
if (npc == null) {
if (npc == null || event.getHand() == EquipmentSlot.OFF_HAND) {
return;
}

Expand Down

0 comments on commit 1462c82

Please sign in to comment.