-
Notifications
You must be signed in to change notification settings - Fork 73
Add Velocity Support #766
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
Add Velocity Support #766
Conversation
…d make Velocity build with JDK 17
Andre601
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few points I want to give my personal input towards.
One main thing that should be done, but that I didn't want to mention on every single file, is to update the copyright header for every added and changed file to have 2025 as the year, since this was the year those files where added/changed and where the copyright becomes effective.
|
|
||
| - name: Set up JDK 16 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While probably not necessary, it could be good to update this to v4, because... why should it stay on v2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be changed if we want to use v4. Left it at v2 to minimize changes
| player.disconnect(Component.text(NO_RELOAD_PLAYERS)); | ||
| } | ||
| } | ||
| getProxy().getPluginManager().getPlugin("BungeeTabListPlus"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What particular reason has this method call? Isn't that redundant, or does it force Velocity to perform some necessary background tasks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably part of old code that I didn't fully remove. I removed it in the latest commit
| BungeeTabListPlus.getInstance(this).onLoad(); | ||
| BungeeTabListPlus.getInstance(this).onEnable(); | ||
| // Metrics | ||
| metricsFactory.make(this, 4332); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs updating of the ID, given Velocity and BungeeCord are treated as separate environments on bStats and this would only cause confusion.
Leaving this as a note for CodeCrafter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will most definitely need to be a new metric ID created for Velocity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created a new id: 24808.
| public void onProxyShutdown(final ProxyShutdownEvent event) { | ||
| BungeeTabListPlus.getInstance().onDisable(); | ||
| if (!getProxy().isShuttingDown()) { | ||
| getLogger().error("You cannot use ServerUtils to reload BungeeTabListPlus. Use /btlp reload instead."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ServerUtils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ServerUtils is the only Velocity plugin for reloading plugins, kinda like PlugMan. This can be genericized in case of other plugins existing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm mixed feelings on this utility.
I see the BBCode style aproach as kind of pointless, because Velocity exposes Adventure and MiniMessage, already providing a String-based parsing for rich text.
At most could this perhaps be useful for parsing legacy colors before sending everything through the MM parsing itself.
I also think that the use of such large regex patterns is a bit excessive and could probably cause performance issues? Was that properly tested already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is copied from here which the Bungee version of the plugin uses but the Velocity version cannot use because of it using BungeeCord components as return values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see the use is mostly internal?
In such a case could it probs be easier to utilize the pre-existing MiniMessage system embedded into Velocity.
Tho, in the end is there not much of a problem here to have this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to keep it most like the existing BungeeTabListPlus formatting in that someone could take a config and use it on both sides (minus the luckperms permission providers)
Who should I copyright on this because it certainly wasn't Florian that ported it. Should I copyright with my own name or is there a project setup so that BungeeTabListPlus can be copywritten in itself? |
It should work having both.
Saw this within other projects. |
|
Personally, I find the copyright notices a bit annoying to keep up-to-date. If you want, then you can update them, but I would also be fine merging this as is. Adding your own name, as Andre601 suggests, is fine. |
|
I was told copyright really is only necessary to update for files that get updated. At least the newly sdded files should use 2025, as they didn't exis before, no? |
|
Copyrights have been updated, the metrics have changed to the new ID for velocity, and I adjusted the Team packet to use an enumeration for modes as well as cleaned up some of the map initializers. |
|
Is this good to be merged from your side? |
As long as there are nothing else needing changed and we are good on all the questions, then this can be merged. |
|
It's merged now. Sorry this took so long. |
No description provided.