Developers

Integrating DiscoArmor into your plugin

Setting up your workspace

  1. Download the latest version of DiscoArmor
  2. Add it to your JavaBuildPath: Right click your Project => Build Path => Configure Build Path => Libraries => Add external jars Select the DiscoArmor_x_x_x.jar-File
  3. Create a new attribute in your main class:
     public DiscoArmorApi api;
    
  4. Initialize it in your onEnable()-void:
  DiscoArmor discoArmor = (DiscoArmor) Bukkit.getPluginManager().getPlugin("DiscoArmor");
  if(discoArmor == null) {
     this.getLogger().severe("DiscoArmor is not installed. Please download it here: http://dev.bukkit.org/bukkit-plugins/discoarmor/!!!");
     // If you want to disable your plugin when DiscoArmor is not installed, uncomment this part of the code
     // Bukkit.getPluginManager().disablePlugin(this);
    
  }
  else {
    this.api = discoArmor.api();
  }

Method reference

General

  setDelay(long delay);
  getDelay();

Gets or sets the delay between switching the colors *

  setChestplateName(String name);
  getChestplateName();

Comments

Posts Quoted:
Reply
Clear All Quotes