Jonathan Chan Kwan Yin
Jonathan Chan Kwan Yin
Side note (previously discussed on discord): I would also like to use `ApiMap` to replace MetadataStore, so that plugins do not have to handle sessions themselves. E.g. an economy plugin:...
I just noticed bukkit has something very similar: https://bukkit.org/threads/services-api-intro.26998/
I think this problem is better solved by an approach in the style of #4471. Main classes should not be the API entrypoint of a plugin, because that implies god...
> > I think this problem is better solved by an approach in the style of #4471. Main classes should not be the API entrypoint of a plugin, because that...
the problem with generators in particular is that it's easy for people to copy code (e.g. from some other plugins) without being aware that it only works in an await-generator...
Plugins should not have used getPlayerExact on a loop in the first place. If you just want to identify a player with a scalar, use the UUID.
> > Plugins should not have used getPlayerExact on a loop in the first place. If you just want to identify a player with a scalar, use the UUID. >...
On a related note, methods that are computationally expensive (maybe more than average O(log n)) should not use the `get` verb anyway. Any thoughts on renaming `getPlayerByPrefix` to `findPlayerByPrefix`?
> > Moreover, I don't see any place where this is used in a hot path (typically commands, forms, or AsyncTask::onCompletion()), so I doubt this change provides any meaningful benefit....
> As I said earlier, we're dealing with a community that will write `if(in_array(thing, array)){ thingIdx = array_search(thing, array); }` and then blame PocketMine for their performance issues. I don't...