Don't use CommandContext here

This commit is contained in:
Jesse Boyd 2019-04-12 00:56:59 +10:00
parent a831ae17b7
commit c05cdb35d8
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -317,8 +317,7 @@ public class UtilityCommands extends MethodCommands {
)
@CommandPermissions("worldedit.fixlava")
@Logging(PLACEMENT)
public void fixLava(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
double radius = Math.max(0, args.getDouble(0));
public void fixLava(Player player, LocalSession session, EditSession editSession, @Range(min = 0) double radius) throws WorldEditException {
worldEdit.checkMaxRadius(radius);
int affected = editSession.fixLiquid(
session.getPlacementPosition(player), radius, BlockTypes.LAVA);
@ -334,8 +333,7 @@ public class UtilityCommands extends MethodCommands {
)
@CommandPermissions("worldedit.fixwater")
@Logging(PLACEMENT)
public void fixWater(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
double radius = Math.max(0, args.getDouble(0));
public void fixWater(Player player, LocalSession session, EditSession editSession, @Range(min = 0) double radius) throws WorldEditException {
worldEdit.checkMaxRadius(radius);
int affected = editSession.fixLiquid(
session.getPlacementPosition(player), radius, BlockTypes.WATER);