mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 03:15:42 +00:00
Added functionality to the disband party button
This commit is contained in:
1 parent
ae43f0548d
commit
cdd3f22826
5 files changed
+35
-3
No files matched your search
@@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import tconstruct.client.tabs.InventoryTabCustomNpc;
|
||||
import tconstruct.client.tabs.TabRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
public class GuiParty extends GuiCNPCInventory implements ITextfieldListener, ITopButtonListener,ICustomScrollListener, IGuiData {
|
||||
@@ -78,6 +79,7 @@ public class GuiParty extends GuiCNPCInventory implements ITextfieldListener, IT
|
||||
playerScroll.setSize(150, 160);
|
||||
playerScroll.guiLeft = guiLeft + 5;
|
||||
playerScroll.guiTop = guiTop + 5;
|
||||
playerScroll.setList(new ArrayList<>(party.getPlayerNames()));
|
||||
this.addScroll(playerScroll);
|
||||
|
||||
//set leader button
|
||||
@@ -126,6 +128,10 @@ public class GuiParty extends GuiCNPCInventory implements ITextfieldListener, IT
|
||||
Client.sendData(EnumPacketServer.CreateParty);
|
||||
receivedData = false;
|
||||
break;
|
||||
case 335:
|
||||
Client.sendData(EnumPacketServer.DisbandParty);
|
||||
receivedData = false;
|
||||
break;
|
||||
}
|
||||
initGui();
|
||||
if (guibutton.id == 100 && activeTab != 0) {
|
||||
@@ -193,6 +199,8 @@ public class GuiParty extends GuiCNPCInventory implements ITextfieldListener, IT
|
||||
party = ClientCacheHandler.party;
|
||||
}
|
||||
party.readFromNBT(compound);
|
||||
} else if (compound.hasKey("Disband")) {
|
||||
ClientCacheHandler.party = null;
|
||||
}
|
||||
|
||||
initGui();
|
||||
|
||||
Reference in new issue
Block a user