From 6d4982f23aa1c2ef774deae950b6b7df1df7eb7e Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Tue, 23 Apr 2019 15:44:33 -0700 Subject: [PATCH] Fix checkstyle/license/gen code --- .../worldedit/command/HistoryCommands.java | 8 +++---- .../CommaSeparatedValuesConverter.java | 19 ++++++++++++++++ .../CommandPermissionsConditionGenerator.java | 2 +- .../extension/platform/Annotations.java | 22 +++++++++++++++++++ 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java index b9a247132..c5bb07699 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java @@ -35,7 +35,7 @@ import static com.google.common.base.Preconditions.checkNotNull; /** * Commands to undo, redo, and clear history. */ -@CommandContainer(superTypes = CommandPermissionsConditionGenerator.class) +@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class) public class HistoryCommands { private final WorldEdit worldEdit; @@ -58,9 +58,9 @@ public class HistoryCommands { @CommandPermissions("worldedit.history.undo") public void undo(Player player, LocalSession session, @Arg(desc = "Number of undoes to perform", def = "1") - int times, + int times, @Arg(name = "player", desc = "Undo this player's operations", def = "") - String playerName) throws WorldEditException { + String playerName) throws WorldEditException { times = Math.max(1, times); for (int i = 0; i < times; ++i) { LocalSession undoSession = session; @@ -86,7 +86,7 @@ public class HistoryCommands { @Command( name = "redo", - aliases = { "redo" }, + aliases = { "/redo" }, desc = "Redoes the last action (from history)" ) @CommandPermissions("worldedit.history.redo") diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/CommaSeparatedValuesConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/CommaSeparatedValuesConverter.java index f4b2cafa5..d2947a44a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/CommaSeparatedValuesConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/CommaSeparatedValuesConverter.java @@ -1,3 +1,22 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + package com.sk89q.worldedit.command.argument; import com.google.common.base.Splitter; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/CommandPermissionsConditionGenerator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/CommandPermissionsConditionGenerator.java index b126198a6..f0de910e8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/CommandPermissionsConditionGenerator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/CommandPermissionsConditionGenerator.java @@ -31,7 +31,7 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkNotNull; @NonnullByDefault -public class CommandPermissionsConditionGenerator implements CommandConditionGenerator { +public final class CommandPermissionsConditionGenerator implements CommandConditionGenerator { public interface Registration { Registration commandPermissionsConditionGenerator(CommandPermissionsConditionGenerator generator); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Annotations.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Annotations.java index 08ad84d6c..f1f1319e9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Annotations.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Annotations.java @@ -1,3 +1,22 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + package com.sk89q.worldedit.extension.platform; import com.google.auto.value.AutoAnnotation; @@ -13,4 +32,7 @@ class Annotations { return new AutoAnnotation_Annotations_radii(value); } + private Annotations() { + } + }