Package wtf.choco.arrows.arrow
Class ConfigurableAlchemicalArrow
java.lang.Object
wtf.choco.arrows.api.AlchemicalArrow
wtf.choco.arrows.arrow.ConfigurableAlchemicalArrow
- Direct Known Subclasses:
AlchemicalArrowAir
,AlchemicalArrowChain
,AlchemicalArrowConfusion
,AlchemicalArrowDarkness
,AlchemicalArrowDeath
,AlchemicalArrowEarth
,AlchemicalArrowEnder
,AlchemicalArrowExplosive
,AlchemicalArrowFire
,AlchemicalArrowFrost
,AlchemicalArrowGrapple
,AlchemicalArrowLife
,AlchemicalArrowLight
,AlchemicalArrowMagic
,AlchemicalArrowMagnetic
,AlchemicalArrowNecrotic
,AlchemicalArrowWater
public abstract class ConfigurableAlchemicalArrow extends AlchemicalArrow
-
Method Summary
Modifier and Type Method Description String
getDisplayName()
Get the display name of this alchemical arrow.org.bukkit.inventory.ItemStack
getItem()
Get the item representation of this alchemical arrow.org.bukkit.NamespacedKey
getKey()
Get this arrow's unique key.boolean
onShootFromPlayer(AlchemicalArrowEntity arrow, org.bukkit.entity.Player player)
Called at low priority when a player has successfully shot this alchemical arrow, but it has yet to be registered.void
reload()
Methods inherited from class wtf.choco.arrows.api.AlchemicalArrow
createItemStack, createItemStack, createNewArrow, equals, getProperties, hashCode, hitEntityEventHandler, hitGroundEventHandler, matchesItem, onHitBlock, onHitEntity, onHitPlayer, onShootFromBlockSource, onShootFromSkeleton, shootEventHandler, tick
-
Method Details
-
getKey
public org.bukkit.NamespacedKey getKey()Description copied from class:AlchemicalArrow
Get this arrow's unique key.- Specified by:
getKey
in classAlchemicalArrow
- Returns:
- the unique key
-
getDisplayName
Description copied from class:AlchemicalArrow
Get the display name of this alchemical arrow. This includes colour codes and formatting. The returned String should be expected in messages sent to players- Specified by:
getDisplayName
in classAlchemicalArrow
- Returns:
- the arrow's display name
-
getItem
public org.bukkit.inventory.ItemStack getItem()Description copied from class:AlchemicalArrow
Get the item representation of this alchemical arrow. The type must be be tagged byTag.ITEMS_ARROWS
, otherwise an exception will be thrown at registration.NOTE: This item does NOT have applied the NamespacedKey for this arrow and cannot be shot unless
AlchemicalArrow.matchesItem(ItemStack)
is overridden by implementation. Callers should prefer instead to callAlchemicalArrow.createItemStack()
. This method is expected to be overridden by implementations, NOT to be called by API.- Specified by:
getItem
in classAlchemicalArrow
- Returns:
- the arrow item
-
onShootFromPlayer
Description copied from class:AlchemicalArrow
Called at low priority when a player has successfully shot this alchemical arrow, but it has yet to be registered. Such that this method returns true, the alchemical arrow will be launched- Overrides:
onShootFromPlayer
in classAlchemicalArrow
- Parameters:
arrow
- the alchemical arrow entity instanceplayer
- the player that shot the arrow- Returns:
- whether the shot should be permitted or not
-
reload
public void reload()
-