Class DiscoverSpellEvent
java.lang.Object
com.binaris.wizardry.api.content.event.abstr.WizardryCancelableEvent
com.binaris.wizardry.api.content.event.DiscoverSpellEvent
- All Implemented Interfaces:
IWizardryEvent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface representing the source of a spell discovery.static enumBuilt-in sources of spell discovery. -
Constructor Summary
ConstructorsConstructorDescriptionDiscoverSpellEvent(net.minecraft.world.entity.player.Player player, Spell spell, DiscoverSpellEvent.Source source) Constructs a newDiscoverSpellEvent. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.player.PlayerGets the player who is discovering the spell.Gets the source of the spell discovery.getSpell()Gets the spell that is being discovered.Methods inherited from class com.binaris.wizardry.api.content.event.abstr.WizardryCancelableEvent
canBeCanceled, isCanceled, setCanceled
-
Constructor Details
-
DiscoverSpellEvent
public DiscoverSpellEvent(net.minecraft.world.entity.player.Player player, Spell spell, DiscoverSpellEvent.Source source) Constructs a newDiscoverSpellEvent.- Parameters:
player- The player discovering the spell.spell- The spell being discovered.source- The source or method of the discovery.
-
-
Method Details
-
getSpell
Gets the spell that is being discovered.- Returns:
- The
Spellbeing discovered.
-
getSource
Gets the source of the spell discovery.- Returns:
- The
DiscoverSpellEvent.Sourcesdescribing how the spell was discovered.
-
getPlayer
public net.minecraft.world.entity.player.Player getPlayer()Gets the player who is discovering the spell.- Returns:
- The
Playerdiscovering the spell.
-