SPIGOT-2540: Add nullability annotations to entire Bukkit API

By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
Bukkit/Spigot
2019-03-13 17:42:57 +11:00
parent e069a80fd8
commit 416c865476
565 changed files with 5372 additions and 2008 deletions

View File

@@ -1,12 +1,14 @@
package org.bukkit.command;
import org.jetbrains.annotations.NotNull;
/**
* Represents a command that delegates to one or more other commands
*/
public class MultipleCommandAlias extends Command {
private Command[] commands;
public MultipleCommandAlias(String name, Command[] commands) {
public MultipleCommandAlias(@NotNull String name, @NotNull Command[] commands) {
super(name);
this.commands = commands;
}
@@ -16,12 +18,13 @@ public class MultipleCommandAlias extends Command {
*
* @return commands associated with alias
*/
@NotNull
public Command[] getCommands() {
return commands;
}
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] args) {
boolean result = false;
for (Command command : commands) {