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`

public class WorldListener extends PlexListener

## Field Summary

Fields
Modifier and Type
Field
Description
`private final List<String>`
`EDIT_COMMANDS`

### Fields inherited from interface dev.plex.PlexBase

`plugin`

## Constructor Summary

Constructors
Constructor
Description
`WorldListener()`

## Method Summary

Modifier and Type
Method
Description
`private boolean`
`canEnterWorld(org.bukkit.entity.Player player)`
Check if a Player has the ability to enter the requested world
`private boolean`
`canModifyWorld(org.bukkit.entity.Player player, boolean showMessage)`
Check if a Player has the ability to modify the world they are in
`private boolean`
`checkLevel(PlexPlayer player, String[] requiredList)`
`void`
`onBlockBreak(org.bukkit.event.block.BlockBreakEvent event)`
`void`
`onBlockPlace(org.bukkit.event.block.BlockPlaceEvent event)`
`void`
`onEntitySpawn(org.bukkit.event.entity.EntitySpawnEvent event)`
`void`
`onPlayerCommandPreprocess(org.bukkit.event.player.PlayerCommandPreprocessEvent event)`
`void`
`onWorldTeleport(org.bukkit.event.player.PlayerTeleportEvent event)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### EDIT_COMMANDS

private final List<String> 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)

### 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)

### checkLevel

private boolean checkLevel(PlexPlayer player, String[] requiredList)

### 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 world
  `showMessage` - 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)
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