add "usage" to all commands

This commit is contained in:
dfsek
2021-03-10 15:33:38 -07:00
parent fdb2441b1a
commit bed8c561a4
13 changed files with 33 additions and 277 deletions

View File

@@ -2,9 +2,13 @@ package com.dfsek.terra.commands;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.command.CommandTemplate;
import com.dfsek.terra.api.command.annotation.Command;
import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.platform.CommandSender;
@Command(
usage = "/terra addons"
)
public class AddonsCommand implements CommandTemplate {
@Inject
private TerraPlugin main;

View File

@@ -27,7 +27,8 @@ import com.dfsek.terra.config.lang.LangUtil;
aliases = {"l"},
clazz = BiomeLocateCommand.class
)
}
},
usage = "/terra biome"
)
@WorldCommand
@PlayerCommand

View File

@@ -13,7 +13,9 @@ import com.dfsek.terra.api.platform.entity.Player;
@WorldCommand
@DebugCommand
@PlayerCommand
@Command
@Command(
usage = "/terra getblock"
)
public class GetBlockCommand implements CommandTemplate {
@Inject
private TerraPlugin main;

View File

@@ -10,7 +10,9 @@ import com.dfsek.terra.config.lang.LangUtil;
import com.dfsek.terra.config.pack.ConfigPack;
import com.dfsek.terra.config.pack.ConfigPackTemplate;
@Command
@Command(
usage = "/terra packs"
)
public class PacksCommand implements CommandTemplate {
@Inject
private TerraPlugin main;

View File

@@ -7,7 +7,9 @@ import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.platform.CommandSender;
import com.dfsek.terra.config.lang.LangUtil;
@Command()
@Command(
usage = "/terra reload"
)
public class ReloadCommand implements CommandTemplate {
@Inject
private TerraPlugin main;

View File

@@ -25,7 +25,8 @@ import com.dfsek.terra.commands.structure.StructureLoadCommand;
value = "spawn",
aliases = "s"
)
}
},
usage = "/te structure"
)
public class StructureCommand implements CommandTemplate {
@Override

View File

@@ -7,7 +7,9 @@ import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.platform.CommandSender;
import com.dfsek.terra.config.lang.LangUtil;
@Command
@Command(
usage = "/terra version"
)
public class VersionCommand implements CommandTemplate {
@Inject
private TerraPlugin main;

View File

@@ -23,7 +23,9 @@ import java.util.HashMap;
@DebugCommand
@PlayerCommand
@WorldCommand
@Command
@Command(
usage = "/terra spawn"
)
public class SpawnCommand implements CommandTemplate {
@Inject
private TerraPlugin main;

View File

@@ -5,6 +5,9 @@ import com.dfsek.terra.api.command.CommandTemplate;
import com.dfsek.terra.api.command.annotation.Argument;
import com.dfsek.terra.api.command.annotation.Command;
import com.dfsek.terra.api.command.annotation.inject.ArgumentTarget;
import com.dfsek.terra.api.command.annotation.type.DebugCommand;
import com.dfsek.terra.api.command.annotation.type.PlayerCommand;
import com.dfsek.terra.api.command.annotation.type.WorldCommand;
import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.math.vector.Location;
import com.dfsek.terra.api.platform.CommandSender;
@@ -20,12 +23,16 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@PlayerCommand
@WorldCommand
@DebugCommand
@Command(
arguments = {
@Argument(
value = "id"
)
}
},
usage = "/terra structure export <ID>"
)
public class StructureExportCommand implements CommandTemplate {
@Inject

View File

@@ -45,7 +45,8 @@ import java.util.concurrent.ThreadLocalRandom;
@Switch(value = "chunk",
aliases = "c"
)
}
},
usage = "/terra structure load [ROTATION] [-c]"
)
public class StructureLoadCommand implements CommandTemplate {
@ArgumentTarget("rotation")