Do you even know the PocketMine API? PlayerJoinEvent is not a Cancellable. PocketMine will throw an exception of you attempt to cancel it. I believe you forgot a ! (not) operator on line 3. Man, it is no longer 1.3. PocketMine event handlers don't need any return values now. You should use the full names of the classes you mentioned in your code only. What is the significance of following?