aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/GuildOfCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-10-20 11:57:50 -0400
committerGitHub <noreply@github.com>2020-10-20 11:57:50 -0400
commit5c5ffdbd4379d4c5002cd42c297f90e631566006 (patch)
tree1f203e2c7506697efe5efc326d95567bd7e958a0 /src/main/java/me/Danker/commands/GuildOfCommand.java
parent20b405f59dcd92df1b4c3cd5b9ac353652ef4405 (diff)
parent1635fe604e6ca2d32d96409165fcc298f1c5b067 (diff)
downloadSkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.tar.gz
SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.tar.bz2
SkyblockMod-5c5ffdbd4379d4c5002cd42c297f90e631566006.zip
1.8v1.8
Merge pull request #22 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/commands/GuildOfCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/GuildOfCommand.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/GuildOfCommand.java b/src/main/java/me/Danker/commands/GuildOfCommand.java
index 238ba81..be804c1 100644
--- a/src/main/java/me/Danker/commands/GuildOfCommand.java
+++ b/src/main/java/me/Danker/commands/GuildOfCommand.java
@@ -26,7 +26,7 @@ public class GuildOfCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return getCommandName() + " [name]";
+ return "/" + getCommandName() + " [name]";
}
@Override
@@ -83,12 +83,14 @@ public class GuildOfCommand extends CommandBase {
String guildName = "N/A";
String guildMaster = "N/A";
+ int players = 0;
// Check if player is in guild
if (!guildResponse.get("guild").isJsonNull()) {
guildName = guildResponse.get("guild").getAsJsonObject().get("name").getAsString();
// Loop through members to find guildmaster
JsonArray guildMembers = guildResponse.get("guild").getAsJsonObject().get("members").getAsJsonArray();
+ players = guildMembers.size();
for (JsonElement member : guildMembers) {
JsonObject memberObject = member.getAsJsonObject();
String memberRank = memberObject.get("rank").getAsString();
@@ -109,6 +111,7 @@ public class GuildOfCommand extends CommandBase {
EnumChatFormatting.AQUA + " " + username + "'s Guild:\n" +
EnumChatFormatting.GREEN + " Guild: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + guildName + "\n" +
EnumChatFormatting.GREEN + " Guildmaster: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + guildMaster + "\n" +
+ EnumChatFormatting.GREEN + " Members: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + players + "\n" +
EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------"));
}).start();
}