Jannyboy11 / InvSee-plus-plus

A bukkit plugin for manipulating player inventories
Other
93 stars 17 forks source link

Use Electroid mojang-api to prevent rate-limits #54

Closed kaxlabs closed 1 year ago

kaxlabs commented 1 year ago

Instead of the official Mojang API, I suggest using https://github.com/Electroid/mojang-api so that the main server never gets rate limited if too many people use the command. I believe if that happens, people will no longer be able to join the server for a while.

Jannyboy11 commented 1 year ago

Is this a problem that you're actually running into, or is this a problem that you think servers will run in to, hypothetically? I'm not convinced that the problem you're describing actually happens in practice because of two reasons:

  1. If the mojang api is a different service than the session service, so I don't know whether the same rate limit applies.
  2. InvSee++ already employs multiple strategies to resolve player UUIDs in order to prevent doing Mojang API calls where possible. See https://github.com/Jannyboy11/InvSee-plus-plus/wiki/Advanced-usage#changing-how-uuid-lookups-work-unstable-api

Do you really think using Electroid's mojang api solves any real issues servers are facing because of InvSee++ UUID lookups? On top of that, I would rather avoid depending on a third-party service in order to obtain UUIDs, as they might return false answers.

kaxlabs commented 1 year ago

I suppose it's a rather niche scenario due to the other checks in place. For reference though, Electroid's mojang-api is the most popular and widely tested third-party service.

Jannyboy11 commented 1 year ago

I can still implement it as a UUIDResolveStrategy but not enable it by default.

Jannyboy11 commented 1 year ago

Strategies implemented as of https://github.com/Jannyboy11/InvSee-plus-plus/commit/824053d4cd88200d160124b12470340dd55126e6.

Closing this in favour of https://github.com/Jannyboy11/InvSee-plus-plus/issues/57.