mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 14:44:43 +02:00
Initial annotation usage cleanup + EditorConfig
This commit is contained in:
@ -46,22 +46,26 @@ import java.util.List;
|
||||
public class BukkitCommand implements CommandExecutor, TabCompleter {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender commandSender, Command command, String commandLabel,
|
||||
String[] args) {
|
||||
public boolean onCommand(
|
||||
CommandSender commandSender, Command command, String commandLabel,
|
||||
String[] args
|
||||
) {
|
||||
if (commandSender instanceof Player) {
|
||||
return MainCommand.onCommand(BukkitUtil.adapt((Player) commandSender), args);
|
||||
}
|
||||
if (commandSender instanceof ConsoleCommandSender
|
||||
|| commandSender instanceof ProxiedCommandSender
|
||||
|| commandSender instanceof RemoteConsoleCommandSender) {
|
||||
|| commandSender instanceof ProxiedCommandSender
|
||||
|| commandSender instanceof RemoteConsoleCommandSender) {
|
||||
return MainCommand.onCommand(ConsolePlayer.getConsole(), args);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender commandSender, Command command, String s,
|
||||
String[] args) {
|
||||
public List<String> onTabComplete(
|
||||
CommandSender commandSender, Command command, String s,
|
||||
String[] args
|
||||
) {
|
||||
if (!(commandSender instanceof Player)) {
|
||||
return null;
|
||||
}
|
||||
@ -70,7 +74,7 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
|
||||
return Collections.singletonList("plots");
|
||||
}
|
||||
Collection<com.plotsquared.core.command.Command> objects =
|
||||
MainCommand.getInstance().tab(player, args, s.endsWith(" "));
|
||||
MainCommand.getInstance().tab(player, args, s.endsWith(" "));
|
||||
if (objects == null) {
|
||||
return null;
|
||||
}
|
||||
@ -80,4 +84,5 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user