Java 类org.bukkit.command.defaults.BukkitCommand 实例源码

项目:Uranium    文件:SimpleHelpMap.java   
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;
}
项目:Uranium    文件:SimpleHelpMap.java   
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;
}
项目:BlockBall    文件:BungeeCordCommandExecutor.java   
private void registerDynamicCommand(String command, BukkitCommand clazz) {
    try {
        final Class<?> subclazz = Class.forName("org.bukkit.craftbukkit.VERSION.CraftServer".replace("VERSION", BungeeCord.getServerVersion()));
        Object instance = subclazz.cast(Bukkit.getServer());
        instance = BungeeCord.invokeMethodByObject(instance, "getCommandMap");
        ReflectionLib.invokeMethodByObject(instance, "register", command, clazz);
    } catch (final Exception ex) {
        Bukkit.getLogger().log(Level.WARNING, "Cannot register dynamic command.", ex);
    }
}
项目:ThermosRebased    文件:SimpleHelpMap.java   
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;
}
项目:ThermosRebased    文件:SimpleHelpMap.java   
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;
}
项目:Thermos    文件:SimpleHelpMap.java   
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;
}
项目:Thermos    文件:SimpleHelpMap.java   
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;
}
项目:KCauldron    文件:SimpleHelpMap.java   
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;
}
项目:KCauldron    文件:SimpleHelpMap.java   
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;
}
项目:CauldronGit    文件:SimpleHelpMap.java   
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;
}
项目:CauldronGit    文件:SimpleHelpMap.java   
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;
}
项目:Cauldron-Old    文件:SimpleHelpMap.java   
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;
}
项目:Cauldron-Old    文件:SimpleHelpMap.java   
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;
}
项目:Cauldron-Reloaded    文件:SimpleHelpMap.java   
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;
}
项目:Cauldron-Reloaded    文件:SimpleHelpMap.java   
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;
}
项目:FFoKC    文件:SimpleHelpMap.java   
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;
}
项目:FFoKC    文件:SimpleHelpMap.java   
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;
}
项目:CraftBukkit    文件:SimpleHelpMap.java   
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;
}
项目:CraftBukkit    文件:SimpleHelpMap.java   
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;
}
项目:Craftbukkit    文件:SimpleHelpMap.java   
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;
}
项目:Craftbukkit    文件:SimpleHelpMap.java   
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;
}
项目:Almura-Server    文件:SimpleHelpMap.java   
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;
}
项目:Almura-Server    文件:SimpleHelpMap.java   
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;
}
项目:Tweakkit-Server    文件:SimpleHelpMap.java   
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;
}
项目:Tweakkit-Server    文件:SimpleHelpMap.java   
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;
}
项目:Cauldron    文件:SimpleHelpMap.java   
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;
}
项目:Cauldron    文件:SimpleHelpMap.java   
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;
}
项目:SpigotSource    文件:SimpleHelpMap.java   
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;
}
项目:SpigotSource    文件:SimpleHelpMap.java   
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;
}
项目:Craft-city    文件:SimpleHelpMap.java   
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;
}
项目:Craft-city    文件:SimpleHelpMap.java   
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;
}
项目:MCPBukkit    文件:SimpleHelpMap.java   
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;
}
项目:MCPBukkit    文件:SimpleHelpMap.java   
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;
}
项目:BlockBall    文件:NMSRegistry.java   
public static void registerDynamicCommand(String command, BukkitCommand clazz) {
    Object obj = ReflectionLib.getClassFromName("org.bukkit.craftbukkit.VERSION.CraftServer").cast(Bukkit.getServer());
    obj = ReflectionLib.invokeMethodByObject(obj, "getCommandMap");
    ReflectionLib.invokeMethodByObject(obj, "register", command, clazz);
}