Package dev.plex.listener.impl
Class WorldListener
java.lang.Object
dev.plex.listener.PlexListener
dev.plex.listener.impl.WorldListener
- All Implemented Interfaces:
PlexBase
,org.bukkit.event.Listener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canEnterWorld
(org.bukkit.entity.Player player, org.bukkit.World destination) Check if a Player has the ability to enter the requested worldprivate boolean
canModifyWorld
(org.bukkit.entity.Player player, boolean showMessage) Check if a Player has the ability to modify the world they are invoid
onBlockBreak
(org.bukkit.event.block.BlockBreakEvent event) void
onBlockPlace
(org.bukkit.event.block.BlockPlaceEvent event) void
onEntitySpawn
(org.bukkit.event.entity.EntitySpawnEvent event) void
onInteractWorld
(org.bukkit.event.entity.EntityDamageByEntityEvent event) void
onInteractWorld
(org.bukkit.event.player.PlayerInteractEntityEvent event) void
onInteractWorld
(org.bukkit.event.player.PlayerInteractEvent event) void
onInteractWorld
(org.bukkit.event.player.PlayerItemDamageEvent event) void
onPlayerCommandPreprocess
(org.bukkit.event.player.PlayerCommandPreprocessEvent event) void
onWorldTeleport
(org.bukkit.event.player.PlayerTeleportEvent event)
-
Field Details
-
EDIT_COMMANDS
-
-
Constructor Details
-
WorldListener
public WorldListener()
-
-
Method Details
-
onBlockPlace
public void onBlockPlace(org.bukkit.event.block.BlockPlaceEvent event) -
onBlockBreak
public void onBlockBreak(org.bukkit.event.block.BlockBreakEvent event) -
onInteractWorld
public void onInteractWorld(org.bukkit.event.player.PlayerInteractEvent event) -
onInteractWorld
public void onInteractWorld(org.bukkit.event.player.PlayerInteractEntityEvent event) -
onInteractWorld
public void onInteractWorld(org.bukkit.event.player.PlayerItemDamageEvent event) -
onInteractWorld
public void onInteractWorld(org.bukkit.event.entity.EntityDamageByEntityEvent event) -
onEntitySpawn
public void onEntitySpawn(org.bukkit.event.entity.EntitySpawnEvent event) -
onPlayerCommandPreprocess
public void onPlayerCommandPreprocess(org.bukkit.event.player.PlayerCommandPreprocessEvent event) -
onWorldTeleport
public void onWorldTeleport(org.bukkit.event.player.PlayerTeleportEvent event) -
canModifyWorld
private boolean canModifyWorld(org.bukkit.entity.Player player, boolean showMessage) Check if a Player has the ability to modify the world they are in- Parameters:
player
- The player who wants to modify the worldshowMessage
- Whether the message from the config.yml should be shown- Returns:
- Returns true if the person has the ability to modify the world
-
canEnterWorld
private boolean canEnterWorld(org.bukkit.entity.Player player, org.bukkit.World destination) Check if a Player has the ability to enter the requested world- Parameters:
player
- The player who wants to enter the world- Returns:
- Returns true if the person has the ability to enter the world
-