Class WorldGuardBlockListener
java.lang.Object
com.sk89q.worldguard.bukkit.listener.WorldGuardBlockListener
- All Implemented Interfaces:
org.bukkit.event.Listener
The listener for block 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
onBlockBreak
(org.bukkit.event.block.BlockBreakEvent event) void
onBlockBurn
(org.bukkit.event.block.BlockBurnEvent event) void
onBlockExplode
(org.bukkit.event.block.BlockExplodeEvent event) void
onBlockFade
(org.bukkit.event.block.BlockFadeEvent event) void
onBlockForm
(org.bukkit.event.block.BlockFormEvent event) void
onBlockFromTo
(org.bukkit.event.block.BlockFromToEvent event) void
onBlockGrow
(org.bukkit.event.block.BlockGrowEvent event) void
onBlockIgnite
(org.bukkit.event.block.BlockIgniteEvent event) void
onBlockPhysics
(org.bukkit.event.block.BlockPhysicsEvent event) void
onBlockPlace
(org.bukkit.event.block.BlockPlaceEvent event) void
onBlockRedstoneChange
(org.bukkit.event.block.BlockRedstoneEvent event) void
onBlockSpread
(org.bukkit.event.block.BlockSpreadEvent event) void
onLeavesDecay
(org.bukkit.event.block.LeavesDecayEvent event) void
onMoistureChange
(org.bukkit.event.block.MoistureChangeEvent event) Called when the moisture level of a block changesvoid
Register events.
-
Constructor Details
-
WorldGuardBlockListener
Construct the object.- Parameters:
plugin
- The plugin instance
-
-
Method Details
-
onBlockBreak
public void onBlockBreak(org.bukkit.event.block.BlockBreakEvent event) -
onBlockFromTo
public void onBlockFromTo(org.bukkit.event.block.BlockFromToEvent event) -
onBlockIgnite
public void onBlockIgnite(org.bukkit.event.block.BlockIgniteEvent event) -
onBlockBurn
public void onBlockBurn(org.bukkit.event.block.BlockBurnEvent event) -
onBlockPhysics
public void onBlockPhysics(org.bukkit.event.block.BlockPhysicsEvent event) -
onBlockPlace
public void onBlockPlace(org.bukkit.event.block.BlockPlaceEvent event) -
onBlockRedstoneChange
public void onBlockRedstoneChange(org.bukkit.event.block.BlockRedstoneEvent event) -
onLeavesDecay
public void onLeavesDecay(org.bukkit.event.block.LeavesDecayEvent event) -
onBlockForm
public void onBlockForm(org.bukkit.event.block.BlockFormEvent event) -
onBlockSpread
public void onBlockSpread(org.bukkit.event.block.BlockSpreadEvent event) -
onBlockGrow
public void onBlockGrow(org.bukkit.event.block.BlockGrowEvent event) -
onBlockFade
public void onBlockFade(org.bukkit.event.block.BlockFadeEvent event) -
onBlockExplode
public void onBlockExplode(org.bukkit.event.block.BlockExplodeEvent event) -
onMoistureChange
public void onMoistureChange(org.bukkit.event.block.MoistureChangeEvent event) Called when the moisture level of a block changes -
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)
-