Bukkit PlayerInteractEvent?

1 Antwort

Probier mal das:

@EventHandler
public void inSpecClick(PlayerInteractEntityEvent e){
if(e.getRightClicked() instanceof Player){
Player p = e.getPlayer();
if(p.getGameMode()== GameMode.SPECTATOR){
Player clicked = (Player) e.getRightClicked();
Inventory inv = clicked.getInventory();
p.openInventory(inv);
}


}
}



Was möchtest Du wissen?