Class WorldGuardPlayerListener
java.lang.Object
com.sk89q.worldguard.bukkit.listener.WorldGuardPlayerListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Handles all events thrown in relation to a player.
-
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
onItemHeldChange
(org.bukkit.event.player.PlayerItemHeldEvent event) void
onPlayerChat
(org.bukkit.event.player.AsyncPlayerChatEvent event) void
onPlayerCommandPreprocess
(org.bukkit.event.player.PlayerCommandPreprocessEvent event) void
onPlayerGameModeChange
(org.bukkit.event.player.PlayerGameModeChangeEvent event) void
onPlayerInteract
(org.bukkit.event.player.PlayerInteractEvent event) void
onPlayerJoin
(org.bukkit.event.player.PlayerJoinEvent event) void
onPlayerLogin
(org.bukkit.event.player.PlayerLoginEvent event) void
onPlayerRespawn
(org.bukkit.event.player.PlayerRespawnEvent event) void
onPlayerTeleport
(org.bukkit.event.player.PlayerTeleportEvent event) void
Register events.
-
Constructor Details
-
WorldGuardPlayerListener
-
-
Method Details
-
onPlayerGameModeChange
public void onPlayerGameModeChange(org.bukkit.event.player.PlayerGameModeChangeEvent event) -
onPlayerJoin
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) -
onPlayerChat
public void onPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event) -
onPlayerLogin
public void onPlayerLogin(org.bukkit.event.player.PlayerLoginEvent event) -
onPlayerInteract
public void onPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event) -
onPlayerRespawn
public void onPlayerRespawn(org.bukkit.event.player.PlayerRespawnEvent event) -
onItemHeldChange
public void onItemHeldChange(org.bukkit.event.player.PlayerItemHeldEvent event) -
onPlayerTeleport
public void onPlayerTeleport(org.bukkit.event.player.PlayerTeleportEvent event) -
onPlayerCommandPreprocess
public void onPlayerCommandPreprocess(org.bukkit.event.player.PlayerCommandPreprocessEvent 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)
-