From 781f39f71a5470dd3e1577f86c7b0e67737a151f Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 28 Jan 2021 12:54:55 +0000 Subject: [PATCH] Properly define /ore arguments Fix #885 --- .../worldedit/command/GenerationCommands.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java index 4ceeef74e..bb9bd1e43 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java @@ -174,14 +174,21 @@ public class GenerationCommands { actor.print(Caption.of("fawe.worldedit.visitor.visitor.block", editSession.getBlockChangeCount())); } - @Command( - name = "/ore", - desc = "Generates ores" - ) + @Command(name = "/ore", desc = "Generates ores") @CommandPermissions("worldedit.generation.ore") @Logging(PLACEMENT) @Confirm(Confirm.Processor.REGION) - public void ore(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, @Arg(desc = "Mask") Mask mask, @Arg(desc = "Pattern") Pattern material, @Arg(desc="Ore vein size") @Range(from = 0, to=Integer.MAX_VALUE) int size, int freq, @Range(from=0, to=100) int rarity, @Range(from=0, to=255) int minY, @Range(from=0, to=255) int maxY) throws WorldEditException { + public void ore(Actor actor, + LocalSession session, + EditSession editSession, + @Selection Region region, + @Arg(desc = "Mask") Mask mask, + @Arg(desc = "Pattern") Pattern material, + @Arg(desc = "Ore vein size") @Range(from = 0, to = Integer.MAX_VALUE) int size, + @Arg(desc = "Ore vein frequency (number of times to attempt to place ore)", def = "10") @Range(from = 0, to = Integer.MAX_VALUE) int freq, + @Arg(desc = "Ore vein rarity (% chance each attempt is placed)", def = "100") @Range(from = 0, to = 100) int rarity, + @Arg(desc = "Ore vein min y", def = "0") @Range(from = 0, to = 255) int minY, + @Arg(desc = "Ore vein max y", def = "63") @Range(from = 0, to = 255) int maxY) throws WorldEditException { editSession.addOre(region, mask, material, size, freq, rarity, minY, maxY); actor.print(Caption.of("fawe.worldedit.visitor.visitor.block", editSession.getBlockChangeCount())); }