Class Talisman
java.lang.Object
io.github.pylonmc.rebar.item.RebarItem
io.github.pylonmc.pylon.content.talismans.Talisman
- All Implemented Interfaces:
io.github.pylonmc.rebar.item.base.RebarInventoryEffectItem, io.github.pylonmc.rebar.item.base.RebarInventoryTicker, net.kyori.adventure.key.Keyed, org.bukkit.Keyed
- Direct Known Subclasses:
AttributeTalisman, BarteringTalisman, BreedingTalisman, EnchantingTalisman, ExperienceTalisman, FarmingTalisman, FlightRing, HuntingTalisman
public abstract class Talisman
extends io.github.pylonmc.rebar.item.RebarItem
implements io.github.pylonmc.rebar.item.base.RebarInventoryEffectItem
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.pylonmc.rebar.item.RebarItem
io.github.pylonmc.rebar.item.RebarItem.CompanionNested classes/interfaces inherited from interface io.github.pylonmc.rebar.item.base.RebarInventoryEffectItem
io.github.pylonmc.rebar.item.base.RebarInventoryEffectItem.Companion -
Field Summary
FieldsFields inherited from class io.github.pylonmc.rebar.item.RebarItem
CompanionFields inherited from interface io.github.pylonmc.rebar.item.base.RebarInventoryEffectItem
Companion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEffect(@NotNull org.bukkit.entity.Player player) The implementation of this method MUST call super.applyEffectlongintgetLevel()Get the level of the talisman, this is used to determine which talismans should overwrite other onesabstract org.bukkit.NamespacedKeyGet the generic key of the talisman, should be the same between all talismans of the same type, ie all health talisman levels have the same return value for this.voidonAddedToInventory(@NotNull org.bukkit.entity.Player player) voidonRemovedFromInventory(@NotNull org.bukkit.entity.Player player) voidremoveEffect(@NotNull org.bukkit.entity.Player player) The implementation of this method MUST call super.removeEffectMethods inherited from class io.github.pylonmc.rebar.item.RebarItem
equals, fromStack, fromStack, getAddon, getKey, getPlaceholders, getRebarBlock, getResearch, getResearchBypassPermission, getSchema, getSettings, getSettings, getStack, hashCode, isDisabled, isRebarItem, isRebarItem, place, prePlace, register, register, suppressNameWarningsMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.Keyed
keyMethods inherited from interface io.github.pylonmc.rebar.item.base.RebarInventoryEffectItem
getItemKey, onTick
-
Field Details
-
level
public final int level
-
-
Constructor Details
-
Talisman
protected Talisman(@NotNull @NotNull org.bukkit.inventory.ItemStack stack)
-
-
Method Details
-
onAddedToInventory
public void onAddedToInventory(@NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
onAddedToInventoryin interfaceio.github.pylonmc.rebar.item.base.RebarInventoryEffectItem
-
onRemovedFromInventory
public void onRemovedFromInventory(@NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
onRemovedFromInventoryin interfaceio.github.pylonmc.rebar.item.base.RebarInventoryEffectItem
-
applyEffect
@MustBeInvokedByOverriders public void applyEffect(@NotNull @NotNull org.bukkit.entity.Player player) The implementation of this method MUST call super.applyEffect- Parameters:
player- The player who the effect is being applied to
-
removeEffect
@MustBeInvokedByOverriders public void removeEffect(@NotNull @NotNull org.bukkit.entity.Player player) The implementation of this method MUST call super.removeEffect- Parameters:
player- The player who the effect is being removed from
-
getBaseTickInterval
public long getBaseTickInterval()- Specified by:
getBaseTickIntervalin interfaceio.github.pylonmc.rebar.item.base.RebarInventoryTicker
-
getLevel
public int getLevel()Get the level of the talisman, this is used to determine which talismans should overwrite other ones -
getTalismanKey
public abstract org.bukkit.NamespacedKey getTalismanKey()Get the generic key of the talisman, should be the same between all talismans of the same type, ie all health talisman levels have the same return value for this.
-