From a20f7d1f2242aedcf54f5c2b8ebeca9a1d81fd93 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Tue, 30 Jan 2024 22:15:17 +0100 Subject: Add /pd short command for party disband (#962) Added /pd short command for party disband. #962 --- src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 1 + .../hannibal2/skyhanni/config/features/commands/CommandsConfig.java | 2 +- .../java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index d6f3d2fbd..a2820fbfc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -413,6 +413,7 @@ object Commands { registerCommand("pk", "Kick a specific party member") { PartyCommands.kick(it) } registerCommand("pt", "Transfer the party to another party member") { PartyCommands.transfer(it) } registerCommand("pp", "Promote a specific party member") { PartyCommands.promote(it) } + registerCommand("pd", "Disbands the party") { PartyCommands.disband() } } private fun commandHelp(args: Array) { diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java index f6ff5ade2..4003cfb99 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/commands/CommandsConfig.java @@ -19,7 +19,7 @@ public class CommandsConfig { public FandomWikiCommandConfig fandomWiki = new FandomWikiCommandConfig(); @ConfigOption(name = "Party Commands", desc = "Shortens party commands and allows tab-completing for them. " + - "\n§eCommands: /pt /pp /pko /pk §7SkyBlock command §e/pt §7to check the play time still works.") + "\n§eCommands: /pt /pp /pko /pk /pd §7SkyBlock command §e/pt §7to check the play time still works.") @Expose @ConfigEditorBoolean @FeatureToggle diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt index 79df780db..5f3217cdf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt @@ -17,6 +17,12 @@ object PartyCommands { LorenzUtils.sendCommandToServer("party kickoffline") } + fun disband() { + if (!config.shortCommands) return + if (PartyAPI.partyMembers.isEmpty()) return + LorenzUtils.sendCommandToServer("party disband") + } + fun warp() { if (!config.shortCommands) return if (PartyAPI.partyMembers.isEmpty()) return -- cgit