Skip to content

Commit

Permalink
Command API Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HoshiKurama committed Sep 2, 2023
1 parent 82772c0 commit 80f85e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ class CommandAPIRunner(private val adventure: BukkitAudiences) {
replaceSuggestions(openTicketIDsAsync)
}
literalArgument(locale.parameterLiteralGroup)
multiLiteralArgument(locale.parameterLiteralGroup,lpGroupNames)
multiLiteralArgument(
nodeName = locale.parameterLiteralGroup,
*lpGroupNames.toTypedArray()
)
executeRegisterTMMessage(0) { tmSender, args, ticket ->
commandTasks.assign(tmSender,
assignment = Assignment.PermissionGroup((args[1] as String)),
Expand Down Expand Up @@ -296,7 +299,10 @@ class CommandAPIRunner(private val adventure: BukkitAudiences) {
replaceSuggestions(openTicketIDsAsync)
}
literalArgument(locale.parameterLiteralGroup)
multiLiteralArgument(locale.parameterLiteralGroup,lpGroupNames)
multiLiteralArgument(
nodeName = locale.parameterLiteralGroup,
*lpGroupNames.toTypedArray()
)
executeRegisterTMMessage(0) { tmSender, args, ticket ->
commandTasks.assign(tmSender,
assignment = Assignment.PermissionGroup((args[1] as String)),
Expand Down Expand Up @@ -734,11 +740,10 @@ class CommandAPIRunner(private val adventure: BukkitAudiences) {
argumentTicketFromIDAsync(::ticketIsOpen) {
replaceSuggestions(openTicketIDsAsync)
}
multiLiteralArgument(locale.searchPriority, listOf(
multiLiteralArgument(nodeName = locale.searchPriority,
locale.priorityLowest, locale.priorityLow, locale.priorityNormal,
locale.priorityHigh, locale.priorityHighest, "1", "2", "3", "4", "5"
))

)
executeRegisterTMMessage(0) { tmSender, args, ticket ->
commandTasks.setPriority(tmSender,
ticket = ticket,
Expand All @@ -757,10 +762,10 @@ class CommandAPIRunner(private val adventure: BukkitAudiences) {
argumentTicketFromIDAsync(::ticketIsOpen) {
replaceSuggestions(openTicketIDsAsync)
}
multiLiteralArgument(locale.searchPriority, listOf(
multiLiteralArgument(nodeName = locale.searchPriority,
locale.priorityLowest, locale.priorityLow, locale.priorityNormal,
locale.priorityHigh, locale.priorityHighest, "1", "2", "3", "4", "5"
))
)
executeRegisterTMMessage(0) { tmSender, args, ticket ->
commandTasks.setPriority(tmSender,
ticket = ticket,
Expand Down Expand Up @@ -1118,7 +1123,7 @@ class CommandAPIRunner(private val adventure: BukkitAudiences) {
commandTasks.search(tmSender,
searchParameters = args[0] as SearchConstraints,
useNewFormat = true,
newRawArgumentString = args.fullInput,
newRawArgumentString = args.fullInput(),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.github.hoshikurama.ticketmanager.common

import java.util.*

const val mainPluginVersion = "10.0.1"
const val mainPluginVersion = "10.0.0"
const val bridgePluginVersion = "3.0"

const val bukkitMetricsKey = 11033
Expand Down

0 comments on commit 80f85e6

Please sign in to comment.