Uploaded image for project: 'SpigotPlugins'
  1. SpigotPlugins
  2. PLUG-202

Essentials delayed user setup on player join

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      When a player joins the server, Essentials currently handles most of its user setup after a delay (https://hub.spigotmc.org/stash/projects/PLUGIN/repos/essentials/browse/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java#206).

      It is first doing some stuff as asynchronously and then continue after switching back to the main thread. And only by then the player gets setup: His last account name and last login get set, and his display name gets applied (https://hub.spigotmc.org/stash/projects/PLUGIN/repos/essentials/browse/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java#272).

      Would it be somehow possible to handle this, at least in parts, earlier already, so plugins can use this information inside the PlayerJoinEvent, or at least at most 1 tick afterwards?

      I am currently having multiple situations in which this would be beneficial for plugins:
      I have a plugin which defines placeholders for other plugins. One of those placeholders would for example be replaced to the player's display name. Now most plugins make use of this already inside the player join event, or at most 1 tick afterwards.

      And another plugins is using ProtocolLib to replace placeholders on the sign contents sent to the player after joining the server with the player's display name as well.

      Essentials however applies the display name after an unspecified amount of delay. Even if some plugin is using monitor event priority or even a 1 tick delay, it is not guaranteed to be applied by then due to the asynchronous task which runs before.

            Unassigned Unassigned
            blablubbabc blablubbabc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: