use of betterquesting.client.gui.party.GuiManageParty in project BetterQuesting by Funwayguy.
the class GuiHome method onButtonPress.
private void onButtonPress(PEventButton event) {
Minecraft mc = Minecraft.getMinecraft();
IPanelButton btn = event.getButton();
if (// Exit
btn.getButtonID() == 0) {
mc.displayGuiScreen(this.parent);
} else if (// Quests
btn.getButtonID() == 1) {
mc.displayGuiScreen(new GuiQuestLines(this));
} else if (// Party
btn.getButtonID() == 2) {
IParty party = PartyManager.INSTANCE.getUserParty(QuestingAPI.getQuestingUUID(mc.player));
if (party != null) {
mc.displayGuiScreen(new GuiManageParty(this, party));
} else {
mc.displayGuiScreen(new GuiNoParty(this));
}
} else if (// Theme
btn.getButtonID() == 3) {
mc.displayGuiScreen(new GuiThemes(this));
} else if (// Editor
btn.getButtonID() == 4) {
mc.displayGuiScreen(new GuiJsonEditor(this, QuestSettings.INSTANCE.writeToNBT(new NBTTagCompound(), EnumSaveType.CONFIG), null, (NBTTagCompound value) -> {
QuestSettings.INSTANCE.readFromNBT(value, EnumSaveType.CONFIG);
PacketSender.INSTANCE.sendToServer(QuestSettings.INSTANCE.getSyncPacket());
}));
}
}
Aggregations