use of net.minecraft.client.gui.GuiOptions in project Almura by AlmuraDev.
the class SimpleIngameMenu method onButtonClick.
@Subscribe
public void onButtonClick(UIButton.ClickEvent event) throws IOException, URISyntaxException {
switch(event.getComponent().getName().toLowerCase(Locale.ENGLISH)) {
case "button.back":
this.close();
break;
case "button.shop":
Desktop.getDesktop().browse(new URI(GuiConfig.Url.SHOP));
break;
case "button.guide":
if (this.mc.player != null) {
this.close();
}
break;
case "button.instance":
Desktop.getDesktop().browse(new URI(GuiConfig.Url.MAP));
break;
case "button.statistics":
Desktop.getDesktop().browse(new URI(GuiConfig.Url.STATISTICS));
break;
case "button.advancements":
close();
if (this.mc.player != null) {
this.mc.displayGuiScreen(new GuiScreenAdvancements(this.mc.player.connection.getAdvancementManager()));
}
break;
case "button.forums":
Desktop.getDesktop().browse(new URI(GuiConfig.Url.FORUM));
break;
case "button.lan":
this.mc.displayGuiScreen(new GuiShareToLan(this));
break;
case "button.options":
this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
break;
case "button.quit":
close();
this.mc.world.sendQuittingDisconnectingPacket();
this.mc.loadWorld(null);
this.mc.displayGuiScreen(new GuiMainMenu());
break;
}
}
Aggregations