public class CustomWeaponLance extends java.lang.Object implements CustomWeapon
| Modifier and Type | Field and Description |
|---|---|
private static SkillParticle |
particle
A particle, used to indicate the hit area of the lance.
|
| Constructor and Description |
|---|
CustomWeaponLance() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHaveSkillSlot()
Determines if the custom weapon can have a skillgem slot.
|
java.util.List<org.bukkit.Material> |
getCustomItemMaterials()
Returns the materials that trigger events with the item.
|
java.util.List<java.lang.String> |
getCustomWeaponLores(boolean hasSkillSlot)
Gets the lores to show on an instance of the custom weapon.
|
static void |
spin(org.bukkit.entity.Player player)
Creates an 8 block wide particle circle around the player
and damages + throws back every entity inside of it.
|
static void |
thrust(org.bukkit.entity.Player player)
Creates a 3 block long particle line in front of the player
and damages every entity near it.
|
void |
use(org.bukkit.event.player.PlayerInteractEvent event)
Cancels the event of a lance interaction.
|
private static SkillParticle particle
public void use(org.bukkit.event.player.PlayerInteractEvent event)
use in interface CustomItemevent - The interaction event.spin(Player),
thrust(Player)public java.util.List<org.bukkit.Material> getCustomItemMaterials()
getCustomItemMaterials in interface CustomItempublic boolean canHaveSkillSlot()
canHaveSkillSlot in interface CustomWeaponpublic java.util.List<java.lang.String> getCustomWeaponLores(boolean hasSkillSlot)
getCustomWeaponLores in interface CustomWeaponhasSkillSlot - If the weapon has a skillgem slot.public static void thrust(org.bukkit.entity.Player player)
player - The player who performs the attack.Cooldown.playerWeaponSkillUse(Player, String),
SkillUtils.callPlayerFixedDamageEvent(Player, Entity, double),
ParticleSpawner.spawnParticleLine(Location, Location, SkillParticle, int, double),
DurabilityCalculator.damageItem(Player, org.bukkit.inventory.ItemStack, int, boolean)public static void spin(org.bukkit.entity.Player player)
player - The player who performs the attack.Cooldown.playerWeaponSkillUse(Player, String),
SkillUtils.callPlayerFixedDamageEvent(Player, Entity, double),
SkillUtils.throwBackEntity(Entity, Location, double),
SkillUtils.rotateEntity(Entity),
ParticleSpawner.spawnParticleCircle(Location, SkillParticle, double, int),
DurabilityCalculator.damageItem(Player, org.bukkit.inventory.ItemStack, int, boolean)