mock command API

This commit is contained in:
dfsek
2021-03-07 23:44:19 -07:00
parent c44d26cc18
commit 0d58201e3f
14 changed files with 301 additions and 9 deletions
@@ -0,0 +1,13 @@
package com.dfsek.terra.commands;
import com.dfsek.terra.api.command.CommandTemplate;
import com.dfsek.terra.api.command.ExecutionState;
import com.dfsek.terra.api.command.annotation.Command;
@Command()
public class ReloadCommand implements CommandTemplate {
@Override
public void execute(ExecutionState state) {
}
}
@@ -0,0 +1,29 @@
package com.dfsek.terra.commands;
import com.dfsek.terra.api.command.CommandTemplate;
import com.dfsek.terra.api.command.ExecutionState;
import com.dfsek.terra.api.command.annotation.Command;
import com.dfsek.terra.api.command.annotation.Subcommand;
import com.dfsek.terra.commands.structure.StructureExportCommand;
import com.dfsek.terra.commands.structure.StructureLoadCommand;
@Command(
subcommands = {
@Subcommand(
clazz = StructureExportCommand.class,
value = "export",
aliases = "ex"
),
@Subcommand(
clazz = StructureLoadCommand.class,
value = "load",
aliases = "ld"
)
}
)
public class StructureCommand implements CommandTemplate {
@Override
public void execute(ExecutionState state) {
}
}
@@ -0,0 +1,13 @@
package com.dfsek.terra.commands.structure;
import com.dfsek.terra.api.command.CommandTemplate;
import com.dfsek.terra.api.command.ExecutionState;
import com.dfsek.terra.api.command.annotation.Command;
@Command
public class StructureExportCommand implements CommandTemplate {
@Override
public void execute(ExecutionState state) {
}
}
@@ -0,0 +1,25 @@
package com.dfsek.terra.commands.structure;
import com.dfsek.terra.api.command.CommandTemplate;
import com.dfsek.terra.api.command.ExecutionState;
import com.dfsek.terra.api.command.annotation.Command;
import com.dfsek.terra.api.command.annotation.Flag;
@Command(
flags = {
@Flag(value = "rotation",
defaultValue = "0",
shorthand = "r"
),
@Flag(value = "load",
defaultValue = "FULL",
shorthand = "l"
)
}
)
public class StructureLoadCommand implements CommandTemplate {
@Override
public void execute(ExecutionState state) {
}
}