Use EnumTrait->equals() instead of direct comparison

It's not guaranteed that objects provided are the same as those in the enum registry, so they can't be directly compared.

Implementing comparison with === would require some kind of __equals() implementation or an extension to hook into such functionality.
This commit is contained in:
Dylan K. Taylor
2019-05-24 17:21:44 +01:00
parent 9ce1e29a17
commit 3ea8da2dd3
10 changed files with 32 additions and 32 deletions

View File

@ -1554,7 +1554,7 @@ class Server{
}
}
if($type === PluginLoadOrder::POSTWORLD()){
if($type->equals(PluginLoadOrder::POSTWORLD())){
$this->commandMap->registerServerAliases();
DefaultPermissions::registerCorePermissions();
}