I tried
public boolean onItemUse(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g, float t)
{
player.openGui(harrypotterv2.instance, GuiWithButtonr.ID, world, 0, 0, 0);
return true;
}
}
0 errors, but I open anything when I right click with my item