aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-07-21 19:36:17 +0900
committersyeyoung <cyong06@naver.com>2021-07-21 19:36:17 +0900
commit8dcee01e4c0b65d80b29c9df0de011c599e5d9d0 (patch)
tree115fd00a666ef9f0f5c76ccca3f17e82478c4c1e /src/main/java/kr/syeyoung/dungeonsguide
parentd392b203a93a8897a184f75634338b7c866510f3 (diff)
downloadSkyblock-Dungeons-Guide-8dcee01e4c0b65d80b29c9df0de011c599e5d9d0.tar.gz
Skyblock-Dungeons-Guide-8dcee01e4c0b65d80b29c9df0de011c599e5d9d0.tar.bz2
Skyblock-Dungeons-Guide-8dcee01e4c0b65d80b29c9df0de011c599e5d9d0.zip
- /dg pvall
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
-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;