use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiButton in project Armourers-Workshop by RiskyKen.
the class GuiGlobalLibraryPanelUpload method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) {
if (button == buttonUpload) {
GameProfile gameProfile = mc.thePlayer.getGameProfile();
PlushieSession plushieSession = PlushieAuth.PLUSHIE_SESSION;
if (!plushieSession.isAuthenticated()) {
JsonObject jsonObject = PlushieAuth.updateAccessToken(gameProfile.getName(), gameProfile.getId().toString());
plushieSession.authenticate(jsonObject);
}
if (!plushieSession.isAuthenticated()) {
ModLogger.log(Level.ERROR, "Authentication failed.");
return;
}
MessageClientGuiButton message = new MessageClientGuiButton((byte) 0);
PacketHandler.networkWrapper.sendToServer(message);
}
}
use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiButton in project Armourers-Workshop by RiskyKen.
the class GuiTabArmourerDisplaySettings method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) {
if (button.id == 8) {
String username = textUserSkin.getText().trim();
PacketHandler.networkWrapper.sendToServer(new MessageClientGuiSetSkin(new PlayerTexture(username, TextureType.values()[textureTypeList.getListSelectedIndex()])));
} else {
PacketHandler.networkWrapper.sendToServer(new MessageClientGuiButton((byte) button.id));
}
}
use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiButton in project Armourers-Workshop by RiskyKen.
the class GuiColourMixer method onDropDownListChanged.
@Override
public void onDropDownListChanged(GuiDropDownList dropDownList) {
if (dropDownList == colourFamilyList) {
ColourFamily cf = ColourFamily.values()[dropDownList.getListSelectedIndex()];
colourSelector.setColourFamily(cf);
MessageClientGuiButton message = new MessageClientGuiButton((byte) cf.ordinal());
PacketHandler.networkWrapper.sendToServer(message);
}
if (dropDownList == paintTypeDropDown) {
updateColour();
}
}
Aggregations