46 lines
941 B
Java
46 lines
941 B
Java
/**
|
|
*
|
|
*/
|
|
package cn.citycraft.SimpleEssential.command;
|
|
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.command.CommandException;
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import cn.citycraft.SimpleEssential.SimpleEssential;
|
|
|
|
/**
|
|
* @author 蒋天蓓 2015年8月12日下午2:04:05
|
|
*/
|
|
public class CommandWorkBench extends BaseCommand {
|
|
SimpleEssential plugin;
|
|
|
|
/**
|
|
* @param name
|
|
*/
|
|
public CommandWorkBench(SimpleEssential main) {
|
|
super("workbench", "seworkbench", "wb", "sewb");
|
|
this.plugin = main;
|
|
}
|
|
|
|
@Override
|
|
public boolean isOnlyPlayerExecutable() {
|
|
return true;
|
|
};
|
|
|
|
@Override
|
|
public void execute(CommandSender sender, String label, String[] args) throws CommandException {
|
|
Bukkit.getPlayer(sender.getName()).openWorkbench(null, true);
|
|
}
|
|
|
|
@Override
|
|
public int getMinimumArguments() {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public String getPossibleArguments() {
|
|
return "";
|
|
}
|
|
}
|