From 42a65ac924af9a58e21e6f00769478d569256304 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 22 Jul 2019 16:44:03 +1000 Subject: [PATCH] `@Range` --- .../java/com/sk89q/worldedit/command/RegionCommands.java | 6 +++--- .../java/com/sk89q/worldedit/command/UtilityCommands.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java index ef543eec6..a3b76d139 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java @@ -243,7 +243,7 @@ public class RegionCommands extends MethodCommands { @Arg(desc = "The pattern of blocks to place") Pattern pattern, @Arg(desc = "The thickness of the line", def = "0") - int thickness, + @Range(min = 0) int thickness, @Switch(name = 'h', desc = "Generate only a shell") boolean shell) throws WorldEditException { if (!(region instanceof CuboidRegion)) { @@ -273,7 +273,7 @@ public class RegionCommands extends MethodCommands { @Arg(desc = "The pattern of blocks to place") Pattern pattern, @Arg(desc = "The thickness of the curve", def = "0") - int thickness, + @Range(min = 0) int thickness, @Switch(name = 'h', desc = "Generate only a shell") boolean shell, InjectedValueAccess context) throws WorldEditException { if (!(region instanceof ConvexPolyhedralRegion)) { @@ -718,7 +718,7 @@ public class RegionCommands extends MethodCommands { public void hollow(FawePlayer player, EditSession editSession, @Selection Region region, @Arg(desc = "Thickness of the shell to leave", def = "0") - int thickness, + @Range(min = 0) int thickness, @Arg(desc = "The pattern of blocks to replace the hollowed area with", def = "air") Pattern pattern, @Switch(name='m', desc = "Mask to hollow with") Mask mask, diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index df8c21ff2..d0c6790f5 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -769,7 +769,7 @@ public class UtilityCommands { return page; } - public static int getFiles(File dir, Actor actor, InjectedValueAccess args, @org.jetbrains.annotations.Range(from = 0, to = ) int page, int perPage, String formatName, boolean playerFolder, Consumer forEachFile) { + public static int getFiles(File dir, Actor actor, InjectedValueAccess args, @Range(min = 0) int page, int perPage, String formatName, boolean playerFolder, Consumer forEachFile) { Consumer rootFunction = forEachFile; //schem list all