pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.54k forks source link

Parsing docComment error for priority leaves trailing trimmable characters #2110

Closed KennFatt closed 6 years ago

KennFatt commented 6 years ago

Issue description

There is an error while parsing docComment.

I'm trying to declare @priority by this way:

/**

  • @priority HIGHEST
  • @param PlayerIllegalMoveEvent $event */

and HIGHEST also known as here. As we can see, HIGHEST has 7 characters (H, I, G, H , E, S, T) Remember this point.

Steps to reproduce the issue

  1. Just fix the regular expression.

OS and versions

Plugins

Crashdump, backtrace or other files

For HIGHEST priority: pocketmine\plugin\PluginException: "Event handler specter\Specter->onIllegalMove() declares invalid/unknown priority "HIGHEST "" (EXCEPTION) in "src/pocketmine/plugin luginManager" at line 739

For LOW priority: pocketmine\plugin\PluginException: "Event handler specter\Specter->onIllegalMove() declares invalid/unknown priority "LOW "" (EXCEPTION) in "src/pocketmine/plugin/Plu ginManager" at line 739

dktapps commented 6 years ago

Interesting. I wonder if this bug was also in effect prior to subevent-handler merge.

KennFatt commented 6 years ago

I thought it was not a 'space' character there, because I've just tried to replace it with empty character and still error.