use of me.botsko.prism.wands.ProfileWand in project Prism-Bukkit by prism.
the class PrismPlayerEvents method onPlayerEntityInteract.
/**
*
* @param event
*/
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerEntityInteract(final PlayerInteractEntityEvent event) {
final Player player = event.getPlayer();
final Entity entity = event.getRightClicked();
// Are they using a wand?
if (Prism.playersWithActiveTools.containsKey(player.getName())) {
// Pull the wand in use
final Wand wand = Prism.playersWithActiveTools.get(player.getName());
if (wand != null && wand instanceof ProfileWand) {
wand.playerRightClick(player, entity);
// Always cancel
event.setCancelled(true);
}
}
}
Aggregations