本文整理汇总了Java中org.bukkit.command.defaults.VanillaCommand类的典型用法代码示例。如果您正苦于以下问题:Java VanillaCommand类的具体用法?Java VanillaCommand怎么用?Java VanillaCommand使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VanillaCommand类属于org.bukkit.command.defaults包,在下文中一共展示了VanillaCommand类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canSee
import org.bukkit.command.defaults.VanillaCommand; //导入依赖的package包/类
public boolean canSee(CommandSender sender) {
if (!command.isRegistered() && !(command instanceof VanillaCommand)) {
// Unregistered commands should not show up in the help (ignore VanillaCommands)
return false;
}
if (sender instanceof ConsoleCommandSender) {
return true;
}
if (amendedPermission != null) {
return sender.hasPermission(amendedPermission);
} else {
return command.testPermissionSilent(sender);
}
}
示例2: getCommandPluginName
import org.bukkit.command.defaults.VanillaCommand; //导入依赖的package包/类
private String getCommandPluginName(Command command) {
if (command instanceof VanillaCommandWrapper) {
return "Minecraft";
}
if (command instanceof BukkitCommand || command instanceof VanillaCommand) {
return "Bukkit";
}
if (command instanceof PluginIdentifiableCommand) {
return ((PluginIdentifiableCommand)command).getPlugin().getName();
}
return null;
}
示例3: commandInIgnoredPlugin
import org.bukkit.command.defaults.VanillaCommand; //导入依赖的package包/类
private boolean commandInIgnoredPlugin(Command command, Set<String> ignoredPlugins) {
if ((command instanceof BukkitCommand || command instanceof VanillaCommand) && ignoredPlugins.contains("Bukkit")) {
return true;
}
if (command instanceof PluginIdentifiableCommand && ignoredPlugins.contains(((PluginIdentifiableCommand)command).getPlugin().getName())) {
return true;
}
return false;
}
示例4: getCommandPluginName
import org.bukkit.command.defaults.VanillaCommand; //导入依赖的package包/类
private String getCommandPluginName(Command command) {
if (command.getClass().equals(VanillaCommandWrapper.class)) {
return "Minecraft";
}
if (command.getClass().equals(BukkitCommand.class) || command.getClass().equals(VanillaCommand.class)) {
return "Bukkit";
}
if (command instanceof PluginIdentifiableCommand) {
return ((PluginIdentifiableCommand)command).getPlugin().getName();
}
return null;
}
示例5: commandInIgnoredPlugin
import org.bukkit.command.defaults.VanillaCommand; //导入依赖的package包/类
private boolean commandInIgnoredPlugin(Command command, Set<String> ignoredPlugins) {
if ((command.getClass().equals(BukkitCommand.class) || command.getClass().equals(VanillaCommand.class)) && ignoredPlugins.contains("Bukkit")) {
return true;
}
if (command instanceof PluginIdentifiableCommand && ignoredPlugins.contains(((PluginIdentifiableCommand)command).getPlugin().getName())) {
return true;
}
return false;
}
示例6: getCommandPluginName
import org.bukkit.command.defaults.VanillaCommand; //导入依赖的package包/类
private String getCommandPluginName(Command command) {
if (command instanceof BukkitCommand || command instanceof VanillaCommand) {
return "Bukkit";
}
if (command instanceof PluginIdentifiableCommand) {
return ((PluginIdentifiableCommand)command).getPlugin().getName();
}
return null;
}