Requested Feature aka Suggested Fix for a Minor Bug: skull command
Pheotis opened this issue ยท 2 comments
Feature Request
Existing behaviour
Currently, the essentials skull
command is governed by four permission nodes: essentials.skull
, essentials.skull.modify
, essentials.skull.spawn
, and essentials.skull.others
.
Effectively, this means that it is an all-or-nothing approach with regards to whom a head may be generated for; anybody with the essentials.skull.others
node can generate the skull of any player.
Description of requested addition
I would like to request the addition of a fifth node, essentials.skull.offline
.
This node would grant users with essentials.skull.others
the ability to generate the skulls of offline (and probably non-cached) players -- something I believe should be disallowed by default. Even if allowed by default, this node would, at the very least, allow for the possibility of negating non-cached / offline skull requests.
How the feature is useful
With the current system, it is not practical to allow the general playerbase to generate others' skulls.
This is because any attempts to do so allows such players to request non-cached / offline skulls.
getOfflinePlayer()
is very slow, and in some cases, generates a lag spike that makes the server unplayable for several seconds (that link is a timings report demonstrating such an instance).
By adding a node with which to disallow non-cached / offline lookups, it becomes practical to give the skull command to a non-staff permission group; something which has many applications including cosmetics, markers, decorations, and limited utility.
Update:
MD informed me earlier today that spigot has no way to check the cache status of a UUID.
While that limits the methods with which to accomplish this, I think it still remains possible:
From personal testing, I have determined that the lag spikes never occur with skull generation for players who are currently online. Therefore, I think it is safe to assume that all players currently online are probably cached.
As such, by adding the ability to negate offline lookups with regard to skulls (with essentials.skull.offline
), it would almost certainly fix the problem and allow for the above use case.
This is no longer necessary as #3337 refactored the /skull
command to perform this operation asynchronously.