-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve BungeeCord support #388
Comments
It's a how we would take all the nicknames from LuckPerms (it's in Kotlin but I believe you understand the idea): fun main() {
with(LuckPermsProvider.get().userManager) {
val nicknames = uniqueUsers.join().asSequence()
.map { getOrLoadUser(it) }
.mapNotNull { it.username }
.toCollection(HashSet())
}
}
fun UserManager.getOrLoadUser(uuid: UUID): User {
return this.getUser(uuid) ?: this.loadUser(uuid).join()
} We could load all usernames on startup async and then listen to |
Thanks @BlackBaroness for issue. Yeah, I forgot to implement the modern features in the bungee platform. TODO list:
I think it's better for someone to self-implement it.
Currently you can use adventure on the Bungee platform. |
To me, the current BungeeCord module is quite simple and not as well-thought-out as some others modules.
I see some improvements we could make (it's annoying to create a lot of issues so we can discuss here and then split):
Outdated argument/contextual message approach
This module doesn't use modern
MessageKey
system and still uses legacy generic+constructor variant.No Adventure environment present
Maybe we can add something like
bukkit-adventure
which would accept aBungeeAudiences
instance? Adventure supports BungeeCord and we all (I hope) love MiniMessage, so this is something what default modern plugin would use. BungeeCord isn't really legacy thing by its own, it still can be used in many modern environments.No platform-specific arguments
To me, we need to add at least:
ProxiedPlayer
Nothing to say, just online player.
ServerInfo
Maybe also restrict it somehow, so players won't see servers they don't have access to in tab-complete? However, I would use such an argument only for admins.
Offline players
It's a kinda difficult but would look nicely - we don't have
OfflinePlayer
like in Bukkit but we can extract nicknames from some different source, like optionally hooking into LuckPerms. Also, it's important that such an argument must accept any input, maybe we can do a POJO like aOfflineProxiedPlayer(@Nullable ProxiedPlayer)
This can be a great and platform-independent API, actually. We could make something like...
...and then add a default implementation that would use something it can, for example, hook into the LuckPerms if it's installed or remember player names entered the network during this session. There are a lot to discuss.
I am ready to contribute for these features.
The text was updated successfully, but these errors were encountered: