From b1c042b1962364d8fa164f2bc6d0f7926083e3d8 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Mon, 29 Apr 2019 22:40:32 -0700 Subject: [PATCH] Add checkstyle validation for formatting, fix issues --- config/checkstyle/checkstyle.xml | 8 ++++++++ .../java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java | 8 ++++---- .../java/com/sk89q/worldedit/command/BiomeCommands.java | 8 ++++---- .../java/com/sk89q/worldedit/command/GeneralCommands.java | 4 ++-- .../com/sk89q/worldedit/command/GenerationCommands.java | 4 ++-- .../java/com/sk89q/worldedit/command/ToolCommands.java | 8 ++++---- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index a2d043d73..0fe76dff3 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -53,5 +53,13 @@ + + + + + + + + diff --git a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java index c74c8f382..eb0c2e382 100644 --- a/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java +++ b/worldedit-core/src/legacy/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java @@ -90,7 +90,7 @@ public class MobSpawnerBlock extends BaseBlock { /** * Get the spawn delay. - * + * * @return the delay */ public short getDelay() { @@ -99,13 +99,13 @@ public class MobSpawnerBlock extends BaseBlock { /** * Set the spawn delay. - * + * * @param delay the delay to set */ public void setDelay(short delay) { this.delay = delay; } - + @Override public boolean hasNbtData() { return true; @@ -208,7 +208,7 @@ public class MobSpawnerBlock extends BaseBlock { this.spawnCount = spawnCountTag.getValue(); } if (spawnRangeTag != null) { - this.spawnRange =spawnRangeTag.getValue(); + this.spawnRange = spawnRangeTag.getValue(); } if (minSpawnDelayTag != null) { this.minSpawnDelay = minSpawnDelayTag.getValue(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java index bb4788f9e..ef6e38981 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java @@ -19,8 +19,6 @@ package com.sk89q.worldedit.command; -import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION; - import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; @@ -59,6 +57,8 @@ import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; +import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION; + /** * Implements biome-related commands such as "/biomelist". */ @@ -97,9 +97,9 @@ public class BiomeCommands { ) @CommandPermissions("worldedit.biome.info") public void biomeInfo(Player player, LocalSession session, - @Switch(name = 't', desc="Use the block you are looking at.") + @Switch(name = 't', desc = "Use the block you are looking at.") boolean useLineOfSight, - @Switch(name = 'p', desc="Use the block you are currently in.") + @Switch(name = 'p', desc = "Use the block you are currently in.") boolean usePosition) throws WorldEditException { BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager() .queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java index 08e46addc..a84c3d1a0 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java @@ -223,9 +223,9 @@ public class GeneralCommands { @Arg(desc = "Item query") String query, @Switch(name = 'b', desc = "Only search for blocks") - boolean blocksOnly, + boolean blocksOnly, @Switch(name = 'i', desc = "Only search for items") - boolean itemsOnly) throws WorldEditException { + boolean itemsOnly) throws WorldEditException { ItemType type = ItemTypes.get(query); if (type != null) { 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 646672d2f..5f5229aeb 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 @@ -227,8 +227,8 @@ public class GenerationCommands { } @Command( - name = "/hpyramid", - desc = "Generate a hollow pyramid" + name = "/hpyramid", + desc = "Generate a hollow pyramid" ) @CommandPermissions("worldedit.generation.pyramid") @Logging(PLACEMENT) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java index 2af2b8750..8242cfec9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java @@ -137,8 +137,8 @@ public class ToolCommands { } @Command( - name = "deltree", - desc = "Floating tree remover tool" + name = "deltree", + desc = "Floating tree remover tool" ) @CommandPermissions("worldedit.tool.deltree") public void deltree(Player player, LocalSession session) throws WorldEditException { @@ -150,8 +150,8 @@ public class ToolCommands { } @Command( - name = "farwand", - desc = "Wand at a distance tool" + name = "farwand", + desc = "Wand at a distance tool" ) @CommandPermissions("worldedit.tool.farwand") public void farwand(Player player, LocalSession session) throws WorldEditException {