Class WorldGuardEntityListener
java.lang.Object
com.sk89q.worldguard.bukkit.listener.WorldGuardEntityListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener for entity related events.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.sk89q.worldguard.protection.association.RegionAssociable
createRegionAssociable
(Cause cause) protected static BukkitConfigurationManager
Get the global configuration.protected static WorldGuardPlugin
Get the plugin.protected static BukkitWorldConfiguration
getWorldConfig
(com.sk89q.worldguard.LocalPlayer player) Get the world configuration given a player.protected static BukkitWorldConfiguration
getWorldConfig
(String world) Get the world configuration given a world.protected static BukkitWorldConfiguration
getWorldConfig
(org.bukkit.World world) protected static boolean
isRegionSupportEnabled
(org.bukkit.World world) Return whether region support is enabled.void
onCreatePortal
(org.bukkit.event.world.PortalCreateEvent event) void
onCreatureSpawn
(org.bukkit.event.entity.CreatureSpawnEvent event) void
onCreeperPower
(org.bukkit.event.entity.CreeperPowerEvent event) void
onEntityChangeBlock
(org.bukkit.event.entity.EntityChangeBlockEvent event) Called when an entity changes a block somehowvoid
onEntityDamage
(org.bukkit.event.entity.EntityDamageEvent event) void
onEntityDeath
(org.bukkit.event.entity.EntityDeathEvent event) void
onEntityExplode
(org.bukkit.event.entity.EntityExplodeEvent event) void
onEntityInteract
(org.bukkit.event.entity.EntityInteractEvent event) void
onEntityRegainHealth
(org.bukkit.event.entity.EntityRegainHealthEvent event) void
onEntityTransform
(org.bukkit.event.entity.EntityTransformEvent event) void
onExplosionPrime
(org.bukkit.event.entity.ExplosionPrimeEvent event) void
onFoodChange
(org.bukkit.event.entity.FoodLevelChangeEvent event) void
onPigZap
(org.bukkit.event.entity.PigZapEvent event) void
onVehicleEnter
(org.bukkit.event.vehicle.VehicleEnterEvent event) void
Register events.
-
Constructor Details
-
WorldGuardEntityListener
Construct the object;- Parameters:
plugin
- The plugin instance
-
-
Method Details
-
onEntityInteract
public void onEntityInteract(org.bukkit.event.entity.EntityInteractEvent event) -
onEntityDeath
public void onEntityDeath(org.bukkit.event.entity.EntityDeathEvent event) -
onEntityDamage
public void onEntityDamage(org.bukkit.event.entity.EntityDamageEvent event) -
onEntityExplode
public void onEntityExplode(org.bukkit.event.entity.EntityExplodeEvent event) -
onExplosionPrime
public void onExplosionPrime(org.bukkit.event.entity.ExplosionPrimeEvent event) -
onCreatureSpawn
public void onCreatureSpawn(org.bukkit.event.entity.CreatureSpawnEvent event) -
onCreatePortal
public void onCreatePortal(org.bukkit.event.world.PortalCreateEvent event) -
onEntityTransform
public void onEntityTransform(org.bukkit.event.entity.EntityTransformEvent event) -
onPigZap
public void onPigZap(org.bukkit.event.entity.PigZapEvent event) -
onCreeperPower
public void onCreeperPower(org.bukkit.event.entity.CreeperPowerEvent event) -
onEntityRegainHealth
public void onEntityRegainHealth(org.bukkit.event.entity.EntityRegainHealthEvent event) -
onFoodChange
public void onFoodChange(org.bukkit.event.entity.FoodLevelChangeEvent event) -
onEntityChangeBlock
public void onEntityChangeBlock(org.bukkit.event.entity.EntityChangeBlockEvent event) Called when an entity changes a block somehow- Parameters:
event
- Relevant event details
-
onVehicleEnter
public void onVehicleEnter(org.bukkit.event.vehicle.VehicleEnterEvent event) -
registerEvents
public void registerEvents()Register events. -
getPlugin
Get the plugin.- Returns:
- the plugin
-
getConfig
Get the global configuration.- Returns:
- the configuration
-
getWorldConfig
Get the world configuration given a world.- Parameters:
world
- The world to get the configuration for.- Returns:
- The configuration for
world
-
getWorldConfig
-
getWorldConfig
Get the world configuration given a player.- Parameters:
player
- The player to get the wold from- Returns:
- The
WorldConfiguration
for the player's world
-
isRegionSupportEnabled
protected static boolean isRegionSupportEnabled(org.bukkit.World world) Return whether region support is enabled.- Parameters:
world
- the world- Returns:
- true if region support is enabled
-
createRegionAssociable
protected com.sk89q.worldguard.protection.association.RegionAssociable createRegionAssociable(Cause cause)
-