Class MechanicListener
java.lang.Object
studio.magemonkey.fabled.listener.FabledListener
studio.magemonkey.fabled.listener.MechanicListener
- All Implemented Interfaces:
org.bukkit.event.Listener
The listener for handling events related to dynamic mechanics
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addExemptExperience
(org.bukkit.entity.Player player, double amount) void
blockIgnite
(org.bukkit.event.block.BlockIgniteEvent event) void
cleanup()
Cleans up listener data on shutdownvoid
combust
(org.bukkit.event.entity.EntityCombustByEntityEvent event) boolean
isOnGround
(org.bukkit.Location loc) void
onApply
(FlagApplyEvent event) Applies effects when specific flag keys are setvoid
onArmorStandInteract
(org.bukkit.event.player.PlayerArmorStandManipulateEvent event) Cancels interactions with armor stands corresponding to an Armor Stand Mechanicvoid
onBreak
(org.bukkit.event.block.BlockBreakEvent event) Can't break blocks from block mechanicsvoid
onChunkLoad
(org.bukkit.event.world.ChunkLoadEvent event) void
onDamageByEntity
(org.bukkit.event.entity.EntityDamageByEntityEvent event) Applies projectile and lightning callbacks when striking an enemyvoid
onEntityCombust
(org.bukkit.event.entity.EntityCombustEvent event) void
onEntityDamage
(org.bukkit.event.entity.EntityDamageEvent event) void
onEntityDamageCause
(org.bukkit.event.entity.EntityDamageEvent event) void
Used for experience mechanicvoid
onExpire
(FlagExpireEvent event) Clears speed modifiers when the flag expiresvoid
onExplode
(org.bukkit.event.entity.EntityExplodeEvent event) Stop explosions of projectiles fired from skillsvoid
onItemPickup
(org.bukkit.event.inventory.InventoryPickupItemEvent event) Prevent item projectiles from being absorbed by hoppersvoid
onLand
(org.bukkit.event.entity.ProjectileHitEvent event) Applies projectile callbacks when landing on the groundvoid
onMove
(org.bukkit.event.player.PlayerMoveEvent event) Checks for landing on the groundvoid
onQuit
(org.bukkit.event.player.PlayerQuitEvent event) Resets walk speed and clears them from the map when quittingvoid
onSplash
(org.bukkit.event.entity.PotionSplashEvent event) Handles when a potion projectile hits thingsvoid
onSummonDamage
(org.bukkit.event.entity.EntityDamageByEntityEvent event) Handles when summoned monsters deal damageMethods inherited from class studio.magemonkey.fabled.listener.FabledListener
init
-
Field Details
-
SUMMON_DAMAGE
- See Also:
-
P_CALL
- See Also:
-
NO_FIRE
- See Also:
-
POTION_PROJECTILE
- See Also:
-
ITEM_PROJECTILE
- See Also:
-
SKILL_LEVEL
- See Also:
-
SKILL_CASTER
- See Also:
-
SPEED_KEY
- See Also:
-
DISGUISE_KEY
- See Also:
-
ARMOR_STAND
- See Also:
-
DAMAGE_CAUSE
- See Also:
-
-
Constructor Details
-
MechanicListener
public MechanicListener()
-
-
Method Details
-
cleanup
public void cleanup()Cleans up listener data on shutdown- Overrides:
cleanup
in classFabledListener
-
onMove
public void onMove(org.bukkit.event.player.PlayerMoveEvent event) Checks for landing on the ground- Parameters:
event
- event details
-
isOnGround
public boolean isOnGround(org.bukkit.Location loc) -
onQuit
public void onQuit(org.bukkit.event.player.PlayerQuitEvent event) Resets walk speed and clears them from the map when quitting- Parameters:
event
- event details
-
onApply
Applies effects when specific flag keys are set- Parameters:
event
- event details
-
onExpire
Clears speed modifiers when the flag expires- Parameters:
event
- event details
-
onLand
public void onLand(org.bukkit.event.entity.ProjectileHitEvent event) Applies projectile callbacks when landing on the ground- Parameters:
event
- event details
-
onItemPickup
public void onItemPickup(org.bukkit.event.inventory.InventoryPickupItemEvent event) Prevent item projectiles from being absorbed by hoppers- Parameters:
event
- event details
-
onExperienceGain
Used for experience mechanic- Parameters:
event
- event details
-
addExemptExperience
public static void addExemptExperience(org.bukkit.entity.Player player, double amount) -
onExplode
public void onExplode(org.bukkit.event.entity.EntityExplodeEvent event) Stop explosions of projectiles fired from skills- Parameters:
event
- event details
-
onDamageByEntity
public void onDamageByEntity(org.bukkit.event.entity.EntityDamageByEntityEvent event) Applies projectile and lightning callbacks when striking an enemy- Parameters:
event
- event details
-
combust
public void combust(org.bukkit.event.entity.EntityCombustByEntityEvent event) -
blockIgnite
public void blockIgnite(org.bukkit.event.block.BlockIgniteEvent event) -
onSummonDamage
public void onSummonDamage(org.bukkit.event.entity.EntityDamageByEntityEvent event) Handles when summoned monsters deal damage- Parameters:
event
- event details
-
onSplash
public void onSplash(org.bukkit.event.entity.PotionSplashEvent event) Handles when a potion projectile hits things- Parameters:
event
- event details
-
onBreak
public void onBreak(org.bukkit.event.block.BlockBreakEvent event) Can't break blocks from block mechanics- Parameters:
event
- event details
-
onEntityDamage
public void onEntityDamage(org.bukkit.event.entity.EntityDamageEvent event) -
onEntityDamageCause
public void onEntityDamageCause(org.bukkit.event.entity.EntityDamageEvent event) -
onEntityCombust
public void onEntityCombust(org.bukkit.event.entity.EntityCombustEvent event) -
onArmorStandInteract
public void onArmorStandInteract(org.bukkit.event.player.PlayerArmorStandManipulateEvent event) Cancels interactions with armor stands corresponding to an Armor Stand Mechanic- Parameters:
event
- event details
-
onChunkLoad
public void onChunkLoad(org.bukkit.event.world.ChunkLoadEvent event)
-