diff --git a/src/main/java/org/maxgamer/quickshop/command/processor/CommonCommandProcessor.java b/src/main/java/org/maxgamer/quickshop/command/processor/CommonCommandProcessor.java index 5a8997ef6..0d27e7ec2 100644 --- a/src/main/java/org/maxgamer/quickshop/command/processor/CommonCommandProcessor.java +++ b/src/main/java/org/maxgamer/quickshop/command/processor/CommonCommandProcessor.java @@ -1,3 +1,22 @@ +/* + * This file is a part of project QuickShop, the name is CommonCommandProcessor.java + * Copyright (C) PotatoCraft Studio and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU 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 General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + package org.maxgamer.quickshop.command.processor; import org.bukkit.command.CommandSender; @@ -20,6 +39,7 @@ public abstract class CommonCommandProcessor implements ICommandProcessor { * @param cmdArg Args * @param commandLabel The command prefix /qs is qs */ + @Override public void onCommand( @NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) { @@ -38,6 +58,7 @@ public abstract class CommonCommandProcessor implements ICommandProcessor { * @param commandLabel The command prefix /qs is qs * @return The result for tab-complete lists */ + @Override @Nullable public List onTabComplete( @NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) { diff --git a/src/main/java/org/maxgamer/quickshop/command/processor/ConsoleOnlyCommandProcessor.java b/src/main/java/org/maxgamer/quickshop/command/processor/ConsoleOnlyCommandProcessor.java index b767c6fcb..363f7ce82 100644 --- a/src/main/java/org/maxgamer/quickshop/command/processor/ConsoleOnlyCommandProcessor.java +++ b/src/main/java/org/maxgamer/quickshop/command/processor/ConsoleOnlyCommandProcessor.java @@ -26,6 +26,7 @@ import org.maxgamer.quickshop.util.MsgUtil; public abstract class ConsoleOnlyCommandProcessor implements ICommandProcessor { + @Override public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) { if (sender instanceof ConsoleCommandSender) { onCommand((ConsoleCommandSender) sender, commandLabel, cmdArg); diff --git a/src/main/java/org/maxgamer/quickshop/command/processor/ICommandProcessor.java b/src/main/java/org/maxgamer/quickshop/command/processor/ICommandProcessor.java index cd0b55475..e573aedb5 100644 --- a/src/main/java/org/maxgamer/quickshop/command/processor/ICommandProcessor.java +++ b/src/main/java/org/maxgamer/quickshop/command/processor/ICommandProcessor.java @@ -1,3 +1,22 @@ +/* + * This file is a part of project QuickShop, the name is ICommandProcessor.java + * Copyright (C) PotatoCraft Studio and contributors + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU 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 General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + package org.maxgamer.quickshop.command.processor; import org.bukkit.command.CommandSender; @@ -10,8 +29,10 @@ import java.util.List; //For backward compatibility, extended CommandProcesser interface ICommandProcessor extends CommandProcesser { + @Override void onCommand(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg); + @Override @Nullable default List onTabComplete( @NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) { diff --git a/src/main/java/org/maxgamer/quickshop/command/processor/PlayerOnlyCommandProcessor.java b/src/main/java/org/maxgamer/quickshop/command/processor/PlayerOnlyCommandProcessor.java index d2a92af4e..3b6a69b39 100644 --- a/src/main/java/org/maxgamer/quickshop/command/processor/PlayerOnlyCommandProcessor.java +++ b/src/main/java/org/maxgamer/quickshop/command/processor/PlayerOnlyCommandProcessor.java @@ -25,6 +25,7 @@ import org.jetbrains.annotations.NotNull; import org.maxgamer.quickshop.util.MsgUtil; public abstract class PlayerOnlyCommandProcessor implements ICommandProcessor { + @Override public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) { if (sender instanceof Player) { onCommand((Player) sender, commandLabel, cmdArg);