Class SentinelEventHandler

java.lang.Object
org.mcmonkey.sentinel.SentinelEventHandler
All Implemented Interfaces:
org.bukkit.event.Listener

public class SentinelEventHandler extends Object implements org.bukkit.event.Listener
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Class to help prevent kill statistic incrementing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Prefix string for an inventory title.
    Map to track automatic kill-statistic incrementing.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onAsyncPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event)
    Called when players chat, to process event message targets.
    void
    onBlockIgnites(org.bukkit.event.block.BlockIgniteEvent event)
     
    void
    onEntityCombusts(org.bukkit.event.entity.EntityCombustEvent event)
     
    void
    onEntityExplodes(org.bukkit.event.entity.EntityExplodeEvent event)
     
    void
    onInvClose(org.bukkit.event.inventory.InventoryCloseEvent event)
    Called when an inventory is closed.
    void
    onItemDamage(org.bukkit.event.player.PlayerItemDamageEvent event)
    Called when armor or weapons are damaged, used to block unwanted item damage.
    void
    onPlayerMovesInRange(org.bukkit.event.player.PlayerMoveEvent event)
    Called every time a player moves at all, for use with monitoring if players move into range of an NPC.
    void
    onPlayerTeleports(org.bukkit.event.player.PlayerTeleportEvent event)
    Called when a player teleports, to handle NPC guard updates.
    void
    onProjectileHitsBlock(org.bukkit.event.entity.ProjectileHitEvent event)
    Called when a projectile hits a block, to auto-remove Sentinel-fired arrows quickly.
    void
    onStatisticIncrement(org.bukkit.event.player.PlayerStatisticIncrementEvent event)
    Called when a player statistic increments, to prevent the "PLAYER_KILLS" stat updating for killing an NPC.
    void
    whenAnEnemyDies(org.bukkit.event.entity.EntityDeathEvent event)
    Called when any entity dies, to process drops handling and targeting updates.
    void
    whenAPlayerChangesWorld(org.bukkit.event.player.PlayerChangedWorldEvent event)
    Called when a player travels between worlds, mostly to clean some caches that might get confused about it.
    void
    whenAPlayerDies(org.bukkit.event.entity.PlayerDeathEvent event)
    Called when a player dies, to process handling of the message if a Sentinel caused it.
    void
    whenAttacksAreHappening(org.bukkit.event.entity.EntityDamageByEntityEvent event)
    Called when combat occurs in the world (and has not yet been processed by other plugins), to handle things like cancelling invalid damage to/from a Sentinel NPC, changing damage values given to or received from an NPC, and if relevant handling config options that require overriding damage events.
    void
    whenAttacksHappened(org.bukkit.event.entity.EntityDamageByEntityEvent event)
    Called when combat has occurred in the world (and has been processed by all other plugins), to handle things like cancelling invalid damage to/from a Sentinel NPC, adding targets (if combat occurs near an NPC), and if relevant handling config options that require overriding damage events.
    void
    whenEntitiesAreHurt(org.bukkit.event.entity.EntityDamageEvent event)
    Called when damage has occurred in the world (before being processed by all other plugins), to handle things like preventing overly rapid fire damage.
    void
    whenWeDie(org.bukkit.event.entity.EntityDeathEvent event)
    Called when a Sentinel NPC dies.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SentinelEventHandler

      public SentinelEventHandler()
  • Method Details

    • onEntityExplodes

      public void onEntityExplodes(org.bukkit.event.entity.EntityExplodeEvent event)
    • onBlockIgnites

      public void onBlockIgnites(org.bukkit.event.block.BlockIgniteEvent event)
    • onEntityCombusts

      public void onEntityCombusts(org.bukkit.event.entity.EntityCombustEvent event)
    • onProjectileHitsBlock

      public void onProjectileHitsBlock(org.bukkit.event.entity.ProjectileHitEvent event)
      Called when a projectile hits a block, to auto-remove Sentinel-fired arrows quickly.
    • onAsyncPlayerChat

      public void onAsyncPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event)
      Called when players chat, to process event message targets.
    • whenAttacksAreHappening

      public void whenAttacksAreHappening(org.bukkit.event.entity.EntityDamageByEntityEvent event)
      Called when combat occurs in the world (and has not yet been processed by other plugins), to handle things like cancelling invalid damage to/from a Sentinel NPC, changing damage values given to or received from an NPC, and if relevant handling config options that require overriding damage events.
    • whenEntitiesAreHurt

      public void whenEntitiesAreHurt(org.bukkit.event.entity.EntityDamageEvent event)
      Called when damage has occurred in the world (before being processed by all other plugins), to handle things like preventing overly rapid fire damage.
    • whenAttacksHappened

      public void whenAttacksHappened(org.bukkit.event.entity.EntityDamageByEntityEvent event)
      Called when combat has occurred in the world (and has been processed by all other plugins), to handle things like cancelling invalid damage to/from a Sentinel NPC, adding targets (if combat occurs near an NPC), and if relevant handling config options that require overriding damage events.
    • whenAPlayerDies

      public void whenAPlayerDies(org.bukkit.event.entity.PlayerDeathEvent event)
      Called when a player dies, to process handling of the message if a Sentinel caused it.
    • whenAPlayerChangesWorld

      public void whenAPlayerChangesWorld(org.bukkit.event.player.PlayerChangedWorldEvent event)
      Called when a player travels between worlds, mostly to clean some caches that might get confused about it.
    • whenAnEnemyDies

      public void whenAnEnemyDies(org.bukkit.event.entity.EntityDeathEvent event)
      Called when any entity dies, to process drops handling and targeting updates.
    • whenWeDie

      public void whenWeDie(org.bukkit.event.entity.EntityDeathEvent event)
      Called when a Sentinel NPC dies.
    • onStatisticIncrement

      public void onStatisticIncrement(org.bukkit.event.player.PlayerStatisticIncrementEvent event)
      Called when a player statistic increments, to prevent the "PLAYER_KILLS" stat updating for killing an NPC.
    • onPlayerTeleports

      public void onPlayerTeleports(org.bukkit.event.player.PlayerTeleportEvent event)
      Called when a player teleports, to handle NPC guard updates.
    • onPlayerMovesInRange

      public void onPlayerMovesInRange(org.bukkit.event.player.PlayerMoveEvent event)
      Called every time a player moves at all, for use with monitoring if players move into range of an NPC.
    • onInvClose

      public void onInvClose(org.bukkit.event.inventory.InventoryCloseEvent event)
      Called when an inventory is closed.
    • onItemDamage

      public void onItemDamage(org.bukkit.event.player.PlayerItemDamageEvent event)
      Called when armor or weapons are damaged, used to block unwanted item damage.