Added Velocity support (#182)

This PR adds support for the upcoming proxy Velocity.
https://www.velocitypowered.org/

A few note worthy issues:
 - Velocity does not provide a static method for its ProxyServer instance, so the instance has to be passed in by the plugin with `new VelocityCommandManager(proxy, this)`

- Velocity does not provide a way to get the Plugin logger with the provided Plugin or PluginContainer, so it must be fetched using `Logger logger = LoggerFactory.getLogger(plugin.getClass());` UNTESTED

- Velocity uses an annotation to signify the main class, meaning it can't be passed around like the Bukkit and Bungeecord JavaPlugin and Plugin. An Object has to be passed in which the PluginContainer is extracted from it using the Proxy's PluginManager 
`proxy.getPluginManager().getPlugin(plugin.getClass().getAnnotation(Plugin.class).id()).get();`

Any and all feedback is welcomed and appreciated.

*This implementation is essentially a copy/paste/rename. All code belongs to the original author, except the `ACFVelocityUtil#matchPlayer` which was originally written by md_5 and modified to use Velocity classes.*
This commit is contained in:
Crypnotic
2019-02-19 20:15:05 -06:00
committed by Daniel Ennis
parent 02230709ab
commit 9ad64975bc
16 changed files with 952 additions and 0 deletions
+1
View File
@@ -148,5 +148,6 @@
<module>bungee</module>
<module>sponge</module>
<module>jda</module>
<module>velocity</module>
</modules>
</project>