33 lines
1003 B
Java
33 lines
1003 B
Java
package com.graywolf336.jail.command.subcommands;
|
|
|
|
import com.graywolf336.jail.JailManager;
|
|
import com.graywolf336.jail.command.Command;
|
|
import com.graywolf336.jail.command.CommandInfo;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
|
|
@CommandInfo(
|
|
maxArgs = 0,
|
|
minimumArgs = 0,
|
|
needsPlayer = false,
|
|
pattern = "version|ver",
|
|
permission = "jail.command.jailversion",
|
|
usage = "/jail version"
|
|
)
|
|
public class JailVersionCommand implements Command {
|
|
|
|
public boolean execute(JailManager jm, CommandSender sender, String... args) {
|
|
// Sends the version number to the sender
|
|
sender.sendMessage("Jail Version: " + jm.getPlugin().getDescription().getVersion());
|
|
|
|
return true;
|
|
}
|
|
|
|
public List<String> provideTabCompletions(JailManager jm, CommandSender sender, String... args) {
|
|
//no tab completion required for version command
|
|
return Collections.emptyList();
|
|
}
|
|
}
|