diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-01-30 22:15:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 22:15:17 +0100 |
commit | a20f7d1f2242aedcf54f5c2b8ebeca9a1d81fd93 (patch) | |
tree | 22f292d1117140fc3b696663e26741e6643a29c1 /src/main | |
parent | 51fc65a4b2632fee56d452c8839f936c1ba2ab3c (diff) | |
download | skyhanni-a20f7d1f2242aedcf54f5c2b8ebeca9a1d81fd93.tar.gz skyhanni-a20f7d1f2242aedcf54f5c2b8ebeca9a1d81fd93.tar.bz2 skyhanni-a20f7d1f2242aedcf54f5c2b8ebeca9a1d81fd93.zip |
Add /pd short command for party disband (#962)
Added /pd short command for party disband. #962
Diffstat (limited to 'src/main')
3 files changed, 8 insertions, 1 deletions
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<String>) { 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 |