Skip to content

Commit

Permalink
fix: not everything committed
Browse files Browse the repository at this point in the history
  • Loading branch information
StillLutto committed Dec 25, 2024
1 parent 482ada3 commit 44e6ecf
Show file tree
Hide file tree
Showing 30 changed files with 330 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object CommandAdapter {
private fun handleCommandFunctions(command: AbstractStellarCommand<*>, brigadierCommand: ArgumentBuilder<CommandListenerWrapper, *>) {
if (command.executions.isNotEmpty() || command.executions.isNotEmpty())
brigadierCommand.executes { context ->
BrigadierCommandHelper.handleExecutions(command, context)
sync {
BrigadierCommandHelper.handleExecutions(command, context)
}
1
}
brigadierCommand.requires { source ->
Expand Down Expand Up @@ -57,13 +59,15 @@ object CommandAdapter {

private fun handleGreedyStringWordFunctions(argument: PhraseArgument, argumentBuilder: RequiredArgumentBuilder<CommandListenerWrapper, *>) {
argumentBuilder.executes { context ->
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)
sync {
val greedyContext = CommandContextAdapter.getGreedyCommandContext(context)

for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
for (i in greedyContext.arguments.indices) {
val word = argument.words[i] ?: continue
for (runnable in word.runnables) runnable(greedyContext)
if (i == greedyContext.arguments.lastIndex)
for (execution in word.executions) execution(greedyContext)
}
}
Command.SINGLE_SUCCESS
}
Expand Down
Loading

0 comments on commit 44e6ecf

Please sign in to comment.