diff --git a/build.gradle.kts b/build.gradle.kts index a4a92c8f..bbd9c5e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,6 +23,12 @@ java { repositories { mavenCentral() + maven("https://oss.sonatype.org/content/repositories/snapshots/") { + name = "sonatypeOssSnapshots" + mavenContent { + snapshotsOnly() + } + } maven { url = uri("https://repo.papermc.io/repository/maven-public/") } } @@ -82,6 +88,7 @@ tasks { compileJava { options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000")) options.compilerArgs.add("-Xlint:all") + options.compilerArgs.add("-parameters") for (disabledLint in arrayOf("processing", "path", "fallthrough", "serial")) options.compilerArgs.add("-Xlint:$disabledLint") options.isDeprecation = true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 77f6267b..e7ad9268 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,8 @@ annotations = "24.1.0" # Cloud command system -cloud = "1.8.4" +cloud = "2.0.0-beta.1" +cloudMinecraft = "2.0.0-SNAPSHOT" # Gradle plugins shadow = "8.1.1" @@ -19,10 +20,10 @@ runPaper = "2.2.2" annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" } # Cloud command system -cloudcore = { group = "cloud.commandframework", name = "cloud-core", version.ref = "cloud" } -cloudannotations = { group = "cloud.commandframework", name = "cloud-annotations", version.ref = "cloud" } -cloudbukkit = { group = "cloud.commandframework", name = "cloud-bukkit", version.ref = "cloud" } -cloudpaper = { group = "cloud.commandframework", name = "cloud-paper", version.ref = "cloud" } +cloudcore = { group = "org.incendo", name = "cloud-core", version.ref = "cloud" } +cloudannotations = { group = "org.incendo", name = "cloud-annotations", version.ref = "cloudMinecraft" } +cloudbukkit = { group = "org.incendo", name = "cloud-bukkit", version.ref = "cloudMinecraft" } +cloudpaper = { group = "org.incendo", name = "cloud-paper", version.ref = "cloudMinecraft" } [plugins] shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BiomeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BiomeBrush.java index 308b3b4f..a1c844a3 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BiomeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BiomeBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -18,8 +18,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b biome|bio") -@CommandPermission("voxelsniper.brush.biome") +@Command(value = "brush|b biome|bio") +@Permission("voxelsniper.brush.biome") public class BiomeBrush extends AbstractBrush { private static final BiomeType DEFAULT_BIOME_TYPE = BiomeTypes.PLAINS; @@ -31,21 +31,21 @@ public void loadProperties() { this.biomeType = (BiomeType) getRegistryProperty("default-biome-type", BiomeType.REGISTRY, DEFAULT_BIOME_TYPE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.biome.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -60,7 +60,7 @@ public void onBrushList( )); } - @CommandMethod("") + @Command("") public void onBrushBiometype( final @NotNull Snipe snipe, final @NotNull @Argument("biome-type") BiomeType biomeType diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetBrush.java index c284b37d..ba6adfc4 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockCategories; import com.sk89q.worldedit.world.block.BlockType; @@ -14,8 +14,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b block_reset|blockreset|br") -@CommandPermission("voxelsniper.brush.blockreset") +@Command(value = "brush|b block_reset|blockreset|br") +@Permission("voxelsniper.brush.blockreset") public class BlockResetBrush extends AbstractBrush { private static final MaterialSet DENIED_UPDATES = MaterialSet.builder() @@ -32,7 +32,7 @@ public class BlockResetBrush extends AbstractBrush { .add(BlockTypes.COMPARATOR) .build(); - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetSurfaceBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetSurfaceBrush.java index 81dc95de..73b6042d 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetSurfaceBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/BlockResetSurfaceBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockCategories; import com.sk89q.worldedit.world.block.BlockState; @@ -27,8 +27,8 @@ * brushes. */ @RequireToolkit -@CommandMethod(value = "brush|b block_reset_surface|blockresetsurface|brs") -@CommandPermission("voxelsniper.brush.blockresetsurface") +@Command(value = "brush|b block_reset_surface|blockresetsurface|brs") +@Permission("voxelsniper.brush.blockresetsurface") public class BlockResetSurfaceBrush extends AbstractBrush { private static final MaterialSet DENIED_UPDATES = MaterialSet.builder() @@ -46,7 +46,7 @@ public class BlockResetSurfaceBrush extends AbstractBrush { .add(BlockTypes.COMPARATOR) .build(); - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CleanSnowBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CleanSnowBrush.java index 4f52449c..450757b3 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CleanSnowBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CleanSnowBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockTypes; @@ -16,27 +16,27 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b clean_snow|cleansnow|cls") -@CommandPermission("voxelsniper.brush.cleansnow") +@Command(value = "brush|b clean_snow|cleansnow|cls") +@Permission("voxelsniper.brush.cleansnow") public class CleanSnowBrush extends AbstractBrush { private boolean trueCircle; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.clean-snow.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CometBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CometBrush.java index 1c35e6b2..9ec4a3bb 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CometBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CometBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.math.BlockVector3; @@ -20,27 +20,27 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b comet|meteor|com|met") -@CommandPermission("voxelsniper.brush.comet") +@Command(value = "brush|b comet|meteor|com|met") +@Permission("voxelsniper.brush.comet") public class CometBrush extends AbstractBrush { private boolean useBigBalls; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.comet.info")); } - @CommandMethod("") + @Command("") public void onBrushBigballs( final @NotNull Snipe snipe, final @Argument("use-big-balls") @Liberal boolean useBigBalls @@ -54,14 +54,14 @@ public void onBrushBigballs( )); } - @CommandMethod("balls big") + @Command("balls big") public void onBrushBallsBig( final @NotNull Snipe snipe ) { this.onBrushBigballs(snipe, true); } - @CommandMethod("balls small") + @Command("balls small") public void onBrushBallsSmall( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CopyPastaBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CopyPastaBrush.java index 4d0c93f3..69302962 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CopyPastaBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/CopyPastaBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -14,8 +14,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b copy_pasta|copypasta|cp") -@CommandPermission("voxelsniper.brush.copypasta") +@Command(value = "brush|b copy_pasta|copypasta|cp") +@Permission("voxelsniper.brush.copypasta") public class CopyPastaBrush extends AbstractBrush { private static final int BLOCK_LIMIT = 10000; @@ -38,21 +38,21 @@ public void loadProperties() { this.blockLimit = getIntegerProperty("block-limit", BLOCK_LIMIT); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.copy-pasta.info")); } - @CommandMethod("air") + @Command("air") public void onBrushAir( final @NotNull Snipe snipe ) { @@ -75,28 +75,28 @@ private void onBrushPivotCommand(Snipe snipe, int pivot) { )); } - @CommandMethod("0") + @Command("0") public void onBrush0( final @NotNull Snipe snipe ) { this.onBrushPivotCommand(snipe, 0); } - @CommandMethod("90") + @Command("90") public void onBrush90( final @NotNull Snipe snipe ) { this.onBrushPivotCommand(snipe, 90); } - @CommandMethod("180") + @Command("180") public void onBrush180( final @NotNull Snipe snipe ) { this.onBrushPivotCommand(snipe, 180); } - @CommandMethod("270") + @Command("270") public void onBrush270( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DomeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DomeBrush.java index 35de15b8..7e4310e0 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DomeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DomeBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; @@ -17,11 +17,11 @@ import java.util.List; @RequireToolkit -@CommandMethod(value = "brush|b dome|do") -@CommandPermission("voxelsniper.brush.dome") +@Command(value = "brush|b dome|do") +@Permission("voxelsniper.brush.dome") public class DomeBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DrainBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DrainBrush.java index 918c270c..2abb81d9 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DrainBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/DrainBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; @@ -18,28 +18,28 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b drain|dr") -@CommandPermission("voxelsniper.brush.drain") +@Command(value = "brush|b drain|dr") +@Permission("voxelsniper.brush.drain") public class DrainBrush extends AbstractBrush { private boolean trueCircle; private boolean disc; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.drain.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle @@ -53,7 +53,7 @@ public void onBrushTruecircle( )); } - @CommandMethod("d") + @Command("d") public void onBrushD( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/EraserBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/EraserBrush.java index 20f58ef0..64d4778a 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/EraserBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/EraserBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockCategories; import com.sk89q.worldedit.world.block.BlockState; @@ -14,8 +14,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b eraser|erase") -@CommandPermission("voxelsniper.brush.eraser") +@Command(value = "brush|b eraser|erase") +@Permission("voxelsniper.brush.eraser") public class EraserBrush extends AbstractBrush { private static final MaterialSet EXCLUSIVE_MATERIALS = MaterialSet.builder() @@ -33,7 +33,7 @@ public class EraserBrush extends AbstractBrush { .with(MaterialSets.LIQUIDS) .build(); - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBlendBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBlendBrush.java index 2274f860..ea9dfee7 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBlendBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBlendBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.brush.type.blend.BlendBallBrush; @@ -13,8 +13,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b erode_blend|erode_blend_ball|erodeblend|erodeblendball|eb") -@CommandPermission("voxelsniper.brush.erodeblend") +@Command(value = "brush|b erode_blend|erode_blend_ball|erodeblend|erodeblendball|eb") +@Permission("voxelsniper.brush.erodeblend") public class ErodeBlendBrush extends AbstractBrush { private final BlendBallBrush blendBall; @@ -25,7 +25,7 @@ public ErodeBlendBrush() { this.erode = new ErodeBrush(); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { @@ -33,7 +33,7 @@ public void onBrush( this.erode.onBrush(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -41,14 +41,14 @@ public void onBrushInfo( this.erode.onBrushInfo(snipe); } - @CommandMethod("water") + @Command("water") public void onBrushWater( final @NotNull Snipe snipe ) { this.blendBall.onBrushWater(snipe); } - @CommandMethod("") + @Command("") public void onBrushPreset( final @NotNull Snipe snipe, @@ -57,7 +57,7 @@ public void onBrushPreset( this.erode.onBrushPreset(snipe, preset); } - @CommandMethod("e ") + @Command("e ") public void onBrushErosionfaces( final @NotNull Snipe snipe, final @Argument("erosion-faces") @Range(min = "0") int erosionFaces @@ -65,7 +65,7 @@ public void onBrushErosionfaces( this.erode.onBrushErosionfaces(snipe, erosionFaces); } - @CommandMethod("E ") + @Command("E ") public void onBrushErosionrecursion( final @NotNull Snipe snipe, final @Argument("erosion-recursions") @Range(min = "0") int erosionRecursions @@ -73,7 +73,7 @@ public void onBrushErosionrecursion( this.erode.onBrushErosionrecursion(snipe, erosionRecursions); } - @CommandMethod("f ") + @Command("f ") public void onBrushFillfaces( final @NotNull Snipe snipe, final @Argument("fill-faces") @Range(min = "0") int fillFaces @@ -81,7 +81,7 @@ public void onBrushFillfaces( this.erode.onBrushFillfaces(snipe, fillFaces); } - @CommandMethod("F ") + @Command("F ") public void onBrushFillrecursion( final @NotNull Snipe snipe, final @Argument("fill-recursions") @Range(min = "0") int fillRecursions diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBrush.java index d4c44855..702dba45 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ErodeBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -32,8 +32,8 @@ import java.util.Objects; @RequireToolkit -@CommandMethod(value = "brush|b erode|e") -@CommandPermission("voxelsniper.brush.erode") +@Command(value = "brush|b erode|e") +@Permission("voxelsniper.brush.erode") public class ErodeBrush extends AbstractBrush { private static final List FACES_TO_CHECK = Arrays.asList( @@ -47,21 +47,21 @@ public class ErodeBrush extends AbstractBrush { private ErosionPreset currentPreset = Preset.DEFAULT.getPreset(); - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.erode.info")); } - @CommandMethod("") + @Command("") public void onBrushPreset( final @NotNull Snipe snipe, final @NotNull @Argument("preset") Preset preset @@ -75,7 +75,7 @@ public void onBrushPreset( )); } - @CommandMethod("e ") + @Command("e ") public void onBrushErosionfaces( final @NotNull Snipe snipe, final @Argument("erosion-faces") @Range(min = "0") int erosionFaces @@ -94,7 +94,7 @@ public void onBrushErosionfaces( )); } - @CommandMethod("E ") + @Command("E ") public void onBrushErosionrecursion( final @NotNull Snipe snipe, final @Argument("erosion-recursions") @Range(min = "0") int erosionRecursions @@ -113,7 +113,7 @@ public void onBrushErosionrecursion( )); } - @CommandMethod("f ") + @Command("f ") public void onBrushFillfaces( final @NotNull Snipe snipe, final @Argument("fill-faces") @Range(min = "0") int fillFaces @@ -132,7 +132,7 @@ public void onBrushFillfaces( )); } - @CommandMethod("F ") + @Command("F ") public void onBrushFillrecursion( final @NotNull Snipe snipe, final @Argument("fill-recursions") @Range(min = "0") int fillRecursions diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ExtrudeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ExtrudeBrush.java index d8ed4630..620faa1b 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ExtrudeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ExtrudeBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.util.Direction; @@ -17,27 +17,27 @@ import org.jetbrains.annotations.Nullable; @RequireToolkit -@CommandMethod(value = "brush|b extrude|ex") -@CommandPermission("voxelsniper.brush.extrude") +@Command(value = "brush|b extrude|ex") +@Permission("voxelsniper.brush.extrude") public class ExtrudeBrush extends AbstractBrush { private boolean trueCircle; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.extrude.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/FlatOceanBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/FlatOceanBrush.java index b00beca9..cf431020 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/FlatOceanBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/FlatOceanBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -13,8 +13,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b flat_ocean|flatocean|fo") -@CommandPermission("voxelsniper.brush.flatocean") +@Command(value = "brush|b flat_ocean|flatocean|fo") +@Permission("voxelsniper.brush.flatocean") public class FlatOceanBrush extends AbstractBrush { private static final int DEFAULT_WATER_LEVEL = 29; @@ -29,21 +29,21 @@ public void loadProperties() { this.floorLevel = getIntegerProperty("default-floor-level", DEFAULT_FLOOR_LEVEL); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.flat-ocean.info")); } - @CommandMethod("yo ") + @Command("yo ") public void onBrushYo( final @NotNull Snipe snipe, final @Argument("water-level") int waterLevel @@ -57,7 +57,7 @@ public void onBrushYo( )); } - @CommandMethod("yl ") + @Command("yl ") public void onBrushYl( final @NotNull Snipe snipe, final @Argument("floor-level") int floorLevel diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/GenerateTreeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/GenerateTreeBrush.java index 0229c550..aa9ae3de 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/GenerateTreeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/GenerateTreeBrush.java @@ -1,10 +1,10 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.sk89q.worldedit.math.BlockVector3; @@ -27,8 +27,8 @@ // Proposal: Use /v and /vr for leave and wood material // or two more parameters -- Monofraps @RequireToolkit -@CommandMethod(value = "brush|b generate_tree|generatetree|gt") -@CommandPermission("voxelsniper.brush.generatetree") +@Command(value = "brush|b generate_tree|generatetree|gt") +@Permission("voxelsniper.brush.generatetree") public class GenerateTreeBrush extends AbstractBrush { private static final BlockType DEFAULT_LEAF_TYPE = BlockTypes.OAK_LEAVES; @@ -98,21 +98,21 @@ private void resetValues() { this.nodeMax = getIntegerProperty("default-node-max", DEFAULT_NODE_MAX); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.generate-tree.info")); } - @CommandMethod("default") + @Command("default") public void onBrushDefault( final @NotNull Snipe snipe ) { @@ -122,7 +122,7 @@ public void onBrushDefault( messenger.sendMessage(Caption.of("voxelsniper.brush.parameter.reset")); } - @CommandMethod("lt ") + @Command("lt ") public void onBrushLt( final @NotNull Snipe snipe, final @NotNull @Argument("leaf-type") BlockType leafType @@ -136,7 +136,7 @@ public void onBrushLt( )); } - @CommandMethod("wt ") + @Command("wt ") public void onBrushWt( final @NotNull Snipe snipe, final @NotNull @Argument("wood-type") BlockType woodType @@ -150,7 +150,7 @@ public void onBrushWt( )); } - @CommandMethod("tt ") + @Command("tt ") public void onBrushTt( final @NotNull Snipe snipe, final @Argument("thickness") @Range(min = "0") int thickness @@ -164,7 +164,7 @@ public void onBrushTt( )); } - @CommandMethod("rf ") + @Command("rf ") public void onBrushRf( final @NotNull Snipe snipe, final @Argument("root-float") @Liberal boolean rootFloat @@ -178,7 +178,7 @@ public void onBrushRf( )); } - @CommandMethod("sh ") + @Command("sh ") public void onBrushSh( final @NotNull Snipe snipe, final @Argument("start-height") int startHeight @@ -192,7 +192,7 @@ public void onBrushSh( )); } - @CommandMethod("rl ") + @Command("rl ") public void onBrushRl( final @NotNull Snipe snipe, final @Argument("root-length") @Range(min = "0") int rootLength @@ -206,7 +206,7 @@ public void onBrushRl( )); } - @CommandMethod("ts ") + @Command("ts ") public void onBrushTs( final @NotNull Snipe snipe, final @Argument("slope-chance") @Range(min = "0", max = "100") int slopeChance @@ -220,7 +220,7 @@ public void onBrushTs( )); } - @CommandMethod("bl ") + @Command("bl ") public void onBrushBl( final @NotNull Snipe snipe, final @Argument("branch-length") @Range(min = "0") int branchLength @@ -234,7 +234,7 @@ public void onBrushBl( )); } - @CommandMethod("minr ") + @Command("minr ") public void onBrushMinr( final @NotNull Snipe snipe, final @Argument("min-roots") @DynamicRange(min = "0", max = "maxRoots") int minRoots @@ -248,7 +248,7 @@ public void onBrushMinr( )); } - @CommandMethod("maxr ") + @Command("maxr ") public void onBrushMaxr( final @NotNull Snipe snipe, final @Argument("max-roots") @DynamicRange(min = "minRoots") int maxRoots @@ -262,7 +262,7 @@ public void onBrushMaxr( )); } - @CommandMethod("minh ") + @Command("minh ") public void onBrushMinh( final @NotNull Snipe snipe, final @Argument("height-min") @DynamicRange(min = "0", max = "heightMax") int heightMin @@ -276,7 +276,7 @@ public void onBrushMinh( )); } - @CommandMethod("maxh ") + @Command("maxh ") public void onBrushMaxh( final @NotNull Snipe snipe, final @Argument("height-max") @DynamicRange(min = "heightMin") int heightMax @@ -290,7 +290,7 @@ public void onBrushMaxh( )); } - @CommandMethod("minl ") + @Command("minl ") public void onBrushMinl( final @NotNull Snipe snipe, final @Argument("node-min") @DynamicRange(min = "0", max = "nodeMax") int nodeMin @@ -304,7 +304,7 @@ public void onBrushMinl( )); } - @CommandMethod("maxl ") + @Command("maxl ") public void onBrushMaxl( final @NotNull Snipe snipe, final @Argument("node-max") @DynamicRange(min = "nodeMin") int nodeMax diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/HeatRayBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/HeatRayBrush.java index 8c27be08..7d0b6e4e 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/HeatRayBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/HeatRayBrush.java @@ -1,10 +1,10 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockCategories; @@ -27,8 +27,8 @@ import java.util.Random; @RequireToolkit -@CommandMethod(value = "brush|b heat_ray|heatray|hr") -@CommandPermission("voxelsniper.brush.heatray") +@Command(value = "brush|b heat_ray|heatray|hr") +@Permission("voxelsniper.brush.heatray") public class HeatRayBrush extends AbstractBrush { private static final double REQUIRED_OBSIDIAN_DENSITY = 0.6; @@ -86,21 +86,21 @@ public void loadProperties() { this.amplitude = getDoubleProperty("default-amplitude", DEFAULT_AMPLITUDE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.heat-ray.info")); } - @CommandMethod("") + @Command("") public void onBrushSoulfire( final @NotNull Snipe snipe, final @Argument("soul-fire") @Liberal boolean soulFire @@ -114,7 +114,7 @@ public void onBrushSoulfire( )); } - @CommandMethod("oct ") + @Command("oct ") public void onBrushOct( final @NotNull Snipe snipe, final @Argument("octaves") @Range(min = "0") int octaves @@ -128,7 +128,7 @@ public void onBrushOct( )); } - @CommandMethod("amp ") + @Command("amp ") public void onBrushAmp( final @NotNull Snipe snipe, final @Argument("amplitude") double amplitude @@ -142,7 +142,7 @@ public void onBrushAmp( )); } - @CommandMethod("freq ") + @Command("freq ") public void onBrushFreq( final @NotNull Snipe snipe, final @Argument("frequency") double frequency diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/JockeyBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/JockeyBrush.java index ab9ff6af..67d02f18 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/JockeyBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/JockeyBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.Fawe; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.bukkit.BukkitAdapter; @@ -27,8 +27,8 @@ import java.util.List; @RequireToolkit -@CommandMethod(value = "brush|b jockey") -@CommandPermission("voxelsniper.brush.jockey") +@Command(value = "brush|b jockey") +@Permission("voxelsniper.brush.jockey") public class JockeyBrush extends AbstractBrush { private static final int ENTITY_STACK_LIMIT = 50; @@ -48,21 +48,21 @@ public void loadProperties() { this.jockeyType = (JockeyType) getEnumProperty("default-jockey-type", JockeyType.class, DEFAULT_JOCKEY_TYPE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.jockey.info")); } - @CommandMethod("t ") + @Command("t ") public void onBrushT( final @NotNull Snipe snipe, final @NotNull @Argument("jockey-type") JockeyType jockeyType @@ -76,7 +76,7 @@ public void onBrushT( )); } - @CommandMethod(" ") + @Command(" ") public void onBrushJockeytype( final @NotNull Snipe snipe, final @Argument("player-only") @Liberal boolean playerOnly, diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/LightningBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/LightningBrush.java index f23fca84..58f467db 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/LightningBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/LightningBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.bukkit.BukkitAdapter; @@ -12,11 +12,11 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b lightning|light") -@CommandPermission("voxelsniper.brush.lightning") +@Command(value = "brush|b lightning|light") +@Permission("voxelsniper.brush.lightning") public class LightningBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/MoveBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/MoveBrush.java index cfac2a79..69b0c31a 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/MoveBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/MoveBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.World; @@ -20,8 +20,8 @@ * Moves a selection blockPositionY a certain amount. */ @RequireToolkit -@CommandMethod(value = "brush|b move|mv") -@CommandPermission("voxelsniper.brush.move") +@Command(value = "brush|b move|mv") +@Permission("voxelsniper.brush.move") public class MoveBrush extends AbstractBrush { private static final int MAX_BLOCK_COUNT = 5000000; @@ -43,21 +43,21 @@ public void loadProperties() { this.maxBlockCount = getIntegerProperty("max-block-count", MAX_BLOCK_COUNT); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.move.info")); } - @CommandMethod("reset") + @Command("reset") public void onBrushReset( final @NotNull Snipe snipe ) { @@ -80,7 +80,7 @@ public void onBrushReset( )); } - @CommandMethod("x ") + @Command("x ") public void onBrushX( final @NotNull Snipe snipe, final @Argument("x-direction") int xDirection @@ -94,7 +94,7 @@ public void onBrushX( )); } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("y-direction") int yDirection @@ -108,7 +108,7 @@ public void onBrushY( )); } - @CommandMethod("z ") + @Command("z ") public void onBrushZ( final @NotNull Snipe snipe, final @Argument("z-direction") int zDirection diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/OceanBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/OceanBrush.java index c7ea1833..a1440dce 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/OceanBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/OceanBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -22,8 +22,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b ocean|o") -@CommandPermission("voxelsniper.brush.ocean") +@Command(value = "brush|b ocean|o") +@Permission("voxelsniper.brush.ocean") public class OceanBrush extends AbstractBrush { private static final int WATER_LEVEL_MIN = 12; @@ -63,21 +63,21 @@ public void loadProperties() { this.waterLevel = getIntegerProperty("default-water-lever", DEFAULT_WATER_LEVEL); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.ocean.info")); } - @CommandMethod("wlevel ") + @Command("wlevel ") public void onBrushWlevel( final @NotNull Snipe snipe, final @Argument("water-level") @DynamicRange(min = "waterLevelMin") int waterLevel @@ -91,7 +91,7 @@ public void onBrushWlevel( )); } - @CommandMethod("cfloor ") + @Command("cfloor ") public void onBrushCfloor( final @NotNull Snipe snipe, final @Argument("cover-floor") @Liberal boolean coverFloor diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PaintingBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PaintingBrush.java index 7b091bdd..84360512 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PaintingBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PaintingBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; import com.thevoxelbox.voxelsniper.sniper.Sniper; import com.thevoxelbox.voxelsniper.sniper.snipe.Snipe; @@ -13,11 +13,11 @@ * Painting scrolling Brush. */ @RequireToolkit -@CommandMethod(value = "brush|b painting|paint") -@CommandPermission("voxelsniper.brush.painting") +@Command(value = "brush|b painting|paint") +@Permission("voxelsniper.brush.painting") public class PaintingBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PullBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PullBrush.java index 390ac2ab..d30e65ed 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PullBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/PullBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -19,8 +19,8 @@ import java.util.Set; @RequireToolkit -@CommandMethod(value = "brush|b pull") -@CommandPermission("voxelsniper.brush.pull") +@Command(value = "brush|b pull") +@Permission("voxelsniper.brush.pull") public class PullBrush extends AbstractBrush { private static final int DEFAULT_PINCH = 1; @@ -38,21 +38,21 @@ public void loadProperties() { this.bubble = getIntegerProperty("default-bubble", DEFAULT_BUBBLE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.pull.info")); } - @CommandMethod(" ") + @Command(" ") public void onBrushPinchbubble( final @NotNull Snipe snipe, final @Argument("pinch") double pinch, diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RandomErodeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RandomErodeBrush.java index 18a91875..dc06b2ec 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RandomErodeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RandomErodeBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; @@ -15,8 +15,8 @@ import java.util.Random; @RequireToolkit -@CommandMethod(value = "brush|b random_erode|randomerode|re") -@CommandPermission("voxelsniper.brush.randomerode") +@Command(value = "brush|b random_erode|randomerode|re") +@Permission("voxelsniper.brush.randomerode") public class RandomErodeBrush extends AbstractBrush { private static final double TRUE_CIRCLE = 0.5; @@ -29,7 +29,7 @@ public class RandomErodeBrush extends AbstractBrush { private int erodeRecursions; private int fillRecursions; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RegenerateChunkBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RegenerateChunkBrush.java index 9fd991e6..08b07962 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RegenerateChunkBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RegenerateChunkBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.util.formatting.text.TextComponent; @@ -21,8 +21,8 @@ * Regenerates the target chunk. */ @RequireToolkit -@CommandMethod(value = "brush|b regenerate_chunk|regeneratechunk|rc") -@CommandPermission("voxelsniper.brush.ellipsoid") +@Command(value = "brush|b regenerate_chunk|regeneratechunk|rc") +@Permission("voxelsniper.brush.ellipsoid") public class RegenerateChunkBrush extends AbstractBrush { private static final String DEFAULT_BIOME = "default"; @@ -33,21 +33,21 @@ public class RegenerateChunkBrush extends AbstractBrush { private BiomeType biomeType = null; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.regenerate-chunk.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -62,7 +62,7 @@ public void onBrushList( )); } - @CommandMethod("default") + @Command("default") public void onBrushDefault( final @NotNull Snipe snipe ) { @@ -75,7 +75,7 @@ public void onBrushDefault( )); } - @CommandMethod("") + @Command("") public void onBrushBiometype( final @NotNull Snipe snipe, final @NotNull @Argument("biome-type") BiomeType biomeType diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RulerBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RulerBrush.java index 871bbcf3..2fb3e28f 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RulerBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/RulerBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -12,8 +12,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b ruler|r") -@CommandPermission("voxelsniper.brush.ruler") +@Command(value = "brush|b ruler|r") +@Permission("voxelsniper.brush.ruler") public class RulerBrush extends AbstractBrush { private static final int DEFAULT_X_OFFSET = 0; @@ -27,21 +27,21 @@ public class RulerBrush extends AbstractBrush { private int yOffset = DEFAULT_Y_OFFSET; private int zOffset = DEFAULT_Z_OFFSET; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.ruler.info")); } - @CommandMethod("ruler") + @Command("ruler") public void onBrushRuler( final @NotNull Snipe snipe ) { @@ -53,7 +53,7 @@ public void onBrushRuler( messenger.sendMessage(Caption.of("voxelsniper.brush.ruler.ruler-mode")); } - @CommandMethod(" ") + @Command(" ") public void onBrushOffsets( final @NotNull Snipe snipe, final @Argument("x-offset") int xOffset, diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ScannerBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ScannerBrush.java index d0236f95..08cc17d9 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ScannerBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/ScannerBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -16,8 +16,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b scanner|sc") -@CommandPermission("voxelsniper.brush.scanner") +@Command(value = "brush|b scanner|sc") +@Permission("voxelsniper.brush.scanner") public class ScannerBrush extends AbstractBrush { private static final int DEPTH_MIN = 1; @@ -39,21 +39,21 @@ public void loadProperties() { this.depth = getIntegerProperty("default-depth", DEFAULT_DEPTH); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.scanner.info")); } - @CommandMethod("d ") + @Command("d ") public void onBrushD( final @NotNull Snipe snipe, final @Argument("depth") @DynamicRange(min = "depthMin", max = "depthMax") int depth diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SignOverwriteBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SignOverwriteBrush.java index cb889ba4..993f1440 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SignOverwriteBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SignOverwriteBrush.java @@ -1,11 +1,11 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Greedy; -import cloud.commandframework.annotations.specifier.Liberal; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Greedy; +import org.incendo.cloud.annotation.specifier.Liberal; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.platform.Capability; @@ -41,8 +41,8 @@ import java.util.List; @RequireToolkit -@CommandMethod(value = "brush|b sign_overwrite|signoverwrite|sio") -@CommandPermission("voxelsniper.brush.signoverwrite") +@Command(value = "brush|b sign_overwrite|signoverwrite|sio") +@Permission("voxelsniper.brush.signoverwrite") public class SignOverwriteBrush extends AbstractBrush { private static final Side DEFAULT_SIDE = Side.FRONT; @@ -70,21 +70,21 @@ public void loadProperties() { this.side = (Side) getEnumProperty("default-side", Side.class, DEFAULT_SIDE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.sign-overwrite.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -99,7 +99,7 @@ public void onBrushList( )); } - @CommandMethod("clear|c") + @Command("clear|c") public void onBrushClear( final @NotNull Snipe snipe ) { @@ -109,7 +109,7 @@ public void onBrushClear( messenger.sendMessage(Caption.of("voxelsniper.brush.sign-overwrite.cleared")); } - @CommandMethod("clearall|ca") + @Command("clearall|ca") public void onBrushClearall( final @NotNull Snipe snipe ) { @@ -120,7 +120,7 @@ public void onBrushClearall( messenger.sendMessage(Caption.of("voxelsniper.brush.sign-overwrite.cleared-reset")); } - @CommandMethod("side ") + @Command("side ") public void onBrushSide( final @NotNull Snipe snipe, final @NotNull @Argument("side") Side side @@ -139,7 +139,7 @@ public void onBrushSide( } @SuppressWarnings("deprecation") // Paper deprecation - @CommandMethod(" set ") + @Command(" set ") public void onBrushLineSet( final @NotNull Snipe snipe, final @Argument("line") @Range(min = "1", max = "4") int line, @@ -169,7 +169,7 @@ public void onBrushLineSet( )); } - @CommandMethod(" toggle") + @Command(" toggle") public void onBrushLineToggle( final @NotNull Snipe snipe, final @Argument("line") @Range(min = "1", max = "4") int line @@ -185,7 +185,7 @@ public void onBrushLineToggle( )); } - @CommandMethod("multiple|m ") + @Command("multiple|m ") public void onBrushMultiple( final @NotNull Snipe snipe, final @Argument("ranged-mode") @Liberal boolean rangedMode @@ -210,7 +210,7 @@ public void onBrushMultiple( } } - @CommandMethod("save|s ") + @Command("save|s ") public void onBrushSave( final @NotNull Snipe snipe, final @NotNull @Argument(value = "sign", parserName = "sign-file_parser") File sign @@ -218,7 +218,7 @@ public void onBrushSave( this.saveBufferToFile(snipe, sign); } - @CommandMethod("open|o ") + @Command("open|o ") public void onBrushOpen( final @NotNull Snipe snipe, final @NotNull @Argument(value = "sign", parserName = "sign-file_parser") File sign diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SnowConeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SnowConeBrush.java index 18e37163..12a63c33 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SnowConeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SnowConeBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.sk89q.worldedit.math.BlockVector3; @@ -16,11 +16,11 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b snow_cone|snowcone|snow") -@CommandPermission("voxelsniper.brush.snowcone") +@Command(value = "brush|b snow_cone|snowcone|snow") +@Permission("voxelsniper.brush.snowcone") public class SnowConeBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SpiralStaircaseBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SpiralStaircaseBrush.java index 80aa8d82..35af1231 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SpiralStaircaseBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/SpiralStaircaseBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.sk89q.worldedit.math.BlockVector3; @@ -17,8 +17,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b spiral_staircase|spiralstaircase|sstair") -@CommandPermission("voxelsniper.brush.spiralstaircase") +@Command(value = "brush|b spiral_staircase|spiralstaircase|sstair") +@Permission("voxelsniper.brush.spiralstaircase") public class SpiralStaircaseBrush extends AbstractBrush { private static final String DEFAULT_SDIRECT = "c"; @@ -33,14 +33,14 @@ public void loadProperties() { this.sopen = getStringProperty("default-sopen", DEFAULT_SOPEN); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -57,14 +57,14 @@ private void onBrushSdirectCommand(Snipe snipe, String sdirect) { )); } - @CommandMethod("c") + @Command("c") public void onBrushC( final @NotNull Snipe snipe ) { this.onBrushSdirectCommand(snipe, "c"); } - @CommandMethod("cc") + @Command("cc") public void onBrushCc( final @NotNull Snipe snipe ) { @@ -81,28 +81,28 @@ private void onBrushSopenCommand(Snipe snipe, String sopen) { )); } - @CommandMethod("n") + @Command("n") public void onBrushN( final @NotNull Snipe snipe ) { this.onBrushSopenCommand(snipe, "n"); } - @CommandMethod("e") + @Command("e") public void onBrushE( final @NotNull Snipe snipe ) { this.onBrushSopenCommand(snipe, "e"); } - @CommandMethod("s") + @Command("s") public void onBrushS( final @NotNull Snipe snipe ) { this.onBrushSopenCommand(snipe, "s"); } - @CommandMethod("w") + @Command("w") public void onBrushW( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/TreeSnipeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/TreeSnipeBrush.java index 60505b40..fb1a007a 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/TreeSnipeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/TreeSnipeBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -21,8 +21,8 @@ import java.util.stream.IntStream; @RequireToolkit -@CommandMethod(value = "brush|b tree_snipe|treesnipe|tree|t") -@CommandPermission("voxelsniper.brush.treesnipe") +@Command(value = "brush|b tree_snipe|treesnipe|tree|t") +@Permission("voxelsniper.brush.treesnipe") public class TreeSnipeBrush extends AbstractBrush { private static final TreeGenerator.TreeType DEFAULT_TREE_TYPE = TreeGenerator.TreeType.TREE; @@ -36,21 +36,21 @@ public void loadProperties() { ); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.tree-snipe.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -65,7 +65,7 @@ public void onBrushList( )); } - @CommandMethod("") + @Command("") public void onBrushTreetype( final @NotNull Snipe snipe, final @NotNull @Argument("tree-type") TreeGenerator.TreeType treeType diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/VoltmeterBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/VoltmeterBrush.java index f4e16e3b..3fd0a04a 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/VoltmeterBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/VoltmeterBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.bukkit.BukkitAdapter; @@ -19,11 +19,11 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b voltmeter|volt") -@CommandPermission("voxelsniper.brush.voltmeter") +@Command(value = "brush|b voltmeter|volt") +@Permission("voxelsniper.brush.voltmeter") public class VoltmeterBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/WarpBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/WarpBrush.java index e2e2f6af..c2367b0d 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/WarpBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/WarpBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.Fawe; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; @@ -14,11 +14,11 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b warp|world") -@CommandPermission("voxelsniper.brush.warp") +@Command(value = "brush|b warp|world") +@Permission("voxelsniper.brush.warp") public class WarpBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendBallBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendBallBrush.java index 6ffc05fb..83c27f6e 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendBallBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendBallBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.blend; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; @@ -18,25 +18,25 @@ import java.util.Set; @RequireToolkit -@CommandMethod(value = "brush|b blend_ball|blendball|bb") -@CommandPermission("voxelsniper.brush.blendball") +@Command(value = "brush|b blend_ball|blendball|bb") +@Permission("voxelsniper.brush.blendball") public class BlendBallBrush extends AbstractBlendBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.blend-ball.info")); } - @CommandMethod("water") + @Command("water") public void onBrushWater( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendDiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendDiscBrush.java index 8aee8946..e8ccaa2d 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendDiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendDiscBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.blend; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; @@ -18,25 +18,25 @@ import java.util.Set; @RequireToolkit -@CommandMethod(value = "brush|b blend_disc|blenddisc|bd") -@CommandPermission("voxelsniper.brush.blenddisc") +@Command(value = "brush|b blend_disc|blenddisc|bd") +@Permission("voxelsniper.brush.blenddisc") public class BlendDiscBrush extends AbstractBlendBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.blend-disc.info")); } - @CommandMethod("water") + @Command("water") public void onBrushWater( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelBrush.java index 7f18d2c6..fbb0eb60 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.blend; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; @@ -18,25 +18,25 @@ import java.util.Set; @RequireToolkit -@CommandMethod(value = "brush|b blend_voxel|blendvoxel|bv") -@CommandPermission("voxelsniper.brush.blendvoxel") +@Command(value = "brush|b blend_voxel|blendvoxel|bv") +@Permission("voxelsniper.brush.blendvoxel") public class BlendVoxelBrush extends AbstractBlendBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.blend-voxel.info")); } - @CommandMethod("water") + @Command("water") public void onBrushWater( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelDiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelDiscBrush.java index 311e7013..7c987c49 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelDiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/blend/BlendVoxelDiscBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.blend; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; @@ -18,25 +18,25 @@ import java.util.Set; @RequireToolkit -@CommandMethod(value = "brush|b blend_voxel_disc|blendvoxeldisc|bvd") -@CommandPermission("voxelsniper.brush.blendvoxeldisc") +@Command(value = "brush|b blend_voxel_disc|blendvoxeldisc|bvd") +@Permission("voxelsniper.brush.blendvoxeldisc") public class BlendVoxelDiscBrush extends AbstractBlendBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.blend-voxel-disc.info")); } - @CommandMethod("water") + @Command("water") public void onBrushWater( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonBrush.java index c0b113f9..e790a399 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.canyon; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -16,8 +16,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b canyon|ca") -@CommandPermission("voxelsniper.brush.canyon") +@Command(value = "brush|b canyon|ca") +@Permission("voxelsniper.brush.canyon") public class CanyonBrush extends AbstractBrush { private static final int SHIFT_LEVEL_MIN = -54; @@ -38,21 +38,21 @@ public void loadProperties() { this.yLevel = getIntegerProperty("default-y-level", DEFAULT_Y_LEVEL); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.canyon.info")); } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("y-level") @DynamicRange(min = "shiftLevelMin", max = "shiftLevelMax") int yLevel diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonSelectionBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonSelectionBrush.java index 0d370284..fc35f85e 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonSelectionBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/canyon/CanyonSelectionBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.canyon; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.DynamicRange; @@ -12,29 +12,29 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b canyon_selection|canyonselection|cas") -@CommandPermission("voxelsniper.brush.canyonselection") +@Command(value = "brush|b canyon_selection|canyonselection|cas") +@Permission("voxelsniper.brush.canyonselection") public class CanyonSelectionBrush extends CanyonBrush { private boolean first = true; private int fx; private int fz; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrush(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfo(snipe); } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("y-level") @DynamicRange(min = "shiftLevelMin", max = "shiftLevelMax") int yLevel diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityBrush.java index 814962ee..804486eb 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.entity; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.EditSession; @@ -22,8 +22,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b entity|en") -@CommandPermission("voxelsniper.brush.entity") +@Command(value = "brush|b entity|en") +@Permission("voxelsniper.brush.entity") public class EntityBrush extends AbstractBrush { private static final EntityType DEFAULT_ENTITY_TYPE = EntityTypes.ZOMBIE; @@ -35,21 +35,21 @@ public void loadProperties() { this.entityType = (EntityType) getRegistryProperty("default-entity-type", EntityType.REGISTRY, DEFAULT_ENTITY_TYPE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.entity.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -64,7 +64,7 @@ public void onBrushList( )); } - @CommandMethod("") + @Command("") public void onBrushEntitytype( final @NotNull Snipe snipe, final @NotNull @Argument("entity-type") EntityType entityType diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityRemovalBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityRemovalBrush.java index f2d07e95..9f8b7684 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityRemovalBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/entity/EntityRemovalBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.entity; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.bukkit.BukkitAdapter; @@ -24,8 +24,8 @@ import java.util.List; @RequireToolkit -@CommandMethod(value = "brush|b entity_removal|entityremoval|er") -@CommandPermission("voxelsniper.brush.entityremoval") +@Command(value = "brush|b entity_removal|entityremoval|er") +@Permission("voxelsniper.brush.entityremoval") public class EntityRemovalBrush extends AbstractBrush { private static final List DEFAULT_EXEMPTIONS = Arrays.asList( @@ -44,21 +44,21 @@ public void loadProperties() { ); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.entity.removal")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -71,7 +71,7 @@ public void onBrushList( )); } - @CommandMethod("add ") + @Command("add ") public void onBrushPlus( final @NotNull Snipe snipe, final @NotNull @Argument(value = "entity-class", parserName = "entity-class_parser") Class entityClass @@ -85,7 +85,7 @@ public void onBrushPlus( )); } - @CommandMethod("remove ") + @Command("remove ") public void onBrushMinus( final @NotNull Snipe snipe, final @NotNull @Argument(value = "entity-class", parserName = "entity-class_parser") Class entityClass diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BallBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BallBrush.java index 91e57cd8..0b3b9726 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BallBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BallBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -19,8 +19,8 @@ * A brush that creates a solid ball. */ @RequireToolkit -@CommandMethod(value = "brush|b ball|b") -@CommandPermission("voxelsniper.brush.ball") +@Command(value = "brush|b ball|b") +@Permission("voxelsniper.brush.ball") public class BallBrush extends AbstractPerformerBrush { private boolean trueCircle; @@ -29,21 +29,21 @@ public class BallBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.ball.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BlobBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BlobBrush.java index b9679bce..b6646a86 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BlobBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/BlobBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.DynamicRange; @@ -13,8 +13,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b blob|splatblob") -@CommandPermission("voxelsniper.brush.blob") +@Command(value = "brush|b blob|splatblob") +@Permission("voxelsniper.brush.blob") public class BlobBrush extends AbstractPerformerBrush { @Override @@ -25,14 +25,14 @@ public void loadProperties() { this.growthPercent = getIntegerProperty("default-growth-percent", DEFAULT_GROWTH_PERCENT); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -41,7 +41,7 @@ public void onBrushInfo( )); } - @CommandMethod("g ") + @Command("g ") public void onBrushG( final @NotNull Snipe snipe, final @Argument("growth-percent") @DynamicRange(min = "growthPercentMin", max = "growthPercentMax") int growthPercent diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CheckerVoxelDiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CheckerVoxelDiscBrush.java index e260d7b7..26d084a0 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CheckerVoxelDiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CheckerVoxelDiscBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -14,8 +14,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b checker_voxel_disc|checkervoxeldisc|cvd") -@CommandPermission("voxelsniper.brush.checkervoxeldisc") +@Command(value = "brush|b checker_voxel_disc|checkervoxeldisc|cvd") +@Permission("voxelsniper.brush.checkervoxeldisc") public class CheckerVoxelDiscBrush extends AbstractPerformerBrush { private boolean useWorldCoordinates = true; @@ -24,21 +24,21 @@ public class CheckerVoxelDiscBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.checker-voxel-disc.info")); } - @CommandMethod("") + @Command("") public void onBrushUseworldcoordinates( final @NotNull Snipe snipe, final @Argument("use-world-coordinates") @Liberal boolean useWorldCoordinates diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CylinderBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CylinderBrush.java index a3d3c51b..a54c1df3 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CylinderBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/CylinderBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -15,8 +15,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b cylinder|c") -@CommandPermission("voxelsniper.brush.cylinder") +@Command(value = "brush|b cylinder|c") +@Permission("voxelsniper.brush.cylinder") public class CylinderBrush extends AbstractPerformerBrush { private boolean trueCircle; @@ -25,21 +25,21 @@ public class CylinderBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.cylinder.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle @@ -53,7 +53,7 @@ public void onBrushTruecircle( )); } - @CommandMethod("h ") + @Command("h ") public void onBrushH( final @NotNull Snipe snipe, final @Argument("height") int height @@ -68,7 +68,7 @@ public void onBrushH( )); } - @CommandMethod("c
") + @Command("c
") public void onBrushC( final @NotNull Snipe snipe, final @Argument("center") int center diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipseBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipseBrush.java index 5d4ccb42..fb87c3be 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipseBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipseBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -15,8 +15,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b ellipse|el") -@CommandPermission("voxelsniper.brush.ellipse") +@Command(value = "brush|b ellipse|el") +@Permission("voxelsniper.brush.ellipse") public class EllipseBrush extends AbstractPerformerBrush { private static final double TWO_PI = (2 * Math.PI); @@ -53,21 +53,21 @@ public void loadProperties() { this.steps = getIntegerProperty("default-steps", DEFAULT_STEPS); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.ellipse.info")); } - @CommandMethod("fill") + @Command("fill") public void onBrushFill( final @NotNull Snipe snipe ) { @@ -80,7 +80,7 @@ public void onBrushFill( )); } - @CommandMethod("x ") + @Command("x ") public void onBrushX( final @NotNull Snipe snipe, final @Argument("x-scl") @DynamicRange(min = "sclMin", max = "sclMax") int xscl @@ -94,7 +94,7 @@ public void onBrushX( )); } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("y-scl") @DynamicRange(min = "sclMin", max = "sclMax") int yscl @@ -108,7 +108,7 @@ public void onBrushY( )); } - @CommandMethod("t ") + @Command("t ") public void onBrushT( final @NotNull Snipe snipe, final @Argument("steps") @DynamicRange(min = "stepsMin", max = "stepsMax") int steps diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipsoidBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipsoidBrush.java index 4d64313b..25048cba 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipsoidBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/EllipsoidBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -13,8 +13,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b ellipsoid|elo") -@CommandPermission("voxelsniper.brush.ellipsoid") +@Command(value = "brush|b ellipsoid|elo") +@Permission("voxelsniper.brush.ellipsoid") public class EllipsoidBrush extends AbstractPerformerBrush { private static final int DEFAULT_X_RAD = 0; @@ -27,21 +27,21 @@ public class EllipsoidBrush extends AbstractPerformerBrush { private double yRad = DEFAULT_Y_RAD; private double zRad = DEFAULT_Z_RAD; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.ellipsoid.info")); } - @CommandMethod("") + @Command("") public void onBrushOffset( final @NotNull Snipe snipe, final @Argument("offset") @Liberal boolean offset @@ -55,7 +55,7 @@ public void onBrushOffset( )); } - @CommandMethod("x ") + @Command("x ") public void onBrushX( final @NotNull Snipe snipe, final @Argument("x-rad") int xRad @@ -69,7 +69,7 @@ public void onBrushX( )); } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("y-rad") int yRad @@ -83,7 +83,7 @@ public void onBrushY( )); } - @CommandMethod("z ") + @Command("z ") public void onBrushZ( final @NotNull Snipe snipe, final @Argument("z-rad") int zRad diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/FillDownBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/FillDownBrush.java index 4fe70a2b..adca18aa 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/FillDownBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/FillDownBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -17,8 +17,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b fill_down|filldown|fd") -@CommandPermission("voxelsniper.brush.filldown") +@Command(value = "brush|b fill_down|filldown|fd") +@Permission("voxelsniper.brush.filldown") public class FillDownBrush extends AbstractPerformerBrush { private boolean trueCircle; @@ -33,14 +33,14 @@ public void loadProperties() { } } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -50,7 +50,7 @@ public void onBrushInfo( )); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle @@ -64,7 +64,7 @@ public void onBrushTruecircle( )); } - @CommandMethod("all") + @Command("all") public void onBrushAll( final @NotNull Snipe snipe ) { @@ -77,7 +77,7 @@ public void onBrushAll( )); } - @CommandMethod("some") + @Command("some") public void onBrushSome( final @NotNull Snipe snipe ) { @@ -92,7 +92,7 @@ public void onBrushSome( )); } - @CommandMethod("e") + @Command("e") public void onBrushE( final @NotNull Snipe snipe ) { @@ -112,7 +112,7 @@ public void onBrushE( } } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("min-y") int minY diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/JaggedLineBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/JaggedLineBrush.java index b16a3fa5..dd0bc538 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/JaggedLineBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/JaggedLineBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; @@ -22,8 +22,8 @@ import java.util.Random; @RequireToolkit -@CommandMethod(value = "brush|b jagged_line|jaggedline|jagged|j") -@CommandPermission("voxelsniper.brush.jaggedline") +@Command(value = "brush|b jagged_line|jaggedline|jagged|j") +@Permission("voxelsniper.brush.jaggedline") public class JaggedLineBrush extends AbstractPerformerBrush { private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5); @@ -53,14 +53,14 @@ public void loadProperties() { this.spread = getIntegerProperty("default-spread", DEFAULT_SPREAD); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -73,7 +73,7 @@ public void onBrushInfo( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("recursions") @DynamicRange(min = "recursionMin", max = "recursionMax") int recursions @@ -87,7 +87,7 @@ public void onBrushR( )); } - @CommandMethod("s ") + @Command("s ") public void onBrushS( final @NotNull Snipe snipe, final @Argument("spread") @Range(min = "0") int spread diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/LineBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/LineBrush.java index 79ed58d5..79296eaa 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/LineBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/LineBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.bukkit.BukkitAdapter; @@ -18,8 +18,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b line|l") -@CommandPermission("voxelsniper.brush.line") +@Command(value = "brush|b line|l") +@Permission("voxelsniper.brush.line") public class LineBrush extends AbstractPerformerBrush { private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5); @@ -32,14 +32,14 @@ public class LineBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/OverlayBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/OverlayBrush.java index 4f41ecbf..e24d4fe0 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/OverlayBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/OverlayBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -19,8 +19,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b overlay|over") -@CommandPermission("overlay") +@Command(value = "brush|b overlay|over") +@Permission("overlay") public class OverlayBrush extends AbstractPerformerBrush { private static final int DEFAULT_DEPTH = 3; @@ -34,21 +34,21 @@ public void loadProperties() { this.depth = getIntegerProperty("default-depth", DEFAULT_DEPTH); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.overlay.info")); } - @CommandMethod("all") + @Command("all") public void onBrushAll( final @NotNull Snipe snipe ) { @@ -61,7 +61,7 @@ public void onBrushAll( )); } - @CommandMethod("some") + @Command("some") public void onBrushSome( final @NotNull Snipe snipe ) { @@ -74,7 +74,7 @@ public void onBrushSome( )); } - @CommandMethod("d ") + @Command("d ") public void onBrushD( final @NotNull Snipe snipe, final @Argument("depth") @Range(min = "1") int depth diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/PunishBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/PunishBrush.java index 41863b4c..0d4e8f0b 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/PunishBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/PunishBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.util.TaskManager; import com.sk89q.worldedit.bukkit.BukkitAdapter; @@ -32,8 +32,8 @@ import java.util.Random; @RequireToolkit -@CommandMethod(value = "brush|b punish|p") -@CommandPermission("voxelsniper.brush.punish") +@Command(value = "brush|b punish|p") +@Permission("voxelsniper.brush.punish") public class PunishBrush extends AbstractPerformerBrush { private static final int TICKS_PER_SECOND = 20; @@ -71,21 +71,21 @@ public void loadProperties() { this.punishDuration = getIntegerProperty("default-punish-duration", DEFAULT_PUNISH_DURATION); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.punish.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -100,7 +100,7 @@ public void onBrushList( )); } - @CommandMethod("toggleSelf") + @Command("toggleSelf") public void onBrushToggleself( final @NotNull Snipe snipe ) { @@ -114,7 +114,7 @@ public void onBrushToggleself( } } - @CommandMethod("toggleHypnoLandscape") + @Command("toggleHypnoLandscape") public void onBrushToggleHypnoLandscape( final @NotNull Snipe snipe ) { @@ -127,7 +127,7 @@ public void onBrushToggleHypnoLandscape( )); } - @CommandMethod("") + @Command("") public void onBrushPunishment( final @NotNull Snipe snipe, final @NotNull @Argument("punishment") Punishment punishment @@ -141,7 +141,7 @@ public void onBrushPunishment( )); } - @CommandMethod("toggleSM ") + @Command("toggleSM ") public void onBrushTogglesm( final @NotNull Snipe snipe, final @NotNull @Argument("player") Player player diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/RingBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/RingBrush.java index e2cbb853..bc25c618 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/RingBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/RingBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -14,8 +14,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b ring|ri") -@CommandPermission("voxelsniper.brush.ring") +@Command(value = "brush|b ring|ri") +@Permission("voxelsniper.brush.ring") public class RingBrush extends AbstractPerformerBrush { private static final double DEFAULT_INNER_SIZE = 0.0; @@ -24,21 +24,21 @@ public class RingBrush extends AbstractPerformerBrush { private double innerSize = DEFAULT_INNER_SIZE; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.ring.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle @@ -52,7 +52,7 @@ public void onBrushTruecircle( )); } - @CommandMethod("ir ") + @Command("ir ") public void onBrushIr( final @NotNull Snipe snipe, final @Argument("inner-size") double innerSize diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SetBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SetBrush.java index 5b7bf3bf..2eac55e5 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SetBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SetBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.World; @@ -12,8 +12,8 @@ import org.jetbrains.annotations.Nullable; @RequireToolkit -@CommandMethod(value = "brush|b set") -@CommandPermission("voxelsniper.brush.set") +@Command(value = "brush|b set") +@Permission("voxelsniper.brush.set") public class SetBrush extends AbstractPerformerBrush { private static final int SELECTION_SIZE_MAX = 5000000; @@ -29,7 +29,7 @@ public void loadProperties() { this.selectionSizeMax = getIntegerProperty("selection-size-max", SELECTION_SIZE_MAX); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SnipeBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SnipeBrush.java index d9af3352..d6681421 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SnipeBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SnipeBrush.java @@ -1,22 +1,22 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; import com.thevoxelbox.voxelsniper.sniper.snipe.Snipe; import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b snipe|s") -@CommandPermission("voxelsniper.brush.snipe") +@Command(value = "brush|b snipe|s") +@Permission("voxelsniper.brush.snipe") public class SnipeBrush extends AbstractPerformerBrush { @Override public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SplineBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SplineBrush.java index bb193198..770698e2 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SplineBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/SplineBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -18,8 +18,8 @@ * the splines will be included. */ @RequireToolkit -@CommandMethod(value = "brush|b spline|sp") -@CommandPermission("voxelsniper.brush.ellipsoid") +@Command(value = "brush|b spline|sp") +@Permission("voxelsniper.brush.ellipsoid") public class SplineBrush extends AbstractPerformerBrush { private final List endPts = new ArrayList<>(); @@ -32,21 +32,21 @@ public class SplineBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.spline.info")); } - @CommandMethod("ss") + @Command("ss") public void onBrushSs( final @NotNull Snipe snipe ) { @@ -62,7 +62,7 @@ public void onBrushSs( )); } - @CommandMethod("sc") + @Command("sc") public void onBrushSc( final @NotNull Snipe snipe ) { @@ -78,14 +78,14 @@ public void onBrushSc( )); } - @CommandMethod("clear") + @Command("clear") public void onBrushClear( final @NotNull Snipe snipe ) { this.clear(snipe); } - @CommandMethod("ren") + @Command("ren") public void onBrushRen( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/ThreePointCircleBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/ThreePointCircleBrush.java index 1853fece..518307fa 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/ThreePointCircleBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/ThreePointCircleBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; @@ -19,8 +19,8 @@ import java.util.Arrays; @RequireToolkit -@CommandMethod(value = "brush|b three_point_circle|threepointcircle|tpc") -@CommandPermission("voxelsniper.brush.threepointcircle") +@Command(value = "brush|b three_point_circle|threepointcircle|tpc") +@Permission("voxelsniper.brush.threepointcircle") public class ThreePointCircleBrush extends AbstractPerformerBrush { private static final Tolerance DEFAULT_TOLERANCE = Tolerance.DEFAULT; @@ -39,21 +39,21 @@ public void loadProperties() { this.tolerance = (Tolerance) getEnumProperty("default-tolerance", Tolerance.class, DEFAULT_TOLERANCE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.three-point-circle.info")); } - @CommandMethod("list") + @Command("list") public void onBrushList( final @NotNull Snipe snipe ) { @@ -68,7 +68,7 @@ public void onBrushList( )); } - @CommandMethod("") + @Command("") public void onBrushTolerance( final @NotNull Snipe snipe, final @NotNull @Argument("tolerance") Tolerance tolerance diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/TriangleBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/TriangleBrush.java index 9565bb73..613df237 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/TriangleBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/TriangleBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -14,8 +14,8 @@ import java.util.stream.IntStream; @RequireToolkit -@CommandMethod(value = "brush|b triangle|tri") -@CommandPermission("voxelsniper.brush.triangle") +@Command(value = "brush|b triangle|tri") +@Permission("voxelsniper.brush.triangle") public class TriangleBrush extends AbstractPerformerBrush { private final double[] coordinatesOne = new double[3]; // Three corners @@ -32,14 +32,14 @@ public class TriangleBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/UnderlayBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/UnderlayBrush.java index c6b1fad4..f7b1b1ce 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/UnderlayBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/UnderlayBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; @@ -17,8 +17,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b underlay|under") -@CommandPermission("voxelsniper.brush.underlay") +@Command(value = "brush|b underlay|under") +@Permission("voxelsniper.brush.underlay") public class UnderlayBrush extends AbstractPerformerBrush { private static final int DEFAULT_DEPTH = 3; @@ -32,21 +32,21 @@ public void loadProperties() { this.depth = getIntegerProperty("default-depth", DEFAULT_DEPTH); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.performer-brush.underlay.info")); } - @CommandMethod("all") + @Command("all") public void onBrushAll( final @NotNull Snipe snipe ) { @@ -59,7 +59,7 @@ public void onBrushAll( )); } - @CommandMethod("some") + @Command("some") public void onBrushSome( final @NotNull Snipe snipe ) { @@ -72,7 +72,7 @@ public void onBrushSome( )); } - @CommandMethod("d ") + @Command("d ") public void onBrushD( final @NotNull Snipe snipe, final @Argument("depth") @Range(min = "1") int depth diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/VoxelBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/VoxelBrush.java index 81dea79e..de779713 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/VoxelBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/VoxelBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; import com.thevoxelbox.voxelsniper.sniper.snipe.Snipe; @@ -9,15 +9,15 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b voxel|v") -@CommandPermission("voxelsniper.brush.voxel") +@Command(value = "brush|b voxel|v") +@Permission("voxelsniper.brush.voxel") public class VoxelBrush extends AbstractPerformerBrush { @Override public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscBrush.java index 76c51fb4..16564428 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.disc; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.math.MutableBlockVector3; import com.sk89q.worldedit.math.BlockVector3; @@ -16,8 +16,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b disc|d") -@CommandPermission("voxelsniper.brush.disc") +@Command(value = "brush|b disc|d") +@Permission("voxelsniper.brush.disc") public class DiscBrush extends AbstractPerformerBrush { private boolean trueCircle; @@ -26,21 +26,21 @@ public class DiscBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.disc.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscFaceBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscFaceBrush.java index 359f5a13..c0c8394e 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscFaceBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/DiscFaceBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.disc; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Liberal; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Liberal; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.util.Direction; @@ -16,8 +16,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b disc_face|discface|df") -@CommandPermission("voxelsniper.brush.discface") +@Command(value = "brush|b disc_face|discface|df") +@Permission("voxelsniper.brush.discface") public class DiscFaceBrush extends AbstractPerformerBrush { private boolean trueCircle; @@ -26,21 +26,21 @@ public class DiscFaceBrush extends AbstractPerformerBrush { public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.disc-face.info")); } - @CommandMethod("") + @Command("") public void onBrushTruecircle( final @NotNull Snipe snipe, final @Argument("true-circle") @Liberal boolean trueCircle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscBrush.java index 1cc4465f..6438e69b 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.disc; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.brush.type.performer.AbstractPerformerBrush; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -10,15 +10,15 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b voxel_disc|voxeldisc|vd") -@CommandPermission("voxelsniper.brush.voxel_disc") +@Command(value = "brush|b voxel_disc|voxeldisc|vd") +@Permission("voxelsniper.brush.voxel_disc") public class VoxelDiscBrush extends AbstractPerformerBrush { @Override public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscFaceBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscFaceBrush.java index 56c73f1e..44aa530d 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscFaceBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/disc/VoxelDiscFaceBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.disc; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.util.Direction; import com.thevoxelbox.voxelsniper.brush.type.performer.AbstractPerformerBrush; @@ -11,15 +11,15 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b voxel_disc_face|voxeldiscface|vdf") -@CommandPermission("voxelsniper.brush.voxel_disc") +@Command(value = "brush|b voxel_disc_face|voxeldiscface|vdf") +@Permission("voxelsniper.brush.voxel_disc") public class VoxelDiscFaceBrush extends AbstractPerformerBrush { @Override public void loadProperties() { } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterBallBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterBallBrush.java index 1b079daa..272ab7db 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterBallBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterBallBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.splatter; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.brush.type.performer.AbstractPerformerBrush; @@ -14,25 +14,25 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b splatter_ball|splatterball|sb") -@CommandPermission("voxelsniper.brush.splatterball") +@Command(value = "brush|b splatter_ball|splatterball|sb") +@Permission("voxelsniper.brush.splatterball") public class SplatterBallBrush extends AbstractPerformerBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.splatter-ball.info")); } - @CommandMethod("s ") + @Command("s ") public void onBrushS( final @NotNull Snipe snipe, final @Argument("seed-percent") @DynamicRange(min = "seedPercentMin", max = "seedPercentMax") int seedPercent @@ -46,7 +46,7 @@ public void onBrushS( )); } - @CommandMethod("g ") + @Command("g ") public void onBrushG( final @NotNull Snipe snipe, final @Argument("growth-percent") @DynamicRange(min = "growthPercentMin", max = "growthPercentMax") int growthPercent @@ -60,7 +60,7 @@ public void onBrushG( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("splatter-recursions") @DynamicRange(min = "splatterRecursionsMin", max = "splatterRecursionsMax") int splatterRecursions diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterDiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterDiscBrush.java index f3f6f322..6334c888 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterDiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterDiscBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.splatter; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.brush.type.performer.AbstractPerformerBrush; @@ -14,25 +14,25 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b splatter_disc|splatterdisc|sd") -@CommandPermission("voxelsniper.brush.splatterdisc") +@Command(value = "brush|b splatter_disc|splatterdisc|sd") +@Permission("voxelsniper.brush.splatterdisc") public class SplatterDiscBrush extends AbstractPerformerBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.splatter-disc.info")); } - @CommandMethod("s ") + @Command("s ") public void onBrushS( final @NotNull Snipe snipe, final @Argument("seed-percent") @DynamicRange(min = "seedPercentMin", max = "seedPercentMax") int seedPercent @@ -46,7 +46,7 @@ public void onBrushS( )); } - @CommandMethod("g ") + @Command("g ") public void onBrushG( final @NotNull Snipe snipe, final @Argument("growth-percent") @DynamicRange(min = "growthPercentMin", max = "growthPercentMax") int growthPercent @@ -60,7 +60,7 @@ public void onBrushG( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("splatter-recursions") @DynamicRange(min = "splatterRecursionsMin", max = "splatterRecursionsMax") int splatterRecursions diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterOverlayBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterOverlayBrush.java index 89aaf37f..f1963f5b 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterOverlayBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterOverlayBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.splatter; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -21,8 +21,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b splatter_overlay|splatteroverlay|sover") -@CommandPermission("voxelsniper.brush.splatteroverlay") +@Command(value = "brush|b splatter_overlay|splatteroverlay|sover") +@Permission("voxelsniper.brush.splatteroverlay") public class SplatterOverlayBrush extends AbstractPerformerBrush { private static final int DEFAULT_DEPTH = 3; @@ -41,21 +41,21 @@ public void loadProperties() { this.yOffset = getIntegerProperty("default-y-offset", DEFAULT_Y_OFFSET); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.splatter-overlay.info")); } - @CommandMethod("all") + @Command("all") public void onBrushAll( final @NotNull Snipe snipe ) { @@ -68,7 +68,7 @@ public void onBrushAll( )); } - @CommandMethod("some") + @Command("some") public void onBrushSome( final @NotNull Snipe snipe ) { @@ -81,7 +81,7 @@ public void onBrushSome( )); } - @CommandMethod("randh") + @Command("randh") public void onBrushRandh( final @NotNull Snipe snipe ) { @@ -94,7 +94,7 @@ public void onBrushRandh( )); } - @CommandMethod("d ") + @Command("d ") public void onBrushD( final @NotNull Snipe snipe, final @Argument("depth") @Range(min = "1") int depth @@ -108,7 +108,7 @@ public void onBrushD( )); } - @CommandMethod("s ") + @Command("s ") public void onBrushS( final @NotNull Snipe snipe, final @Argument("seed-percent") @DynamicRange(min = "seedPercentMin", max = "seedPercentMax") int seedPercent @@ -122,7 +122,7 @@ public void onBrushS( )); } - @CommandMethod("g ") + @Command("g ") public void onBrushG( final @NotNull Snipe snipe, final @Argument("growth-percent") @DynamicRange(min = "growthPercentMin", max = "growthPercentMax") int growthPercent @@ -136,7 +136,7 @@ public void onBrushG( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("splatter-recursions") @DynamicRange(min = "splatterRecursionsMin", max = "splatterRecursionsMax") int splatterRecursions @@ -150,7 +150,7 @@ public void onBrushR( )); } - @CommandMethod("yoff ") + @Command("yoff ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("y-offset") int yOffset diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelBrush.java index 0ae3ef39..4f96e98f 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.splatter; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.brush.type.performer.AbstractPerformerBrush; @@ -14,25 +14,25 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b splatter_voxel|splattervoxel|sv") -@CommandPermission("voxelsniper.brush.splattervoxel") +@Command(value = "brush|b splatter_voxel|splattervoxel|sv") +@Permission("voxelsniper.brush.splattervoxel") public class SplatterVoxelBrush extends AbstractPerformerBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.splatter-voxel.info")); } - @CommandMethod("s ") + @Command("s ") public void onBrushS( final @NotNull Snipe snipe, final @Argument("seed-percent") @DynamicRange(min = "seedPercentMin", max = "seedPercentMax") int seedPercent @@ -46,7 +46,7 @@ public void onBrushS( )); } - @CommandMethod("g ") + @Command("g ") public void onBrushG( final @NotNull Snipe snipe, final @Argument("growth-percent") @DynamicRange(min = "growthPercentMin", max = "growthPercentMax") int growthPercent @@ -60,7 +60,7 @@ public void onBrushG( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("splatter-recursions") @DynamicRange(min = "splatterRecursionsMin", max = "splatterRecursionsMax") int splatterRecursions diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelDiscBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelDiscBrush.java index 4259cc56..ed72ee84 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelDiscBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/performer/splatter/SplatterVoxelDiscBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.performer.splatter; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.thevoxelbox.voxelsniper.brush.type.performer.AbstractPerformerBrush; @@ -14,25 +14,25 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b splatter_voxel_disc|splattervoxeldisc|svd") -@CommandPermission("voxelsniper.brush.splattervoxel") +@Command(value = "brush|b splatter_voxel_disc|splattervoxeldisc|svd") +@Permission("voxelsniper.brush.splattervoxel") public class SplatterVoxelDiscBrush extends AbstractPerformerBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.splatter-voxel-disc.info")); } - @CommandMethod("s ") + @Command("s ") public void onBrushS( final @NotNull Snipe snipe, final @Argument("seed-percent") @DynamicRange(min = "seedPercentMin", max = "seedPercentMax") int seedPercent @@ -46,7 +46,7 @@ public void onBrushS( )); } - @CommandMethod("g ") + @Command("g ") public void onBrushG( final @NotNull Snipe snipe, final @Argument("growth-percent") @DynamicRange(min = "growthPercentMin", max = "growthPercentMax") int growthPercent @@ -60,7 +60,7 @@ public void onBrushG( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("splatter-recursions") @DynamicRange(min = "splatterRecursionsMin", max = "splatterRecursionsMax") int splatterRecursions diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneFlipBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneFlipBrush.java index c96c71cc..f9cfd540 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneFlipBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneFlipBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.redstone; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.sk89q.worldedit.math.BlockVector3; @@ -17,29 +17,29 @@ import org.jetbrains.annotations.Nullable; @RequireToolkit -@CommandMethod(value = "brush|b set_redstone_flip|setredstoneflip|setrf") -@CommandPermission("voxelsniper.brush.setredstoneflip") +@Command(value = "brush|b set_redstone_flip|setredstoneflip|setrf") +@Permission("voxelsniper.brush.setredstoneflip") public class SetRedstoneFlipBrush extends AbstractBrush { @Nullable private BlockVector3 block; private boolean northSouth = true; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.set-redstone-flip.info")); } - @CommandMethod("ns|n|s") + @Command("ns|n|s") public void onBrushNs( final @NotNull Snipe snipe ) { @@ -49,7 +49,7 @@ public void onBrushNs( messenger.sendMessage(Caption.of("voxelsniper.brush.set-redstone-flip.north-south")); } - @CommandMethod("ew|e|w") + @Command("ew|e|w") public void onBrushEw( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneRotateBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneRotateBrush.java index d7e4692b..9ccafecd 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneRotateBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/redstone/SetRedstoneRotateBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.redstone; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.sk89q.worldedit.math.BlockVector3; @@ -17,14 +17,14 @@ import org.jetbrains.annotations.Nullable; @RequireToolkit -@CommandMethod(value = "brush|b set_redstone_rotate|setredstonerotatep|setrr") -@CommandPermission("voxelsniper.brush.setredstonerotate") +@Command(value = "brush|b set_redstone_rotate|setredstonerotatep|setrr") +@Permission("voxelsniper.brush.setredstonerotate") public class SetRedstoneRotateBrush extends AbstractBrush { @Nullable private BlockVector3 block; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DBrush.java index 83c995b0..52c31462 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.rotation; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -18,8 +18,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b rotation_2d|rotation2d|rot2d|rot2") -@CommandPermission("voxelsniper.brush.rot2d") +@Command(value = "brush|b rotation_2d|rotation2d|rot2d|rot2") +@Permission("voxelsniper.brush.rot2d") public class Rotation2DBrush extends AbstractBrush { private static final int DEFAULT_ANGLE = 0; @@ -29,14 +29,14 @@ public class Rotation2DBrush extends AbstractBrush { private double angle = DEFAULT_ANGLE; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -45,7 +45,7 @@ public void onBrushInfo( )); } - @CommandMethod("") + @Command("") public void onBrushDegreesangle( final @NotNull Snipe snipe, final @Argument("degrees-angle") @Range(min = "0", max = "360") int degreesAngle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DVerticalBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DVerticalBrush.java index 3774236c..bb4d42ac 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DVerticalBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation2DVerticalBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.rotation; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -20,8 +20,8 @@ // The X Y and Z variable names in this file do NOT MAKE ANY SENSE. Do not attempt to actually figure out what on earth is going on here. Just go to the // original 2d horizontal brush if you wish to make anything similar to this, and start there. I didn't bother renaming everything. @RequireToolkit -@CommandMethod(value = "brush|b rotation_2d_vert|rotation2dvert|rot2dv|rot2v") -@CommandPermission("voxelsniper.brush.rot2dvert") +@Command(value = "brush|b rotation_2d_vert|rotation2dvert|rot2dv|rot2v") +@Permission("voxelsniper.brush.rot2dvert") public class Rotation2DVerticalBrush extends AbstractBrush { private static final int DEFAULT_ANGLE = 0; @@ -31,14 +31,14 @@ public class Rotation2DVerticalBrush extends AbstractBrush { private double angle = DEFAULT_ANGLE; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -47,7 +47,7 @@ public void onBrushInfo( )); } - @CommandMethod("") + @Command("") public void onBrushDegreesangle( final @NotNull Snipe snipe, final @Argument("degrees-angle") @Range(min = "0", max = "360") int degreesAngle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation3DBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation3DBrush.java index 155f36ef..7501be19 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation3DBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/rotation/Rotation3DBrush.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.brush.type.rotation; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -18,8 +18,8 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b rotation_3d|rotation3d|rot3d|rot3") -@CommandPermission("voxelsniper.brush.rot3d") +@Command(value = "brush|b rotation_3d|rotation3d|rot3d|rot3") +@Permission("voxelsniper.brush.rot3d") public class Rotation3DBrush extends AbstractBrush { private static final int DEFAULT_SE_YAW = 0; @@ -33,14 +33,14 @@ public class Rotation3DBrush extends AbstractBrush { private double sePitch = DEFAULT_SE_PITCH; private double seRoll = DEFAULT_SE_ROLL; - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -49,7 +49,7 @@ public void onBrushInfo( )); } - @CommandMethod("p ") + @Command("p ") public void onBrushP( final @NotNull Snipe snipe, final @Argument("degrees-angle") @Range(min = "0", max = "360") int degreesAngle @@ -64,7 +64,7 @@ public void onBrushP( )); } - @CommandMethod("r ") + @Command("r ") public void onBrushR( final @NotNull Snipe snipe, final @Argument("degrees-angle") @Range(min = "0", max = "360") int degreesAngle @@ -79,7 +79,7 @@ public void onBrushR( )); } - @CommandMethod("y ") + @Command("y ") public void onBrushY( final @NotNull Snipe snipe, final @Argument("degrees-angle") @Range(min = "0", max = "360") int degreesAngle diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellBallBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellBallBrush.java index 776f97a7..cff9a458 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellBallBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellBallBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.shell; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; @@ -14,11 +14,11 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b shell_ball|shellball|shb") -@CommandPermission("voxelsniper.brush.shellball") +@Command(value = "brush|b shell_ball|shellball|shb") +@Permission("voxelsniper.brush.shellball") public class ShellBallBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellSetBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellSetBrush.java index c874be3f..99005ff9 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellSetBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellSetBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.shell; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; @@ -19,8 +19,8 @@ import java.util.List; @RequireToolkit -@CommandMethod(value = "brush|b shell_set|shellset|shs") -@CommandPermission("voxelsniper.brush.shellset") +@Command(value = "brush|b shell_set|shellset|shs") +@Permission("voxelsniper.brush.shellset") public class ShellSetBrush extends AbstractBrush { private static final int MAX_SIZE = 5000000; @@ -35,7 +35,7 @@ public void loadProperties() { this.maxSize = getIntegerProperty("max-size", MAX_SIZE); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellVoxelBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellVoxelBrush.java index 13821f98..b32e20e8 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellVoxelBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/shell/ShellVoxelBrush.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.brush.type.shell; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.math.BlockVector3; @@ -14,11 +14,11 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b shell_voxel|shellvoxel|shv") -@CommandPermission("voxelsniper.brush.shellvoxel") +@Command(value = "brush|b shell_voxel|shellvoxel|shv") +@Permission("voxelsniper.brush.shellvoxel") public class ShellVoxelBrush extends AbstractBrush { - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stamp/CloneStampBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stamp/CloneStampBrush.java index bba5111f..01f7a884 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stamp/CloneStampBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stamp/CloneStampBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.stamp; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.math.BlockVector3; @@ -16,8 +16,8 @@ * The CloneStamp class is used to create a collection of blocks in a cylinder shape according to the selection the player has set. */ @RequireToolkit -@CommandMethod(value = "brush|b clone_stamp|clonestamp|cs") -@CommandPermission("voxelsniper.brush.clonestamp") +@Command(value = "brush|b clone_stamp|clonestamp|cs") +@Permission("voxelsniper.brush.clonestamp") public class CloneStampBrush extends AbstractStampBrush { private static final StampType DEFAULT_STAMP_TYPE = StampType.DEFAULT; @@ -27,21 +27,21 @@ public void loadProperties() { this.stamp = ((StampType) getEnumProperty("default-stamp-type", StampType.class, DEFAULT_STAMP_TYPE)); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { super.onBrushInfoCommand(snipe, Caption.of("voxelsniper.brush.clone-stamp.info")); } - @CommandMethod("") + @Command("") public void onBrushStamptype( final @NotNull Snipe snipe, final @NotNull @Argument("stamp-type") StampType stampType @@ -56,28 +56,28 @@ public void onBrushStamptype( )); } - @CommandMethod("a") + @Command("a") public void onBrushA( final @NotNull Snipe snipe ) { this.onBrushStamptype(snipe, StampType.NO_AIR); } - @CommandMethod("f") + @Command("f") public void onBrushF( final @NotNull Snipe snipe ) { this.onBrushStamptype(snipe, StampType.FILL); } - @CommandMethod("d") + @Command("d") public void onBrushD( final @NotNull Snipe snipe ) { this.onBrushStamptype(snipe, StampType.DEFAULT); } - @CommandMethod("c
") + @Command("c
") public void onBrushC( final @NotNull Snipe snipe, final @Argument("center") int center diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilBrush.java index 03b4f08f..80384807 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.stencil; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -33,8 +33,8 @@ * block. First byte is ID, second is data. This applies to every one of the line of consecutive blocks if boolean was true.) */ @RequireToolkit -@CommandMethod(value = "brush|b stencil|st") -@CommandPermission("voxelsniper.brush.stencil") +@Command(value = "brush|b stencil|st") +@Permission("voxelsniper.brush.stencil") public class StencilBrush extends AbstractBrush { private static final int DEFAULT_PASTE_OPTION = 1; @@ -64,14 +64,14 @@ public void loadProperties() { this.maxSaveVolume = getIntegerProperty("default-max-save-volume", DEFAULT_MAX_SAVE_VOLUME); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -96,7 +96,7 @@ private void onBrushPasteCommand(Snipe snipe, byte pasteOption, File stencil) { } } - @CommandMethod("full ") + @Command("full ") public void onBrushFull( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil", parserName = "stencil-file_parser") File stencil @@ -104,7 +104,7 @@ public void onBrushFull( this.onBrushPasteCommand(snipe, (byte) 0, stencil); } - @CommandMethod("fill ") + @Command("fill ") public void onBrushFill( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil", parserName = "stencil-file_parser") File stencil @@ -112,7 +112,7 @@ public void onBrushFill( this.onBrushPasteCommand(snipe, (byte) 1, stencil); } - @CommandMethod("replace ") + @Command("replace ") public void onBrushReplace( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil", parserName = "stencil-file_parser") File stencil @@ -120,7 +120,7 @@ public void onBrushReplace( this.onBrushPasteCommand(snipe, (byte) 2, stencil); } - @CommandMethod("") + @Command("") public void onBrushStencil( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil", parserName = "stencil-file_parser") File stencil diff --git a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilListBrush.java b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilListBrush.java index 07fe9433..5e31d462 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilListBrush.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stencil/StencilListBrush.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.brush.type.stencil; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockState; @@ -24,8 +24,8 @@ import java.util.Scanner; @RequireToolkit -@CommandMethod(value = "brush|b stencil_list|stencillist|sl") -@CommandPermission("voxelsniper.brush.stencillist") +@Command(value = "brush|b stencil_list|stencillist|sl") +@Permission("voxelsniper.brush.stencillist") public class StencilListBrush extends AbstractBrush { private static final String NO_FILE_LOADED = "NoFileLoaded"; @@ -47,14 +47,14 @@ public void loadProperties() { this.pasteOption = (byte) getIntegerProperty("default-paste-option", DEFAULT_PASTE_OPTION); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Snipe snipe ) { super.onBrushCommand(snipe); } - @CommandMethod("info") + @Command("info") public void onBrushInfo( final @NotNull Snipe snipe ) { @@ -81,7 +81,7 @@ private void onBrushPasteCommand(Snipe snipe, byte pasteOption, File stencilList } } - @CommandMethod("full ") + @Command("full ") public void onBrushFull( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil-list", parserName = "stencil-list-file_parser") File stencilList @@ -89,7 +89,7 @@ public void onBrushFull( this.onBrushPasteCommand(snipe, (byte) 0, stencilList); } - @CommandMethod("fill ") + @Command("fill ") public void onBrushFill( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil-list", parserName = "stencil-list-file_parser") File stencilList @@ -97,7 +97,7 @@ public void onBrushFill( this.onBrushPasteCommand(snipe, (byte) 1, stencilList); } - @CommandMethod("replace ") + @Command("replace ") public void onBrushReplace( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil-list", parserName = "stencil-list-file_parser") File stencilList @@ -105,7 +105,7 @@ public void onBrushReplace( this.onBrushPasteCommand(snipe, (byte) 2, stencilList); } - @CommandMethod("") + @Command("") public void onBrushStencillist( final @NotNull Snipe snipe, final @NotNull @Argument(value = "stencil-list", parserName = "stencil-list-file_parser") File stencilList diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/CommandRegistry.java b/src/main/java/com/thevoxelbox/voxelsniper/command/CommandRegistry.java index cee9ca90..4b2edb80 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/CommandRegistry.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/CommandRegistry.java @@ -1,30 +1,25 @@ package com.thevoxelbox.voxelsniper.command; -import cloud.commandframework.Command; -import cloud.commandframework.annotations.AnnotationParser; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.MethodCommandExecutionHandler; -import cloud.commandframework.annotations.injection.ParameterInjectorRegistry; -import cloud.commandframework.arguments.CommandArgument; -import cloud.commandframework.arguments.parser.StandardParameters; -import cloud.commandframework.arguments.standard.EnumArgument; -import cloud.commandframework.bukkit.BukkitCommandManager; -import cloud.commandframework.bukkit.CloudBukkitCapabilities; -import cloud.commandframework.captions.CaptionVariable; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.ArgumentParseException; -import cloud.commandframework.exceptions.CommandExecutionException; -import cloud.commandframework.exceptions.InvalidCommandSenderException; -import cloud.commandframework.exceptions.InvalidSyntaxException; -import cloud.commandframework.exceptions.NoPermissionException; -import cloud.commandframework.exceptions.parsing.ParserException; -import cloud.commandframework.execution.CommandExecutionCoordinator; -import cloud.commandframework.execution.FilteringCommandSuggestionProcessor; -import cloud.commandframework.keys.CloudKey; -import cloud.commandframework.keys.SimpleCloudKey; -import cloud.commandframework.meta.CommandMeta; -import cloud.commandframework.paper.PaperCommandManager; -import cloud.commandframework.services.types.ConsumerService; +import org.incendo.cloud.Command; +import org.incendo.cloud.SenderMapper; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.MethodCommandExecutionHandler; +import org.incendo.cloud.injection.ParameterInjectorRegistry; +import org.incendo.cloud.parser.standard.EnumParser; +import org.incendo.cloud.bukkit.BukkitCommandManager; +import org.incendo.cloud.bukkit.CloudBukkitCapabilities; +import org.incendo.cloud.caption.CaptionVariable; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.exception.ArgumentParseException; +import org.incendo.cloud.exception.InvalidCommandSenderException; +import org.incendo.cloud.exception.InvalidSyntaxException; +import org.incendo.cloud.exception.NoPermissionException; +import org.incendo.cloud.exception.handling.ExceptionHandler; +import org.incendo.cloud.exception.parsing.ParserException; +import org.incendo.cloud.execution.ExecutionCoordinator; +import org.incendo.cloud.key.CloudKey; +import org.incendo.cloud.paper.PaperCommandManager; +import org.incendo.cloud.services.type.ConsumerService; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; @@ -48,6 +43,7 @@ import io.leangen.geantyref.TypeToken; import org.apache.commons.lang3.ClassUtils; import org.bukkit.entity.Player; +import org.incendo.cloud.annotations.AnnotationParser; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -59,19 +55,19 @@ public class CommandRegistry { - public static final CloudKey SNIPE_KEY = createTypeKey( + public static final CloudKey SNIPE_KEY = createCloudKey( "snipe", Snipe.class ); - public static final CloudKey PERFORMER_SNIPE_KEY = createTypeKey( + public static final CloudKey PERFORMER_SNIPE_KEY = createCloudKey( "snipe", PerformerSnipe.class ); - public static final CloudKey TOOLKIT_KEY = createTypeKey( + public static final CloudKey TOOLKIT_KEY = createCloudKey( "toolkit", Toolkit.class ); private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); private static final String NO_DESCRIPTION = "No Description."; - private static final CommandMeta.Key REQUIRE_TOOLKIT = createMetaKey( + private static final CloudKey REQUIRE_TOOLKIT = createCloudKey( "require-toolkit", Boolean.class ); @@ -107,15 +103,14 @@ private BukkitCommandManager createCommandManager() throws Exce // Creates the command manager according to the server platform. PaperCommandManager commandManager = new PaperCommandManager<>( plugin, - CommandExecutionCoordinator.simpleCoordinator(), - commandSender -> plugin.getSniperRegistry().getSniperCommander(commandSender), - SniperCommander::getCommandSender + ExecutionCoordinator.simpleCoordinator(), + SenderMapper.create( + commandSender -> plugin.getSniperRegistry().getSniperCommander(commandSender), + SniperCommander::getCommandSender + ) ); // Handles extra registrations. - commandManager.commandSuggestionProcessor(new FilteringCommandSuggestionProcessor<>( - FilteringCommandSuggestionProcessor.Filter.contains(true).andTrimBeforeLastSpace() - )); if (commandManager.hasCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)) { commandManager.registerAsynchronousCompletions(); } @@ -138,18 +133,16 @@ private BukkitCommandManager createCommandManager() throws Exce // Handles post-processor. commandManager.registerCommandPostProcessor(context -> { // Ensures that we are working with a voxel sniper annotated command. - CommandContext commandContext = context.getCommandContext(); - Command command = context.getCommand(); - if (!(commandContext.getSender() instanceof Sniper sniper) - || !(command.getCommandExecutionHandler() instanceof MethodCommandExecutionHandler handler)) { + CommandContext commandContext = context.commandContext(); + Command command = context.command(); + if (!(commandContext.sender() instanceof Sniper sniper) + || !(command.commandExecutionHandler() instanceof MethodCommandExecutionHandler handler)) { return; } Toolkit toolkit; // Toolkit requirement relies on the custom annotation. - if (command.getCommandMeta() - .get(REQUIRE_TOOLKIT) - .orElse(false)) { + if (command.commandMeta().getOrDefault(REQUIRE_TOOLKIT, false)) { if ((toolkit = sniper.getCurrentToolkit()) == null) { sniper.print(Caption.of("voxelsniper.command.missing-toolkit")); ConsumerService.interrupt(); @@ -181,54 +174,49 @@ private BukkitCommandManager createCommandManager() throws Exce }); // Handles exceptions. - commandManager.registerExceptionHandler(InvalidSyntaxException.class, (commander, e) -> - commander.print(Caption.of( + commandManager.exceptionController().registerHandler(InvalidSyntaxException.class, ctx -> + ctx.context().sender().print(Caption.of( "voxelsniper.command.invalid-command-syntax", - e.getCorrectSyntax() - ))); - commandManager.registerExceptionHandler(InvalidCommandSenderException.class, (commander, e) -> - commander.print(Caption.of( + ctx.exception().correctSyntax() + )) + ).registerHandler(InvalidCommandSenderException.class, ctx -> + ctx.context().sender().print(Caption.of( "voxelsniper.command.invalid-sender-type", - e.getRequiredSender().getSimpleName() - ))); - commandManager.registerExceptionHandler(NoPermissionException.class, (commander, e) -> - commander.print(Caption.of( + ctx.exception().requiredSender().getSimpleName() + )) + ).registerHandler(NoPermissionException.class, ctx -> + ctx.context().sender().print(Caption.of( "voxelsniper.command.missing-permission", - e.getMissingPermission() - ))); - commandManager.registerExceptionHandler(ArgumentParseException.class, (commander, e) -> { - Throwable t = e.getCause(); - - if (t instanceof VoxelCommandElementParseException ve) { - commander.print(ve.getErrorMessage()); - } else if (t instanceof EnumArgument.EnumParseException ee) { - commander.print(Caption.of( + ctx.exception().missingPermission() + )) + ).registerHandler( + ArgumentParseException.class, + ExceptionHandler.unwrappingHandler() + ).registerHandler(VoxelCommandElementParseException.class, ctx -> + ctx.context().sender().print(ctx.exception().getErrorMessage()) + ).registerHandler(EnumParser.EnumParseException.class, ctx -> + ctx.context().sender().print(Caption.of( "voxelsniper.command.invalid-enum", - ee.getInput(), + ctx.exception().input(), VoxelSniperText.formatList( - Arrays.stream(ee.getEnumClass().getEnumConstants()).toList(), + Arrays.stream(ctx.exception().enumClass().getEnumConstants()).toList(), (value, value2) -> Integer.compare(value.ordinal(), value2.ordinal()), value -> TextComponent.of(value.name().toLowerCase(Locale.ROOT)), "voxelsniper.command.invalid-enum" ) - )); - } else if (t instanceof ParserException pe) { - commander.print(Caption.of( - pe.errorCaption() - .getKey() + )) + ).registerHandler(ParserException.class, ctx -> + ctx.context().sender().print(Caption.of( + ctx.exception().errorCaption() + .key() .replace("argument.parse.failure.", "voxelsniper.command.invalid-"), - Arrays.stream(pe.captionVariables()) - .map(CaptionVariable::getValue) + Arrays.stream(ctx.exception().captionVariables()) + .map(CaptionVariable::value) .toArray(Object[]::new) - )); - } else { - commander.print(Caption.of("voxelsniper.error.unexpected")); - e.printStackTrace(); - } - }); - commandManager.registerExceptionHandler(CommandExecutionException.class, (commander, e) -> { - commander.print(Caption.of("voxelsniper.error.unexpected")); - e.printStackTrace(); + )) + ).registerHandler(Throwable.class, ctx -> { + ctx.context().sender().print(Caption.of("voxelsniper.error.unexpected")); + ctx.exception().printStackTrace(); }); return commandManager; @@ -238,11 +226,7 @@ private AnnotationParser createAnnotationParser(BukkitCommandMa // Creates the annotation parser. AnnotationParser annotationParser = new AnnotationParser<>( commandManager, - SniperCommander.class, - parserParameters -> CommandMeta.simple() - .with(CommandMeta.DESCRIPTION, parserParameters - .get(StandardParameters.DESCRIPTION, NO_DESCRIPTION)) - .build() + SniperCommander.class ); // Handles the custom annotations. @@ -290,7 +274,7 @@ private void handleDynamicRanges( MethodCommandExecutionHandler handler, Object instance ) { - SniperCommander commander = commandContext.getSender(); + SniperCommander commander = commandContext.sender(); MethodCommandExecutionHandler.CommandMethodContext methodContext = handler.context(); // Dynamic range is based on executor instance fields, we must postprocess them manually. @@ -310,9 +294,7 @@ private void handleDynamicRanges( argumentName = this.annotationParser.processString(argumentAnnotation.value()); } - CommandArgument argument = - (CommandArgument) methodContext.commandArguments().get(argumentName); - double number = commandContext.get(argument).doubleValue(); + double number = commandContext.get(argumentName).doubleValue(); DynamicRange dynamicRangeAnnotation = parameter.getAnnotation(DynamicRange.class); String min = dynamicRangeAnnotation.min(); @@ -444,12 +426,8 @@ public AnnotationParser getAnnotationParser() { return annotationParser; } - private static CloudKey createTypeKey(String id, Class clazz) { - return SimpleCloudKey.of("voxelsniper-" + id, TypeToken.get(clazz)); - } - - private static CommandMeta.Key createMetaKey(String id, Class clazz) { - return CommandMeta.Key.of(TypeToken.get(clazz), "voxelsniper-" + id); + private static CloudKey createCloudKey(String id, Class clazz) { + return CloudKey.of("voxelsniper-" + id, TypeToken.get(clazz)); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelMethodCommandExecutionHandler.java b/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelMethodCommandExecutionHandler.java index a3841e81..a97d43f8 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelMethodCommandExecutionHandler.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelMethodCommandExecutionHandler.java @@ -1,13 +1,16 @@ package com.thevoxelbox.voxelsniper.command; -import cloud.commandframework.annotations.MethodCommandExecutionHandler; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.CommandExecutionException; +import org.incendo.cloud.annotations.MethodCommandExecutionHandler; +import org.incendo.cloud.annotations.method.ParameterValue; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.exception.CommandExecutionException; import org.checkerframework.checker.nullness.qual.NonNull; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; +import java.util.List; import java.util.function.Function; +import java.util.stream.Collectors; public class VoxelMethodCommandExecutionHandler extends MethodCommandExecutionHandler { @@ -36,11 +39,10 @@ public void execute(@NonNull CommandContext commandContext) { this.methodHandle .bindTo(executorInstanceSupplier.apply(commandContext)) .invokeWithArguments( - this.createParameterValues( - commandContext, - commandContext.flags(), - super.parameters() - ) + this.createParameterValues(commandContext) + .stream() + .map(ParameterValue::value) + .collect(Collectors.toList()) ); } catch (final Error e) { throw e; diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractFileArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractFileArgument.java index e2294f89..07e92f30 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractFileArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractFileArgument.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; @@ -11,8 +11,6 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.List; -import java.util.Queue; import java.util.stream.Stream; public abstract class AbstractFileArgument implements VoxelCommandElement { @@ -41,29 +39,22 @@ public AbstractFileArgument(VoxelSniperPlugin plugin, Path rootPath, String exte } } - protected List suggestFiles(CommandContext commandContext, String input) { + protected Stream suggestFiles(CommandContext commandContext, String input) { Path inputPath = rootPath.resolve(input); try (Stream files = Files.list(Files.isDirectory(inputPath) ? inputPath : inputPath.getParent())) { return files.map(path -> path.getFileName().toString()) - .flatMap(path -> Stream.of(path, path.replace(extension, ""))) - .toList(); + .flatMap(path -> Stream.of(path, path.replace(extension, ""))); } catch (IOException e) { throw new RuntimeException(e); } } - protected File parseFile(CommandContext commandContext, Queue inputQueue) { - String input = inputQueue.peek(); - if (input == null) { - throw new NoInputProvidedException(AbstractFileArgument.class, commandContext); - } - + protected File parseFile(CommandContext commandContext, CommandInput input) { + final String fileName = input.readString(); try { - File file = rootPath.resolve(input.endsWith(extension) ? input : input + extension).toFile(); - inputQueue.remove(); - return file; + return rootPath.resolve(fileName.endsWith(extension) ? fileName : fileName + extension).toFile(); } catch (Exception e) { - throw new VoxelCommandElementParseException(input, Caption.of( + throw new VoxelCommandElementParseException(fileName, Caption.of( "voxelsniper.command.invalid-file", input )); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractPatternArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractPatternArgument.java index 2773673c..af2c07a7 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractPatternArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractPatternArgument.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; @@ -16,7 +16,6 @@ import java.util.List; import java.util.Locale; -import java.util.Queue; public abstract class AbstractPatternArgument implements VoxelCommandElement { @@ -44,32 +43,27 @@ protected List suggestPatterns(CommandContext commandCo return factory.getSuggestions(input); } - protected BrushPattern parsePattern(CommandContext commandContext, Queue inputQueue) { - String input = inputQueue.peek(); - if (input == null) { - throw new NoInputProvidedException(AbstractPatternArgument.class, commandContext); - } - - SniperCommander commander = commandContext.getSender(); + protected BrushPattern parsePattern(CommandContext commandContext, CommandInput input) { + SniperCommander commander = commandContext.sender(); ParserContext parserContext = commander.createParserContext(); + String patternString = input.readString(); try { T pattern = factory.parseFromInput( - input.toLowerCase(Locale.ROOT), + patternString.toLowerCase(Locale.ROOT), parserContext ); CommandSender sender = commander.getCommandSender(); if (!sender.hasPermission("voxelsniper.ignorelimitations") - && config.getLitesniperRestrictedMaterials().contains(getPatternResource(input, pattern))) { - throw new VoxelCommandElementParseException(input, Caption.of( + && config.getLitesniperRestrictedMaterials().contains(getPatternResource(patternString, pattern))) { + throw new VoxelCommandElementParseException(patternString, Caption.of( "voxelsniper.command.not-allowed", input )); } - inputQueue.remove(); - return new BrushPattern(pattern, input); + return new BrushPattern(pattern, patternString); } catch (InputParseException e) { - throw new VoxelCommandElementParseException(input, Caption.of( + throw new VoxelCommandElementParseException(patternString, Caption.of( parseExceptionCaptionKey, input )); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractRegistryArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractRegistryArgument.java index 76e262b8..bbabfee0 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractRegistryArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/AbstractRegistryArgument.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.registry.Keyed; import com.sk89q.worldedit.registry.NamespacedRegistry; @@ -9,9 +9,8 @@ import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; -import java.util.List; import java.util.Locale; -import java.util.Queue; +import java.util.stream.Stream; public abstract class AbstractRegistryArgument implements VoxelCommandElement { @@ -33,17 +32,12 @@ public AbstractRegistryArgument(VoxelSniperPlugin plugin, NamespacedRegistry this.parseExceptionCaptionKey = parseExceptionCaptionKey; } - protected List suggestValues(CommandContext commandContext, String input) { - return registry.getSuggestions(input) - .toList(); + protected Stream suggestValues(CommandContext commandContext, String input) { + return registry.getSuggestions(input); } - protected T parseValue(CommandContext commandContext, Queue inputQueue) { - String input = inputQueue.peek(); - if (input == null) { - throw new NoInputProvidedException(AbstractRegistryArgument.class, commandContext); - } - + protected T parseValue(CommandContext commandContext, CommandInput commandInput) { + final String input = commandInput.readString(); T value = registry.get(input.toLowerCase(Locale.ROOT)); if (value == null) { throw new VoxelCommandElementParseException(input, Caption.of( @@ -52,7 +46,6 @@ protected T parseValue(CommandContext commandContext, Queue { @@ -23,13 +23,13 @@ public BiomeTypeArgument(VoxelSniperPlugin plugin) { } @Suggestions("biome-type_suggestions") - public List suggestBiomeTypes(CommandContext commandContext, String input) { + public Stream suggestBiomeTypes(CommandContext commandContext, String input) { return super.suggestValues(commandContext, input); } @Parser(suggestions = "biome-type_suggestions") - public BiomeType parseBiomeType(CommandContext commandContext, Queue inputQueue) { - return super.parseValue(commandContext, inputQueue); + public BiomeType parseBiomeType(CommandContext commandContext, CommandInput commandInput) { + return super.parseValue(commandContext, commandInput); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockArgument.java index 73dd49da..c7c68fb9 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockArgument.java @@ -1,8 +1,9 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.world.block.BaseBlock; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; @@ -10,7 +11,6 @@ import com.thevoxelbox.voxelsniper.sniper.SniperCommander; import java.util.List; -import java.util.Queue; public class BlockArgument extends AbstractPatternArgument { @@ -30,8 +30,8 @@ public List suggestBlocks(CommandContext commandContext } @Parser(name = "block_parser", suggestions = "block_suggestions") - public BrushPattern parseBlock(CommandContext commandContext, Queue inputQueue) { - return super.parsePattern(commandContext, inputQueue); + public BrushPattern parseBlock(CommandContext commandContext, CommandInput commandInput) { + return super.parsePattern(commandContext, commandInput); } @Override diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockTypeArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockTypeArgument.java index f286f89f..17df9b2c 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockTypeArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BlockTypeArgument.java @@ -1,14 +1,16 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.sk89q.worldedit.world.block.BlockType; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; import java.util.List; import java.util.Queue; +import java.util.stream.Stream; public class BlockTypeArgument extends AbstractRegistryArgument { @@ -23,13 +25,13 @@ public BlockTypeArgument(VoxelSniperPlugin plugin) { } @Suggestions("block-type_suggestions") - public List suggestBlockTypes(CommandContext commandContext, String input) { + public Stream suggestBlockTypes(CommandContext commandContext, String input) { return super.suggestValues(commandContext, input); } @Parser(suggestions = "block-type_suggestions") - public BlockType parseBlockType(CommandContext commandContext, Queue inputQueue) { - return super.parseValue(commandContext, inputQueue); + public BlockType parseBlockType(CommandContext commandContext, CommandInput commandInput) { + return super.parseValue(commandContext, commandInput); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BrushPropertiesArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BrushPropertiesArgument.java index 8f1294cf..99510908 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BrushPropertiesArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/BrushPropertiesArgument.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.brush.BrushRegistry; @@ -15,6 +15,7 @@ import java.util.List; import java.util.Map; import java.util.Queue; +import java.util.stream.Stream; public class BrushPropertiesArgument implements VoxelCommandElement { @@ -33,26 +34,21 @@ public BrushPropertiesArgument(VoxelSniperPlugin plugin) { } @Suggestions("brush-properties_suggestions") - public List suggestBrushProperties(CommandContext commandContext, String input) { - SniperCommander commander = commandContext.getSender(); + public Stream suggestBrushProperties(CommandContext commandContext, String input) { + SniperCommander commander = commandContext.sender(); CommandSender sender = commander.getCommandSender(); return brushRegistry.getBrushesProperties().entrySet().stream() .filter(entry -> { String permission = entry.getValue().getPermission(); return permission == null || sender.hasPermission(permission); }) - .map(Map.Entry::getKey) - .toList(); + .map(Map.Entry::getKey); } @Parser(name = "brush-properties_parser", suggestions = "brush-properties_suggestions") - public BrushProperties parseBrushProperties(CommandContext commandContext, Queue inputQueue) { - String input = inputQueue.peek(); - if (input == null) { - throw new NoInputProvidedException(BrushPropertiesArgument.class, commandContext); - } - - SniperCommander commander = commandContext.getSender(); + public BrushProperties parseBrushProperties(CommandContext commandContext, CommandInput commandInput) { + SniperCommander commander = commandContext.sender(); + String input = commandInput.readString(); BrushProperties properties = brushRegistry.getBrushProperties(input); if (properties == null) { throw new VoxelCommandElementParseException(input, Caption.of( @@ -69,7 +65,6 @@ public BrushProperties parseBrushProperties(CommandContext comm )); } - inputQueue.remove(); return properties; } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityClassArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityClassArgument.java index d263fca6..612b3cc3 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityClassArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityClassArgument.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; @@ -14,7 +14,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Queue; public class EntityClassArgument implements VoxelCommandElement { @@ -57,12 +56,8 @@ public List suggestEntityClasses(CommandContext commandContext, } @Parser(name = "entity-class_parser", suggestions = "entity-class_suggestions") - public Class parseEntityClass(CommandContext commandContext, Queue inputQueue) { - String input = inputQueue.peek(); - if (input == null) { - throw new NoInputProvidedException(EntityClassArgument.class, commandContext); - } - + public Class parseEntityClass(CommandContext commandContext, CommandInput commandInput) { + String input = commandInput.readString(); Class clazz = getEntityClass(input); if (clazz == null) { throw new VoxelCommandElementParseException(input, Caption.of( @@ -71,7 +66,6 @@ public Class parseEntityClass(CommandContext commandCo )); } - inputQueue.remove(); return clazz; } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityTypeArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityTypeArgument.java index 5fa8d4c9..bca3c765 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityTypeArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/EntityTypeArgument.java @@ -1,14 +1,14 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.sk89q.worldedit.world.entity.EntityType; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; -import java.util.List; -import java.util.Queue; +import java.util.stream.Stream; public class EntityTypeArgument extends AbstractRegistryArgument { @@ -23,13 +23,13 @@ public EntityTypeArgument(VoxelSniperPlugin plugin) { } @Suggestions("entity-type_suggestions") - public List suggestEntityTypes(CommandContext commandContext, String input) { + public Stream suggestEntityTypes(CommandContext commandContext, String input) { return super.suggestValues(commandContext, input); } @Parser(suggestions = "entity-type_suggestions") - public EntityType parseEntityType(CommandContext commandContext, Queue inputQueue) { - return super.parseValue(commandContext, inputQueue); + public EntityType parseEntityType(CommandContext commandContext, CommandInput commandInput) { + return super.parseValue(commandContext, commandInput); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/PatternArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/PatternArgument.java index af7bccf4..13303b52 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/PatternArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/PatternArgument.java @@ -1,15 +1,15 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.sk89q.worldedit.function.pattern.Pattern; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.brush.property.BrushPattern; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; import java.util.List; -import java.util.Queue; public class PatternArgument extends AbstractPatternArgument { @@ -29,8 +29,8 @@ public List suggestPatterns(CommandContext commandConte } @Parser(name = "pattern_parser", suggestions = "pattern_suggestions") - public BrushPattern parsePattern(CommandContext commandContext, Queue inputQueue) { - return super.parsePattern(commandContext, inputQueue); + public BrushPattern parsePattern(CommandContext commandContext, CommandInput commandInput) { + return super.parsePattern(commandContext, commandInput); } @Override diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/SignFileArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/SignFileArgument.java index 469a5015..5fb8b0b2 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/SignFileArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/SignFileArgument.java @@ -1,14 +1,14 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; import java.io.File; -import java.util.List; -import java.util.Queue; +import java.util.stream.Stream; public class SignFileArgument extends AbstractFileArgument { @@ -23,13 +23,13 @@ public SignFileArgument(VoxelSniperPlugin plugin) { } @Suggestions("sign-file_suggestions") - public List suggestSignFiles(CommandContext commandContext, String input) { + public Stream suggestSignFiles(CommandContext commandContext, String input) { return super.suggestFiles(commandContext, input); } @Parser(name = "sign-file_parser", suggestions = "sign-file_suggestions") - public File parseSignFile(CommandContext commandContext, Queue inputQueue) { - return super.parseFile(commandContext, inputQueue); + public File parseSignFile(CommandContext commandContext, CommandInput commandInput) { + return super.parseFile(commandContext, commandInput); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilFileArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilFileArgument.java index 0ecf3401..35285834 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilFileArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilFileArgument.java @@ -1,14 +1,14 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; import java.io.File; -import java.util.List; -import java.util.Queue; +import java.util.stream.Stream; public class StencilFileArgument extends AbstractFileArgument { @@ -23,13 +23,13 @@ public StencilFileArgument(VoxelSniperPlugin plugin) { } @Suggestions("stencil-file_suggestions") - public List suggestStencilFiles(CommandContext commandContext, String input) { + public Stream suggestStencilFiles(CommandContext commandContext, String input) { return super.suggestFiles(commandContext, input); } @Parser(name = "stencil-file_parser", suggestions = "stencil-file_suggestions") - public File parseStencilFile(CommandContext commandContext, Queue inputQueue) { - return super.parseFile(commandContext, inputQueue); + public File parseStencilFile(CommandContext commandContext, CommandInput commandInput) { + return super.parseFile(commandContext, commandInput); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilListFileArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilListFileArgument.java index bde34549..8f02c502 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilListFileArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/StencilListFileArgument.java @@ -1,14 +1,14 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; import java.io.File; -import java.util.List; -import java.util.Queue; +import java.util.stream.Stream; public class StencilListFileArgument extends AbstractFileArgument { @@ -23,13 +23,13 @@ public StencilListFileArgument(VoxelSniperPlugin plugin) { } @Suggestions("stencil-list-file_suggestions") - public List suggestStencilListFiles(CommandContext commandContext, String input) { + public Stream suggestStencilListFiles(CommandContext commandContext, String input) { return super.suggestFiles(commandContext, input); } @Parser(name = "stencil-list-file_parser", suggestions = "stencil-list-file_suggestions") - public File parseStencilListFile(CommandContext commandContext, Queue inputQueue) { - return super.parseFile(commandContext, inputQueue); + public File parseStencilListFile(CommandContext commandContext, CommandInput commandInput) { + return super.parseFile(commandContext, commandInput); } } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/ToolkitArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/ToolkitArgument.java index e3222c7f..05fd4fc2 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/ToolkitArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/ToolkitArgument.java @@ -1,17 +1,16 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; import com.thevoxelbox.voxelsniper.sniper.Sniper; import com.thevoxelbox.voxelsniper.sniper.toolkit.Toolkit; -import java.util.List; -import java.util.Queue; +import java.util.stream.Stream; public class ToolkitArgument implements VoxelCommandElement { @@ -28,22 +27,17 @@ public ToolkitArgument(VoxelSniperPlugin plugin) { } @Suggestions("toolkit_suggestions") - public List suggestToolkits(CommandContext commandContext, String input) { - Sniper sniper = commandContext.getSender(); + public Stream suggestToolkits(CommandContext commandContext, String input) { + Sniper sniper = commandContext.sender(); return sniper.getToolkits().stream() .filter(toolkit -> !toolkit.isDefault()) - .map(Toolkit::getToolkitName) - .toList(); + .map(Toolkit::getToolkitName); } @Parser(suggestions = "toolkit_suggestions") - public Toolkit parseToolkit(CommandContext commandContext, Queue inputQueue) { - String input = inputQueue.peek(); - if (input == null) { - throw new NoInputProvidedException(ToolkitArgument.class, commandContext); - } - - Sniper sniper = commandContext.getSender(); + public Toolkit parseToolkit(CommandContext commandContext, CommandInput commandInput) { + String input = commandInput.readString(); + Sniper sniper = commandContext.sender(); Toolkit toolkit = sniper.getToolkit(input); if (toolkit == null) { throw new VoxelCommandElementParseException(input, Caption.of( @@ -52,7 +46,6 @@ public Toolkit parseToolkit(CommandContext commandContext, Queue )); } - inputQueue.remove(); return toolkit; } diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/VoxelListBlocksArgument.java b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/VoxelListBlocksArgument.java index 32a16dca..250ffaf8 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/argument/VoxelListBlocksArgument.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/argument/VoxelListBlocksArgument.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.argument; -import cloud.commandframework.annotations.parsers.Parser; -import cloud.commandframework.annotations.suggestions.Suggestions; -import cloud.commandframework.context.CommandContext; -import cloud.commandframework.exceptions.parsing.NoInputProvidedException; +import org.incendo.cloud.annotations.parser.Parser; +import org.incendo.cloud.annotations.suggestion.Suggestions; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.extension.input.InputParseException; @@ -14,9 +14,7 @@ import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; import com.thevoxelbox.voxelsniper.sniper.SniperCommander; -import java.util.List; import java.util.Locale; -import java.util.Queue; import java.util.stream.Stream; public class VoxelListBlocksArgument implements VoxelCommandElement { @@ -34,37 +32,32 @@ public VoxelListBlocksArgument(VoxelSniperPlugin plugin) { } @Suggestions("voxel-list-block_suggestions") - public List suggestVoxelListBlocks(CommandContext commandContext, String input) { + public Stream suggestVoxelListBlocks(CommandContext commandContext, String input) { return WorldEdit.getInstance().getBlockFactory() .getSuggestions(input.startsWith("-") ? input.substring(1) : input).stream() - .flatMap(id -> Stream.of(id, "-" + id)) - .toList(); + .flatMap(id -> Stream.of(id, "-" + id)); } @Parser(suggestions = "voxel-list-block_suggestions") - public BlockWrapper[] parseVoxelListBlock(CommandContext commandContext, Queue inputQueue) { - if (inputQueue.isEmpty()) { - throw new NoInputProvidedException(VoxelListBlocksArgument.class, commandContext); - } - - BlockWrapper[] blockWrappers = new BlockWrapper[inputQueue.size()]; + public BlockWrapper[] parseVoxelListBlock(CommandContext commandContext, CommandInput commandInput) { + BlockWrapper[] blockWrappers = new BlockWrapper[commandInput.remainingTokens()]; int i = 0; - while (!inputQueue.isEmpty()) { - String input = inputQueue.peek(); - SniperCommander commander = commandContext.getSender(); + while (commandInput.hasRemainingInput()) { + SniperCommander commander = commandContext.sender(); ParserContext parserContext = commander.createParserContext(); - boolean remove = input.startsWith("-"); + boolean remove = commandInput.peekString().startsWith("-"); if (remove) { - input = input.substring(1); + commandInput.moveCursor(1); } + + String input = commandInput.readString(); try { BaseBlock baseBlock = WorldEdit.getInstance().getBlockFactory().parseFromInput( - input.toLowerCase(Locale.ROOT), + commandInput.readString().toLowerCase(Locale.ROOT), parserContext ); - inputQueue.remove(); blockWrappers[i++] = new BlockWrapper(baseBlock.toBlockState(), remove); } catch (InputParseException e) { throw new VoxelCommandElementParseException(input, Caption.of( diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushExecutor.java index 0e1ecbb6..dc17a47e 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushExecutor.java @@ -1,10 +1,9 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.brush.property.BrushProperties; @@ -19,9 +18,9 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "brush|b") +@Command(value = "brush|b") @CommandDescription("Brush executor.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class BrushExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -32,7 +31,7 @@ public BrushExecutor(VoxelSniperPlugin plugin) { this.config = this.plugin.getVoxelSniperConfig(); } - @CommandMethod("") + @Command("") public void onBrush( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit @@ -49,11 +48,11 @@ public void onBrush( sniper.sendInfo(true); } - @CommandMethod("") + @Command("") public void onBrushSize( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, - final @Argument("size") @Range(min = "0", max = "500") int size + final @Range(min = "0", max = "500") int size ) { ToolkitProperties toolkitProperties = toolkit.getProperties(); Player player = sniper.getPlayer(); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushToolkitExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushToolkitExecutor.java index 979ea381..d7315052 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushToolkitExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/BrushToolkitExecutor.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.world.item.ItemType; @@ -18,9 +18,9 @@ import org.bukkit.inventory.PlayerInventory; import org.jetbrains.annotations.NotNull; -@CommandMethod(value = "brush_toolkit|brushtoolkit|btool") +@Command(value = "brush_toolkit|brushtoolkit|btool") @CommandDescription("Brush toolkit.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class BrushToolkitExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -29,10 +29,10 @@ public BrushToolkitExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("assign ") + @Command("assign ") public void onBrushToolkitAssign( final @NotNull Sniper sniper, - final @NotNull @Argument("action") ToolAction action, + final @NotNull ToolAction action, final @NotNull @Argument("toolkit-name") String name ) { Player player = sniper.getPlayer(); @@ -60,10 +60,10 @@ public void onBrushToolkitAssign( )); } - @CommandMethod("remove ") + @Command("remove ") public void onBrushToolkitRemove( final @NotNull Sniper sniper, - final @NotNull @Argument("toolkit") Toolkit toolkit + final @NotNull Toolkit toolkit ) { if (toolkit.isDefault()) { sniper.print(Caption.of("voxelsniper.command.toolkit.default-tool")); @@ -74,7 +74,7 @@ public void onBrushToolkitRemove( sniper.print(Caption.of("voxelsniper.command.toolkit.removed", toolkit.getToolkitName())); } - @CommandMethod("remove") + @Command("remove") public void onBrushToolkitRemove( final @NotNull Sniper sniper ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/DefaultExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/DefaultExecutor.java index 74c80bf5..9c7df403 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/DefaultExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/DefaultExecutor.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; @@ -12,9 +12,9 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "default|d") +@Command(value = "default|d") @CommandDescription("VoxelSniper Default.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class DefaultExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -23,7 +23,7 @@ public DefaultExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("") + @Command("") public void onDefault( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/GotoExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/GotoExecutor.java index 2563dbf8..ddef2477 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/GotoExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/GotoExecutor.java @@ -1,9 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; @@ -13,9 +12,9 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -@CommandMethod(value = "goto") +@Command(value = "goto") @CommandDescription("Warp to the specified coordinates.") -@CommandPermission("voxelsniper.goto") +@Permission("voxelsniper.goto") public class GotoExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -24,11 +23,11 @@ public GotoExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod(" ") + @Command(" ") public void onGoto( final @NotNull Sniper sniper, - final @Argument("x") int x, - final @Argument("z") int z + final int x, + final int z ) { Player player = sniper.getPlayer(); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PaintExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PaintExecutor.java index 4156803a..2f49e7d7 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PaintExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PaintExecutor.java @@ -1,9 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; import com.thevoxelbox.voxelsniper.sniper.Sniper; @@ -13,9 +12,9 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -@CommandMethod(value = "paint") +@Command(value = "paint") @CommandDescription("Change the selected painting to another painting.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class PaintExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -24,7 +23,7 @@ public PaintExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("") + @Command("") public void onPaint( final @NotNull Sniper sniper ) { @@ -32,7 +31,7 @@ public void onPaint( ArtHelper.paintAuto(player, false); } - @CommandMethod("back") + @Command("back") public void onPaintBack( final @NotNull Sniper sniper ) { @@ -40,10 +39,10 @@ public void onPaintBack( ArtHelper.paintAuto(player, true); } - @CommandMethod("") + @Command("") public void onPaintArt( final @NotNull Sniper sniper, - final @Nullable @Argument("art") Art art + final @Nullable Art art ) { Player player = sniper.getPlayer(); ArtHelper.paint(player, art); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PerformerExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PerformerExecutor.java index 31160e3c..6e5c878d 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PerformerExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/PerformerExecutor.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.brush.Brush; @@ -14,9 +14,9 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p") +@Command(value = "performer|perf|p") @CommandDescription("Performer executor.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class PerformerExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -25,7 +25,7 @@ public PerformerExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelCenterExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelCenterExecutor.java index 171a94cb..8de307b4 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelCenterExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelCenterExecutor.java @@ -1,9 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -15,9 +14,9 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "voxel_center|voxelcenter|vc") +@Command(value = "voxel_center|voxelcenter|vc") @CommandDescription("VoxelCenter & VoxelCentroid input.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelCenterExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -26,11 +25,11 @@ public VoxelCenterExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("
") + @Command("
") public void onVoxelCenter( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, - final @Argument("center") int center + final int center ) { Player player = sniper.getPlayer(); ToolkitProperties toolkitProperties = toolkit.getProperties(); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelChunkExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelChunkExecutor.java index bae55ec0..0a167ab3 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelChunkExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelChunkExecutor.java @@ -1,8 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; @@ -12,9 +12,9 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -@CommandMethod(value = "voxel_chunk|voxelchunk|vchunk") +@Command(value = "voxel_chunk|voxelchunk|vchunk") @CommandDescription("Update the chunk you are standing in.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelChunkExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -23,7 +23,7 @@ public VoxelChunkExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("") + @Command("") public void onVoxelChunk( final @NotNull Sniper sniper ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelExecutor.java index b862ad10..27fa7a58 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelExecutor.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; @@ -24,9 +24,9 @@ import org.jetbrains.annotations.Nullable; @RequireToolkit -@CommandMethod(value = "voxel|v|voxel_ink|voxelink|vi") +@Command(value = "voxel|v|voxel_ink|voxelink|vi") @CommandDescription("Voxel input.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -37,7 +37,7 @@ public VoxelExecutor(VoxelSniperPlugin plugin) { this.config = plugin.getVoxelSniperConfig(); } - @CommandMethod("[pattern]") + @Command("[pattern]") public void onVoxel( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelHeightExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelHeightExecutor.java index a7d7a989..e70211a2 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelHeightExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelHeightExecutor.java @@ -1,9 +1,8 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.thevoxelbox.voxelsniper.VoxelSniperPlugin; import com.thevoxelbox.voxelsniper.command.VoxelCommandElement; import com.thevoxelbox.voxelsniper.command.argument.annotation.RequireToolkit; @@ -15,9 +14,9 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "voxel_height|voxelheight|vh") +@Command(value = "voxel_height|voxelheight|vh") @CommandDescription("VoxelHeight input.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelHeightExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -26,11 +25,11 @@ public VoxelHeightExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("") + @Command("") public void onVoxelHeight( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, - final @Argument("height") int height + final int height ) { Player player = sniper.getPlayer(); ToolkitProperties toolkitProperties = toolkit.getProperties(); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelListExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelListExecutor.java index b81c1960..001a3a79 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelListExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelListExecutor.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; @@ -23,9 +23,9 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "voxel_list|voxellist|vl") +@Command(value = "voxel_list|voxellist|vl") @CommandDescription("Voxel block exclusions list.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelListExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -34,7 +34,7 @@ public VoxelListExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod("") + @Command("") public void onVoxelList( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit @@ -58,7 +58,7 @@ public void onVoxelList( messenger.sendVoxelListMessage(voxelList); } - @CommandMethod("clear") + @Command("clear") public void onVoxelListClear( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit @@ -72,7 +72,7 @@ public void onVoxelListClear( messenger.sendVoxelListMessage(voxelList); } - @CommandMethod("") + @Command("") public void onVoxelListBlocks( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelReplaceExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelReplaceExecutor.java index 20a1253f..0945b281 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelReplaceExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelReplaceExecutor.java @@ -1,9 +1,9 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Argument; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.fastasyncworldedit.core.configuration.Caption; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; @@ -24,9 +24,9 @@ import org.jetbrains.annotations.Nullable; @RequireToolkit -@CommandMethod(value = "voxel_replace|voxelreplace|vr|voxel_ink_replace|voxelinkreplace|vir") +@Command(value = "voxel_replace|voxelreplace|vr|voxel_ink_replace|voxelinkreplace|vir") @CommandDescription("VoxelReplace input.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelReplaceExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -37,7 +37,7 @@ public VoxelReplaceExecutor(VoxelSniperPlugin plugin) { this.config = plugin.getVoxelSniperConfig(); } - @CommandMethod("[block]") + @Command("[block]") public void onVoxelReplace( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelSniperExecutor.java b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelSniperExecutor.java index 428982b3..2990fd02 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelSniperExecutor.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/executor/VoxelSniperExecutor.java @@ -1,10 +1,9 @@ package com.thevoxelbox.voxelsniper.command.executor; -import cloud.commandframework.annotations.Argument; -import cloud.commandframework.annotations.CommandDescription; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; -import cloud.commandframework.annotations.specifier.Range; +import org.incendo.cloud.annotations.CommandDescription; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; +import org.incendo.cloud.annotation.specifier.Range; import com.fastasyncworldedit.core.Fawe; import com.fastasyncworldedit.core.configuration.Caption; import com.intellectualsites.paster.IncendoPaster; @@ -29,9 +28,9 @@ import java.io.IOException; import java.util.Map; -@CommandMethod("voxel_sniper|voxelsniper|vs|favs|fastasyncvoxelsniper") +@Command("voxel_sniper|voxelsniper|vs|favs|fastasyncvoxelsniper") @CommandDescription("FastAsyncVoxelSniper Settings.") -@CommandPermission("voxelsniper.sniper") +@Permission("voxelsniper.sniper") public class VoxelSniperExecutor implements VoxelCommandElement { private final VoxelSniperPlugin plugin; @@ -40,7 +39,7 @@ public VoxelSniperExecutor(VoxelSniperPlugin plugin) { this.plugin = plugin; } - @CommandMethod(value = "") + @Command(value = "") public void onVoxelSniper( final @NotNull Sniper sniper ) { @@ -48,7 +47,7 @@ public void onVoxelSniper( sniper.sendInfo(false); } - @CommandMethod("brushes") + @Command("brushes") public void onVoxelSniperBrushes( final @NotNull SniperCommander commander ) { @@ -65,7 +64,7 @@ public void onVoxelSniperBrushes( )); } - @CommandMethod("brusheslong") + @Command("brusheslong") public void onVoxelSniperBrusheslong( final @NotNull SniperCommander commander ) { @@ -83,11 +82,11 @@ public void onVoxelSniperBrusheslong( } @RequireToolkit - @CommandMethod(value = "range [range]") + @Command(value = "range [range]") public void onVoxelSniperRange( final @NotNull Sniper sniper, final @NotNull Toolkit toolkit, - final @Nullable @Argument("range") @Range(min = "1") Integer range + final @Nullable @Range(min = "1") Integer range ) { ToolkitProperties toolkitProperties = toolkit.getProperties(); toolkitProperties.setBlockTracerRange(range); @@ -98,7 +97,7 @@ public void onVoxelSniperRange( )); } - @CommandMethod("perf|performer") + @Command("perf|performer") public void onVoxelSniperPerformer( final @NotNull SniperCommander commander ) { @@ -116,7 +115,7 @@ public void onVoxelSniperPerformer( )); } - @CommandMethod("perflong|performerlong") + @Command("perflong|performerlong") public void onVoxelSniperPerformerlong( final @NotNull SniperCommander commander ) { @@ -134,7 +133,7 @@ public void onVoxelSniperPerformerlong( )); } - @CommandMethod(value = "enable") + @Command(value = "enable") public void onVoxelSniperEnable( final @NotNull Sniper sniper ) { @@ -145,7 +144,7 @@ public void onVoxelSniperEnable( )); } - @CommandMethod(value = "disable") + @Command(value = "disable") public void onVoxelSniperDisable( final @NotNull Sniper sniper ) { @@ -156,7 +155,7 @@ public void onVoxelSniperDisable( )); } - @CommandMethod(value = "toggle") + @Command(value = "toggle") public void onVoxelSniperToggle( final @NotNull Sniper sniper ) { @@ -168,7 +167,7 @@ public void onVoxelSniperToggle( } @SuppressWarnings("deprecation") // Paper deprecation - @CommandMethod("info") + @Command("info") public void onVoxelSniperInfo( final @NotNull SniperCommander commander ) { @@ -180,8 +179,8 @@ public void onVoxelSniperInfo( )); } - @CommandMethod("reload") - @CommandPermission("voxelsniper.admin") + @Command("reload") + @Permission("voxelsniper.admin") public void onVoxelSniperReload( final @NotNull SniperCommander commander ) { @@ -189,8 +188,8 @@ public void onVoxelSniperReload( commander.print(Caption.of("voxelsniper.command.voxel-sniper.config-reload")); } - @CommandMethod("debugpaste") - @CommandPermission("voxelsniper.admin") + @Command("debugpaste") + @Permission("voxelsniper.admin") public void onVoxelSniperDebugpaste( final @NotNull SniperCommander commander ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboNoPhysicsPerformer.java index 4b5f5235..ef8a8555 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-combo-nophys|ccp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-combo-nophys|ccp") +@Permission("voxelsniper.sniper") public class ComboComboNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboPerformer.java index d7a81338..39abf360 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboComboPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-combo|cc") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-combo|cc") +@Permission("voxelsniper.sniper") public class ComboComboPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkNoPhysicsPerformer.java index 9fa4ea7e..fae3f139 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-ink-nophys|cip") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-ink-nophys|cip") +@Permission("voxelsniper.sniper") public class ComboInkNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkPerformer.java index fbbeaaee..57c1bf89 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboInkPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-ink|ci") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-ink|ci") +@Permission("voxelsniper.sniper") public class ComboInkPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialNoPhysicsPerformer.java index 40599af9..a0fb0abe 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-mat-nophys|cmp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-mat-nophys|cmp") +@Permission("voxelsniper.sniper") public class ComboMaterialNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialPerformer.java index 09351714..fbf0ed3d 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboMaterialPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-mat|cm") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-mat|cm") +@Permission("voxelsniper.sniper") public class ComboMaterialPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboNoPhysicsPerformer.java index bd8cdac0..7629c694 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,13 +12,13 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo-nophys|cp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo-nophys|cp") +@Permission("voxelsniper.sniper") public class ComboNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboPerformer.java index 5949b02d..723d9e1c 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ComboPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,13 +12,13 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p combo|c") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p combo|c") +@Permission("voxelsniper.sniper") public class ComboPerformer extends AbstractPerformer { private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ExcludeComboPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ExcludeComboPerformer.java index 3d23b5b2..34964615 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ExcludeComboPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/ExcludeComboPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -14,14 +14,14 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "performer|perf|p exclude-combo|xc") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p exclude-combo|xc") +@Permission("voxelsniper.sniper") public class ExcludeComboPerformer extends AbstractPerformer { private Collection excludeList; private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/IncludeComboPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/IncludeComboPerformer.java index 222194f1..acbf324f 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/IncludeComboPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/combo/IncludeComboPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.combo; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -14,14 +14,14 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "performer|perf|p include-combo|nc") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p include-combo|nc") +@Permission("voxelsniper.sniper") public class IncludeComboPerformer extends AbstractPerformer { private Collection includeList; private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/ExcludeInkPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/ExcludeInkPerformer.java index 2b5eb0f8..6d1dcf4f 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/ExcludeInkPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/ExcludeInkPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -14,14 +14,14 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "performer|perf|p exclude-ink|xi") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p exclude-ink|xi") +@Permission("voxelsniper.sniper") public class ExcludeInkPerformer extends AbstractPerformer { private Collection excludeList; private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/IncludeInkPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/IncludeInkPerformer.java index 95855667..17a656ff 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/IncludeInkPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/IncludeInkPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -14,14 +14,14 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "performer|perf|p include-ink|ni") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p include-ink|ni") +@Permission("voxelsniper.sniper") public class IncludeInkPerformer extends AbstractPerformer { private Collection includeList; private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboNoPhysicsPerformer.java index dd4b12b1..7d0e9ff6 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-combo-nophys|icp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-combo-nophys|icp") +@Permission("voxelsniper.sniper") public class InkComboNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboPerformer.java index a08e65df..279f5f70 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkComboPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-combo|ic") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-combo|ic") +@Permission("voxelsniper.sniper") public class InkComboPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkNoPhysicsPerformer.java index 78e9d78f..da91b2cd 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-ink-nophys|iip") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-ink-nophys|iip") +@Permission("voxelsniper.sniper") public class InkInkNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkPerformer.java index 6853452c..db2feb58 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkInkPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-ink|ii") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-ink|ii") +@Permission("voxelsniper.sniper") public class InkInkPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialNoPhysicsPerformer.java index f9512116..f99ab113 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -13,14 +13,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-mat-nophys|imp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-mat-nophys|imp") +@Permission("voxelsniper.sniper") public class InkMaterialNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockType replaceType; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialPerformer.java index db95b2db..e6bef2c7 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkMaterialPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -13,14 +13,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-mat|im") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-mat|im") +@Permission("voxelsniper.sniper") public class InkMaterialPerformer extends AbstractPerformer { private Pattern pattern; private BlockType replaceType; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkNoPhysicsPerformer.java index cabcbd10..61a1adb8 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,13 +12,13 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink-nophys|ip") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink-nophys|ip") +@Permission("voxelsniper.sniper") public class InkNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkPerformer.java index 3af5f7b6..32ecda48 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/ink/InkPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.ink; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,13 +12,13 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p ink|i") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p ink|i") +@Permission("voxelsniper.sniper") public class InkPerformer extends AbstractPerformer { private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/ExcludeMaterialPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/ExcludeMaterialPerformer.java index 7ece9ea3..b2e0fb90 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/ExcludeMaterialPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/ExcludeMaterialPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -14,14 +14,14 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "performer|perf|p exclude-mat|xm") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p exclude-mat|xm") +@Permission("voxelsniper.sniper") public class ExcludeMaterialPerformer extends AbstractPerformer { private Collection excludeList; private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/IncludeMaterialPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/IncludeMaterialPerformer.java index df13a6ca..4827ad7b 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/IncludeMaterialPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/IncludeMaterialPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -14,14 +14,14 @@ import java.util.Collection; @RequireToolkit -@CommandMethod(value = "performer|perf|p include-mat|nm") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p include-mat|nm") +@Permission("voxelsniper.sniper") public class IncludeMaterialPerformer extends AbstractPerformer { private Collection includeList; private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboNoPhysicsPerformer.java index 2d2d8235..7a95e658 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-combo-nophys|mcp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-combo-nophys|mcp") +@Permission("voxelsniper.sniper") public class MaterialComboNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboPerformer.java index 159b74a5..40c73d95 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialComboPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-combo|mc") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-combo|mc") +@Permission("voxelsniper.sniper") public class MaterialComboPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkNoPhysicsPerformer.java index 357a8307..e3e7d963 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-ink-nophys|mip") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-ink-nophys|mip") +@Permission("voxelsniper.sniper") public class MaterialInkNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkPerformer.java index 45e0fde1..c06c174e 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialInkPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -12,14 +12,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-ink|mi") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-ink|mi") +@Permission("voxelsniper.sniper") public class MaterialInkPerformer extends AbstractPerformer { private Pattern pattern; private BlockState replaceBlockData; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialNoPhysicsPerformer.java index e351163e..6299f75f 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -13,14 +13,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-mat-nophys|mmp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-mat-nophys|mmp") +@Permission("voxelsniper.sniper") public class MaterialMaterialNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; private BlockType replaceType; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialPerformer.java index 5b36aed5..14ec4f02 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialMaterialPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BlockState; @@ -13,14 +13,14 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-mat|mm") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-mat|mm") +@Permission("voxelsniper.sniper") public class MaterialMaterialPerformer extends AbstractPerformer { private Pattern pattern; private BlockType replaceType; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialNoPhysicsPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialNoPhysicsPerformer.java index a303d44b..c475860f 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialNoPhysicsPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialNoPhysicsPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BaseBlock; @@ -13,13 +13,13 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p mat-nophys|mp") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p mat-nophys|mp") +@Permission("voxelsniper.sniper") public class MaterialNoPhysicsPerformer extends AbstractPerformer { private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) { diff --git a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialPerformer.java b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialPerformer.java index 42ccfc40..8b73ea2a 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialPerformer.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/performer/type/material/MaterialPerformer.java @@ -1,7 +1,7 @@ package com.thevoxelbox.voxelsniper.performer.type.material; -import cloud.commandframework.annotations.CommandMethod; -import cloud.commandframework.annotations.CommandPermission; +import org.incendo.cloud.annotations.Command; +import org.incendo.cloud.annotations.Permission; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.world.block.BaseBlock; @@ -13,13 +13,13 @@ import org.jetbrains.annotations.NotNull; @RequireToolkit -@CommandMethod(value = "performer|perf|p material|mat|m") -@CommandPermission("voxelsniper.sniper") +@Command(value = "performer|perf|p material|mat|m") +@Permission("voxelsniper.sniper") public class MaterialPerformer extends AbstractPerformer { private Pattern pattern; - @CommandMethod("") + @Command("") public void onPerformer( final @NotNull PerformerSnipe snipe ) {