Package org.bukkit.plugin

Examples of org.bukkit.plugin.PluginDescriptionFile


    /**
     * Generic method that posts a plugin to the metrics website
     */
    private void postPlugin(final boolean isPing) throws IOException {
        // The plugin's description file containg all of the plugin data such as name, version, author, etc
        final PluginDescriptionFile description = plugin.getDescription();

        // Construct the post data
        final StringBuilder data = new StringBuilder();
        data.append(encode("guid")).append('=').append(encode(guid));
        encodeDataPair(data, "version", description.getVersion());
        encodeDataPair(data, "server", Bukkit.getVersion());
        encodeDataPair(data, "players", Integer.toString(Bukkit.getServer().getOnlinePlayers().length));
        encodeDataPair(data, "revision", String.valueOf(REVISION));

        // If we're pinging, append it
View Full Code Here


    // マネージャ
    //bm = new BookManager(this);

    // メッセージ表示
    PluginDescriptionFile pdfFile=this.getDescription();
    log.info("["+pdfFile.getName()+"] version "+pdfFile.getVersion()+" is enabled!");

    setupMetrics(); // mcstats
  }
View Full Code Here

   * プラグイン停止処理
   */
  @Override
  public void onDisable(){
    // メッセージ表示
    PluginDescriptionFile pdfFile=this.getDescription();
    log.info("["+pdfFile.getName()+"] version "+pdfFile.getVersion()+" is disabled!");
  }
View Full Code Here

*
* @author Dinnerbone
*/
public class ScrapBukkit extends JavaPlugin {
    public void onEnable() {
        PluginDescriptionFile pdfFile = this.getDescription();
        System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );

        getCommand("time").setExecutor(new TimePluginCommand(this));
        getCommand("tp").setExecutor(new TeleportPluginCommand(this));
        getCommand("give").setExecutor(new GivePluginCommand(this));
        getCommand("take").setExecutor(new TakePluginCommand(this));
View Full Code Here

        }
       
        getServer().getScheduler().cancelTasks(this);
        instance = null;

        final PluginDescriptionFile pdfFile = this.getDescription();
        log.info(pdfFile.getName() + " version " + pdfFile.getVersion() + " is disabled!");
    }
View Full Code Here

        // hookup integration plugin
        //checkPlugin(true);
        //if (ncpEnabled) log.info("NoCheatPlus plugin found! Enabled this integration!");
        //if (acEnabled) log.info("AntiCheat plugin found! Enabled this integration!");

        final PluginDescriptionFile pdfFile = this.getDescription();
        log.info(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!");
    }
View Full Code Here

        {
            String modName = file.getName().substring(0, file.getName().lastIndexOf("."));
            FMLLog.info("Scanning %s for bukkit plugin data", modName);
            ModContainer mc = Loader.instance().getIndexedModList().get(modName);
            String clName = BukkitContainer.instance.pluginManager.getBukkitPluginClass(mc);
            return new PluginDescriptionFile(mc.getModId(), mc.getVersion(), clName);
        }
        else
        {
            return super.getPluginDescription(file);
        }
View Full Code Here

    /**
     * Generic method that posts a plugin to the metrics website
     */
    private void postPlugin(boolean isPing) throws IOException {
        // Server software specific section
        PluginDescriptionFile description = plugin.getDescription();
        String pluginName = description.getName();
        boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mode is enabled
        String pluginVersion = description.getVersion();
        String serverVersion = Bukkit.getVersion();
        int playersOnline = Bukkit.getServer().getOnlinePlayers().length;

        // END server software specific section -- all code below does not use any code outside of this class / Java

View Full Code Here

    /**
     * Generic method that posts a plugin to the metrics website
     */
    private void postPlugin(final boolean isPing) throws IOException {
        // Server software specific section
        PluginDescriptionFile description = plugin.getDescription();
        String pluginName = description.getName();
        boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mode is enabled
        String pluginVersion = description.getVersion();
        String serverVersion = Bukkit.getVersion();
        int playersOnline = Bukkit.getServer().getOnlinePlayers().length;

        // END server software specific section -- all code below does not use any code outside of this class / Java

View Full Code Here

    /**
     * Generic method that posts a plugin to the metrics website
     */
    private void postPlugin(final boolean isPing) throws IOException {
        // Server software specific section
        PluginDescriptionFile description = plugin.getDescription();
        String pluginName = description.getName();
        boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if
                                                                 // online mode
                                                                 // is enabled
        String pluginVersion = description.getVersion();
        String serverVersion = Bukkit.getVersion();
        int playersOnline = Bukkit.getServer().getOnlinePlayers().length;

        // END server software specific section -- all code below does not use
        // any code outside of this class / Java
View Full Code Here

TOP

Related Classes of org.bukkit.plugin.PluginDescriptionFile

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.