Why doesn't my plugin register the right click?

Co
- in Plugins
2

@EventHandler
public void on (PlayerInteractEvent e) {
Player p = e.getPlayer ();
Player runner = (player) runner;

if (e.getAction () == Action.RIGHT_CLICK_AIR | e.getAction () == Action.RIGHT_CLICK_BLOCK) {
if (p.getItemInHand (). GetType () == Material.COMPASS) {
p.setCompassTarget (runner.getLocation ());
p.sendMessage ("§bCompass is now pointing to the Runner!");
}
}
}

I do not understand why Minecraft does not take the right click. Can someone help me?

Th

https://paste.ofcode.org/

That's where the code belongs.

Not in the message itself…

Nobody wants to look at it the way it is now

ya

Maybe the listener is not registered in the main or are there errors in the console?