menu
#3238211 Cannot declare class ReveriaBreak\BlockBreakEvent because the name is already in use

Submitted by PocketMine-MP 3.9.7

General information

Version: 3.9.7
Git commit: 0c91d568
Plugin involvement: Direct
Report date: 2019-12-01 12:38:29 +0000 UTC

System Information

PHP version: 7.3.11
Operating system: win
System banner: Windows NT LAPTOP-TRIGHB92 10.0 build 18362 (Windows 10) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Cannot declare class ReveriaBreak\BlockBreakEvent because the name is already in use
File: plugins/ReveriaBreak/src/ReveriaBreak/Main
Line: #12
Error level: E_COMPILE_ERROR
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace ReveriaBreak;

use pocketmine\block\Block;
use pocketmine\block\BlockBreakEvent;
use pocketmine\block\BlockEvent;
use pocketmine\event\Cancellable;
use pocketmine\item\Item;
use pocketmine\Player;

class BlockBreakEvent extends BlockEvent implements Cancellable {

public function onBreak(BlockBreakEvent $event) {
$player = $event->getPlayer();
$block = $event->getBlock();
$item = $player->getInventory()->getItemInHand();
if($block->getId() === 49){
if(!$item->getId() === 285){
$event->setCancelled();
}
}

Loaded Plugins

  • Show

Server Settings

  • Show