Skip to content

Instantly share code, notes, and snippets.

@rbrick
Created January 15, 2015 06:36
Show Gist options
  • Save rbrick/00fdcd0d75a18e1a63aa to your computer and use it in GitHub Desktop.
Save rbrick/00fdcd0d75a18e1a63aa to your computer and use it in GitHub Desktop.
AdvKits Archer Kit
import com.breakmc.kitpvp.AbstractKit
import com.breakmc.kitpvp.Action
import com.breakmc.kitpvp.utils.Utils
import org.bukkit.ChatColor
import org.bukkit.Material
import org.bukkit.inventory.ItemStack
import org.bukkit.potion.PotionEffect
public class Archer extends AbstractKit {
public Archer() {
setItem(35, Utils.constructItem(Material.ARROW))
}
@Override
String getName() {
return "Archer"
}
@Override
ItemStack getDisplayItem() {
return Utils.constructItem(Material.BOW, "\u00A7c\u00A7lArcher")
}
@Override
int getPosition() {
return 4
}
/**
* Defines the armour in the kit. If null, the method is ignored
*
* @return the armour to apply to the Player.
*/
@Override
ItemStack[] getArmor() {
return [Utils.constructItem(Material.DIAMOND_BOOTS),
Utils.constructItem(Material.LEATHER_LEGGINGS),
Utils.constructItem(Material.CHAINMAIL_CHESTPLATE),
Utils.constructItem(Material.IRON_HELMET)]
}
/**
* Defines the ItemStack that will be in slot one(0).
*
* @return
*/
@Override
ItemStack getWeapon() {
return Utils.constructItem(Material.WOOD_SWORD)
}
/**
* Defines the method that will call the action if provided with one. Else this will serve as the second item
* in the players HotBar (e.g Archers Bow)
*
*
* @return
*/
@Override
ItemStack getActionItem() {
return Utils.constructItem(Material.BOW)
}
/**
* Returns the PotionEffects that will be applied to the player.
*
* @return
*/
@Override
PotionEffect[] getEffects() {
return null
}
/**
* Called when the Action Item is right clicked.
*
* @return
*/
@Override
Action getAction() {
return null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment