ShadowKALler7
Member
I am trying to create a gui for when a player left or right clicks a compass, I created a var for the gui and stuff but can't get a way to create the gui? Thank you!
Code:
@EventHandler
public void onLeftClickBlockCompass(PlayerInteractEvent e){
Player p = e.getPlayer();
if (e.getAction().equals(Action.LEFT_CLICK_BLOCK)){
if (p.getInventory().getItemInHand().equals(compass)){
// I want to open the GUI here. Thank you!!
}
}
Code:
@EventHandler
public void onLeftClickBlockCompass(PlayerInteractEvent e){
Player p = e.getPlayer();
if (e.getAction().equals(Action.LEFT_CLICK_BLOCK)){
if (p.getInventory().getItemInHand().equals(compass)){
// I want to open the GUI here. Thank you!!
}
}