aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java13
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java4
3 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java
index 8299020c..aa9a9ef8 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java
@@ -255,6 +255,18 @@ public class CommandDungeonsGuide extends CommandBase {
} catch (Throwable t) {
t.printStackTrace();
}
+ } else if (args[0].equalsIgnoreCase("pvall")) {
+ PartyManager.INSTANCE.getRunOnMembersReceived().add((e) -> {
+ for (String s : e) {
+ ApiFetchur.fetchUUIDAsync(s)
+ .thenAccept(a -> {
+ if (a == null) return;
+ ApiFetchur.fetchMostRecentProfileAsync(a.get(), FeatureRegistry.PARTYKICKER_APIKEY.getAPIKey());
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e"+s+"§f's Profile ").appendSibling(new ChatComponentText("§7view").setChatStyle(new ChatStyle().setChatHoverEvent(new FeatureViewPlayerOnJoin.HoverEventRenderPlayer(a.orElse(null))))));
+ });
+ }
+ });
+ PartyManager.INSTANCE.requestPartyRetrieval();
// } else if (args[0].equals("fixschematic")) {
// File root = new File(e.getDungeonsGuide().getConfigDir(), "schematics");
// Method method = null;
@@ -400,6 +412,7 @@ public class CommandDungeonsGuide extends CommandBase {
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg asktojoin or /dg atj §7-§f Toggle ask to join §cRequires Discord Rich Presence enabled. (/dg -> Advanced)"));
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg partymax [number] or /dg pm [number] §7-§f Sets partymax §7(maximum amount people in party, for discord rpc)"));
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg pv [ign] §7-§f Profile Viewer"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg pvall §7-§f Profile Viewer For all people on party"));
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg purge §7-§f Purge api cache."));
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg saverun §7-§f Save run to be sent to developer."));
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java
index 517195bd..9ffe0217 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java
@@ -463,7 +463,6 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen
if (str.contains("§r§ejoined the dungeon group! (§r§b")) {
String username = TextUtils.stripColor(str).split(" ")[3];
if (username.equalsIgnoreCase(Minecraft.getMinecraft().getSession().getUsername())) {
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/pl");
PartyManager.INSTANCE.getRunOnMembersReceived().add((e) -> {
for (String s : e) {
ApiFetchur.fetchUUIDAsync(s)
@@ -474,6 +473,7 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen
});
}
});
+ PartyManager.INSTANCE.requestPartyRetrieval();
} else {
ApiFetchur.fetchUUIDAsync(username)
.thenAccept(a -> {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
index 181d66cb..eaebc433 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
@@ -388,6 +388,10 @@ public class PartyManager implements StompMessageHandler {
sendChat.add(new Tuple<>("/pl", () -> {partyJoin = 1;}));
}
+ public void requestPartyRetrieval() {
+ sendChat.add(new Tuple<>("/pl", () -> {partyJoin = 1;}));
+ }
+
private int checkPlayer = 0;
private JSONObject theObject;
private long minimumNext = 0;