party plugin: add partyinfo debug command
This commit is contained in:
@@ -37,6 +37,7 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
@@ -48,6 +49,7 @@ import net.runelite.api.Skill;
|
||||
import net.runelite.api.SoundEffectID;
|
||||
import net.runelite.api.Tile;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.CommandExecuted;
|
||||
import net.runelite.api.events.FocusChanged;
|
||||
import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
@@ -120,6 +122,10 @@ public class PartyPlugin extends Plugin implements KeyListener
|
||||
@Inject
|
||||
private ChatMessageManager chatMessageManager;
|
||||
|
||||
@Inject
|
||||
@Named("developerMode")
|
||||
boolean developerMode;
|
||||
|
||||
@Getter
|
||||
private final Map<UUID, PartyData> partyDataMap = Collections.synchronizedMap(new HashMap<>());
|
||||
|
||||
@@ -448,6 +454,23 @@ public class PartyPlugin extends Plugin implements KeyListener
|
||||
worldMapManager.removeIf(PartyWorldMapPoint.class::isInstance);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onCommandExecuted(CommandExecuted commandExecuted)
|
||||
{
|
||||
if (!developerMode || !commandExecuted.getCommand().equals("partyinfo"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
chatMessageManager.queue(QueuedMessage.builder().type(ChatMessageType.GAMEMESSAGE).value("Party " + party.getPartyId()).build());
|
||||
chatMessageManager.queue(QueuedMessage.builder().type(ChatMessageType.GAMEMESSAGE).value("Local Party " + party.getLocalPartyId()).build());
|
||||
chatMessageManager.queue(QueuedMessage.builder().type(ChatMessageType.GAMEMESSAGE).value("Local ID " + party.getLocalMember().getMemberId()).build());
|
||||
for (PartyMember partyMember : party.getMembers())
|
||||
{
|
||||
chatMessageManager.queue(QueuedMessage.builder().type(ChatMessageType.GAMEMESSAGE).value(" " + partyMember.getName() + " " + partyMember.getMemberId()).build());
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
PartyData getPartyData(final UUID uuid)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user