Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Possible workaround with #3330
Browse files Browse the repository at this point in the history
Filters away non-public event handlers
  • Loading branch information
PEMapModder committed Jul 30, 2015
1 parent 0380e90 commit 9bbaf5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pocketmine/plugin/PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ public function registerEvents(Listener $listener, Plugin $plugin){
}

$reflection = new \ReflectionClass(get_class($listener));
foreach($reflection->getMethods() as $method){
foreach($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $method){
if(!$method->isStatic()){
$priority = EventPriority::NORMAL;
$ignoreCancelled = false;
Expand Down

1 comment on commit 9bbaf5d

@iksaku
Copy link
Contributor

@iksaku iksaku commented on 9bbaf5d Aug 8, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.