BanManager icon indicating copy to clipboard operation
BanManager copied to clipboard

feat: Velocity Implementation

Open Romvnly-Gaming opened this issue 3 years ago • 6 comments

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!

Romvnly-Gaming avatar Jan 21 '22 03:01 Romvnly-Gaming

Something's wrong with this sentence, either grammar or spelling ...

Probably. 🤷‍♂️

Romvnly-Gaming avatar Feb 19 '22 12:02 Romvnly-Gaming

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.

Joo200 avatar Feb 20 '22 21:02 Joo200

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! 🙏

Romvnly-Gaming avatar Mar 09 '22 12:03 Romvnly-Gaming

Any updates?

iamflorencejay avatar Jun 16 '22 18:06 iamflorencejay

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!

Romvnly-Gaming avatar Jun 16 '22 18:06 Romvnly-Gaming

is there any ETA on this MR? would love to use BanManager with Velocity

emmanuelvlad avatar Aug 09 '22 05:08 emmanuelvlad

I know a bit a Java (and Minecraft modding). Could I help with anything?

ajh123 avatar Dec 27 '22 12:12 ajh123

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.

BrycensRanch avatar Dec 27 '22 22:12 BrycensRanch

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!

Romvnly-Gaming avatar Jan 30 '23 12:01 Romvnly-Gaming