This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Parties
Vrekt edited this page May 29, 2020
·
2 revisions
This will probably be incomplete but will give you a pretty good idea of how things work.
If you use common sense you can find most stuff out by just checking methods within athena.party()
Or, ask me on discord @ vrekt#4387
:)
// athena.build()....
// First, register whatever class you want as your Party listener.
athena.party().registerEventListener(this);
// Next, set your character CID.
athena.party().setCharacter("CID_158_Athena_Commando_F_StarsAndStripes");
// ....
// Now add your event listeners, don't forget your @PartyEvent
@PartyEvent
public void onPing(PartyPingEvent event) throws Exception {
event.joinParty();
}
@PartyEvent
public void onMemberJoined(PartyMemberJoinedEvent event) {
if (event.displayName().equalsIgnoreCase(athena.displayName())) {
// we joined!
event.party().chat().sendMessage("Hey!");
}
}
athena.party().createParty(PartyPrivacy.PUBLIC);
athena.party().invite("accountId");
athena.party().setCharacter("CID_158_Athena_Commando_F_StarsAndStripes");
athena.party().setCharacter("character ID");
athena.party().setContrail("contrail ID");
athena.party().setBackpack("backpack ID");
athena.party().setPickaxe("pickaxe ID");
athena.party().setBanner("iconId", "colorId", seasonLevelNumber);
athena.party().setReadiness(GameReadiness.READY);
athena.party().setReadiness(GameReadiness.NOT_READY);
etc...
athena.party().setInputType(Input.KEYBOARD_AND_MOUSE);
athena.party().setBattlePass(true, 100, 100, 100);
athena.party().setPlaylist("Playlist_PlaygroundV2", "", "", "NAE");
athena.party().setCustomKey("CustomKey");
athena.party().setSquadFill(true);
You can find the list of events here.
Not all events are listed in this example.
// make sure you have this
// ... athena.party().registerEventListener(this);
@PartyEvent
public void onPing(PartyPingEvent event) {
// join the party
// its best to use ping bc its always gonna fire
// invite only fires once
event.joinParty();
}
@PartyEvent
public void onMemberJoined(PartyMemberJoinedEvent event) {
System.err.println("Member: " + event.displayName() + " joined.");
}
@PartyEvent
public void onMemberLeft(PartyMemberLeftEvent event) {
System.err.println("Member: " + event.accountId() + " left.");
}
@PartyEvent
public void onMemberUpdated(PartyMemberUpdatedEvent event) {
final var party = event.party();
// invoked when a member changes something about them like their cosmetics, readying up, etc.
}
@PartyEvent
public void onMemberPromoted(PartyMemberNewCaptainEvent event) {
if (event.localAccountPromoted()) {
// we were promoted, lets kick everybody because why not
event.party().kickAll();
// change stuff
event.party().setPlaylist("Playlist_PlaygroundV2");
event.party().setCustomKey("Hey");
}
}
@PartyEvent
public void onPartyUpdated(PartyUpdatedEvent event) {
// do something
}