diff options
author | syeyoung <cyong06@naver.com> | 2021-03-06 22:12:16 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-03-06 22:12:16 +0900 |
commit | 80d792f7de6748b1cb31f1720af563ddbe0ce2dc (patch) | |
tree | e60190aedbf853e9b798a7f6398f704ce799b684 /src/main/java/kr/syeyoung/dungeonsguide/commands | |
parent | 1da442fd77d241f563f1a57dc88ab04cc4c3cbb4 (diff) | |
download | Skyblock-Dungeons-Guide-80d792f7de6748b1cb31f1720af563ddbe0ce2dc.tar.gz Skyblock-Dungeons-Guide-80d792f7de6748b1cb31f1720af563ddbe0ce2dc.tar.bz2 Skyblock-Dungeons-Guide-80d792f7de6748b1cb31f1720af563ddbe0ce2dc.zip |
breh
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/commands')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java index 455b8930..e4291a55 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java @@ -241,6 +241,24 @@ public class CommandDungeonsGuide extends CommandBase { PartyManager.INSTANCE.toggleAllowAskToJoin(); sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fToggled Ask to join to "+(PartyManager.INSTANCE.isAllowAskToJoin() ? "§eon" : "§coff"))); } + } else if (args[0].equalsIgnoreCase("partymax") || args[0].equalsIgnoreCase("pm")) { + if (args.length == 1){ + sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fCurrent party max is §e"+PartyManager.INSTANCE.getMaxParty())); + } else if (args.length == 2) { + try { + int partyMax = Integer.parseInt(args[1]); + if (partyMax < 2) { + sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cparty max can't be smaller than 2")); + return; + } + + PartyManager.INSTANCE.setMaxParty(partyMax); + sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fSuccessfully set partymax to §e"+PartyManager.INSTANCE.getMaxParty())); + } catch (Exception e) { + sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §c"+args[1]+" is not valid number.")); + return; + } + } } else if (args[0].equals("partyid")) { sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fInternal Party id: "+PartyManager.INSTANCE.getPartyID())); } else if (args[0].equalsIgnoreCase("loc")) { |