Package org.bukkit.plugin.java

Examples of org.bukkit.plugin.java.JavaPlugin


        // TODO: Fall-back for Vanilla / CB commands? [Fall-back should be altering permission defaults, though negating permissions is the right way.]

        // Fall-back: plugin commands.
        for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
            if (plugin instanceof JavaPlugin) {
                final JavaPlugin javaPlugin = (JavaPlugin) plugin;
                final Map<String, Map<String, Object>> map = javaPlugin.getDescription().getCommands();
                if (map != null) {
                    for (String label : map.keySet()) {
                        Command command = javaPlugin.getCommand(label);
                        if (command != null) {
                            commands.add(command);
                        }
                    }
                }
View Full Code Here


     * Gets the Jar of a plugin
     * @param p
     * @return Jar File the plugin's code is contained in
     */
    public static File getJAR(Plugin p) {
        JavaPlugin plugin;
        if(p instanceof JavaPlugin)
            plugin = (JavaPlugin) p;
        else
            return null;

View Full Code Here

TOP

Related Classes of org.bukkit.plugin.java.JavaPlugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.