Add additional checkstyle checks

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2020-01-24 17:37:30 +11:00
parent 78e6909f8c
commit 0c53c95293
35 changed files with 227 additions and 202 deletions

View File

@@ -29,7 +29,7 @@ public class HelpCommand extends BukkitCommand {
super("help");
this.description = "Shows the help menu";
this.usageMessage = "/help <pageNumber>\n/help <topic>\n/help <topic> <pageNumber>";
this.setAliases(Arrays.asList(new String[] { "?" }));
this.setAliases(Arrays.asList(new String[]{"?"}));
this.setPermission("bukkit.command.help");
}

View File

@@ -31,7 +31,7 @@ public class TimingsCommand extends BukkitCommand {
@Override
public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) {
if (!testPermission(sender)) return true;
if (args.length != 1) {
if (args.length != 1) {
sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
return false;
}
@@ -73,8 +73,9 @@ public class TimingsCommand extends BukkitCommand {
if (separate) {
fileNames.println(pluginIdx + " " + plugin.getDescription().getFullName());
fileTimings.println("Plugin " + pluginIdx);
} else {
fileTimings.println(plugin.getDescription().getFullName());
}
else fileTimings.println(plugin.getDescription().getFullName());
for (RegisteredListener listener : HandlerList.getRegisteredListeners(plugin)) {
if (listener instanceof TimedRegisteredListener) {
TimedRegisteredListener trl = (TimedRegisteredListener) listener;