Search in sources :

Example 6 with Syntax

use of co.aikar.commands.annotation.Syntax in project VoxelGamesLibv2 by VoxelGamesLib.

the class EditMode method chest.

@Subcommand("chest")
@CommandPermission("%admin")
@Syntax("<name> - the name of the chest")
public void chest(@Nonnull User sender, @Nonnull String name) {
    if (editMode.contains(sender.getUuid())) {
        ItemStack chest = new ItemBuilder(Material.CHEST).name(name).build();
        sender.getPlayer().getInventory().setItemInMainHand(chest);
    } else {
        Lang.msg(sender, LangKey.EDITMODE_NOT_ENABLED);
    }
}
Also used : ItemBuilder(com.voxelgameslib.voxelgameslib.utils.ItemBuilder) ItemStack(org.bukkit.inventory.ItemStack) Subcommand(co.aikar.commands.annotation.Subcommand) Syntax(co.aikar.commands.annotation.Syntax) CommandPermission(co.aikar.commands.annotation.CommandPermission)

Aggregations

CommandPermission (co.aikar.commands.annotation.CommandPermission)6 Subcommand (co.aikar.commands.annotation.Subcommand)6 Syntax (co.aikar.commands.annotation.Syntax)6 Map (com.voxelgameslib.voxelgameslib.map.Map)3 Description (co.aikar.commands.annotation.Description)2 ItemBuilder (com.voxelgameslib.voxelgameslib.utils.ItemBuilder)2 ItemStack (org.bukkit.inventory.ItemStack)2 CommandCompletion (co.aikar.commands.annotation.CommandCompletion)1 VoxelGameLibException (com.voxelgameslib.voxelgameslib.exception.VoxelGameLibException)1 WorldException (com.voxelgameslib.voxelgameslib.exception.WorldException)1 MapFeature (com.voxelgameslib.voxelgameslib.feature.features.MapFeature)1 SpawnFeature (com.voxelgameslib.voxelgameslib.feature.features.SpawnFeature)1 Game (com.voxelgameslib.voxelgameslib.game.Game)1 File (java.io.File)1 ZipFile (net.lingala.zip4j.core.ZipFile)1 ZipException (net.lingala.zip4j.exception.ZipException)1 World (org.bukkit.World)1 SkullMeta (org.bukkit.inventory.meta.SkullMeta)1 Skin (org.mineskin.data.Skin)1