Jonathan Chan Kwan Yin

Results 291 comments of Jonathan Chan Kwan Yin

> It seems to me that it would be more logical to `addToast`, because Toasts queue up if, e.g. send more than two. Chat messages queue up in the chat...

I knew it. https://twitter.com/SOFe1970/status/1001841400416108544

If we are to keep the event, yes, this should be documented properly. To be exact, every non-intuitive function should be documented. We just don't have the time to do...

It is used to allow multiple plugins to use PlayerCreationEvent. If plugin A has `class Foo extends Player`, plugin B can do `class Bar extends Player`, and run their PlayerCreationEvent...

> > and even the whole event > > Why delete? Many people use this to change the logic of PocketMine-MP or implement their own API. > > For example....

This PR is behaviourally BC breaking if a plugin intentionally doesn't call testPermission normally, e.g. for the following use cases: - The plugin wants to implement custom permission failure handlers,...

> > > I also have my doubts that a centralized approach for this is necessary. Some plugins already have their own ways to do this with different behaviour. This...

> Is there a reason to not just add a `getApiMap()` method to `Server()` instead of adding a bunch of proxy methods? Just for convenience. For now I don't see...

> I'm also not sure what the point of "default" APIs is. Allowing there to be a difference just allows plugins to fight with each other, which seems to defeat...

Suggested addition: ``` public function onFinalize(string $class, Closure $closure) { $this->onStartupHook[] = function() { $instance = $this->getApi($class); if($instance) $closure($instance); } } ``` This allows decoupling plugin dependencies by only running...