BanManager
BanManager copied to clipboard
feat: Velocity Implementation
Velocity Support
This PR adds Velocity support as a proxy, based on Bungee's implementation.
Special thanks to ryzech for helping make this boot!
Todo
- [ ] Run extensive tests
- [x] Add Velocity Metrics ID (confuser's job)
- [x] Fix sendJSONMessage
Gradle PR (#951)
When the switch to Gradle gets approved, I'm more than glad to switch this PR to Gradle. ❤
- [x] Now Gradle-based!
Something's wrong with this sentence, either grammar or spelling ...
Probably. 🤷♂️
that doesn't look good. And I don't think it should work like that. I'm not too familiar with the velocity API but https://jd.velocitypowered.com/1.1.0/com/velocitypowered/api/event/EventManager.html#fire(E) does return a CompletableFuture<Event> and will execute the event async. Therefore the result isn't there when you need it. Velocity doesn't execute events sync and therefore you'd need to check the result of the CompletableFuture. Cancelling a PlayerBanEvent might not result in not banning the player.
Another thing is: The Events don't implement ResultedEvent. I guess ResultedEvent<ResultedEvent.GenericResult> should fit fine here. Not sure whether this could be a big problem (and I didn't tested it) but we should use the velocity conventions here and use those classes from Velocity.
With that: Yes, your Cancellable class can be deleted. No need to copy paste classes when Velocity already has the correct implementations for that.
Sorry for the delay on this PR! A lot has been going on in my life but I plan to finish it this weekend so I can walk on PRing other projects with Velocity support! 🙏
Any updates?
I'm currently stuck with attempting to follow velocity conventions as I'm a beginner with Java, it's crazy enough this port actually boots. But, thank you for the support!
is there any ETA on this MR? would love to use BanManager with Velocity
I know a bit a Java (and Minecraft modding). Could I help with anything?
I know a bit a Java (and Minecraft modding). Could I help with anything?
Thanks, I'm currently working on it this week. I've dealt with merge conflicts and everything on my local computer. Just haven't gotten around to creating a new PR as this is my new account.
Hey, unfortunately, I have stopped playing video games and I no longer have priority to finish this PR, as I am but a simple Java beginner, I still have so much to learn and I can't give this PR it needs. The merge conflicts on my computer can easily be replicated by just keeping my previous changes and adding on the new ones when necessary. Best of luck, guys! After that, the velocity plug-in does work somewhat, it just needs various bug fixes. Good luck!