This is the Seriously Necessary Adapter Plugin to enable plugins written against the BungeeCord or Waterfall API to load and (kinda) run on Velocity. π
Simply add the Bungee plugins into the plugins folder inside the Snap plugin folder.
Snap will use it's own instance of BungeeCord's plugin manager to load the plugins from there and translate BungeeCord methods, classes as well as event calls to the respective Velocity ones and vice versa.
Originally I wanted to document the Velocity equivalents to Bungee events, methods and classes. This evolved into the idea of writing a converter for source code which led me to decide to try to make a plugin which can directly load Bungee plugins.
Seeing as the proxies don't have too much logic that seems to have worked although it is definitely a lot more inefficient than just running native Velocity plugins due lots of classes being in need of getting translated on the fly.
Technically this could be made in a way that is a lot more efficient by directly modifying the Velocity or BungeeCord source code to extend the respective other classes but in practice that massively increases the work required to get this plugin running, and that's all I wanted to do for now.
Most of it (hopefully). I mean that's the goal... make sure to report any issues!
Some functionality isn't easily recreated (e.g. group handling is not a thing in Velocity, use a permissions plugin) and of course anything related to hacking into Bungee-internals or packets wont work. Just write a Velocity plugin at that point...
Those functions not supported will throw an UnsupportedOperationException. Please report those including the plugin causing them on the issue tracker!
If you are sure that the plugin will work fine otherwise then you can have it return
default values by setting throw-unsupported-exception
to false
in the snap.conf
!
null
or set nothing. Instead
of erroring.TabCompleteEvent
, ProxyDefineCommandEvent
, ProxyExceptionEvent
.ServerDisconnectEvent
(only triggers on kicks),
ClientConnectEvent
(uses Velocity's LoginEvent
with PostOrder.FIRST
)
ConnectionInitEvent
(uses Velocity's LoginEvent
with PostOrder.EARLY
)You can download the jar via GitHub releases or get builds from the latest commits from the Minebench.de Jenkins.
For the start trying out the plugin and reporting what other plugins work and don't work would already help a ton figuring out what work is still needed.
Of course I would also appreciate monetary help if the plugin has helped you transition to Velocity either by directly using it or referencing its code to adapt Bungee plugins to get running on Velocity natively. (Did you know that GitHub is still doubling donations to my GitHub Sponsors page? π)
Yes, the base code of Snap is open source! Unless noted otherwise in the source it's licensed under LGPLv3 in order to be compatible with the shipped Waterfall/BungeeCord.
Snap
Copyright (c) 2020 Max Lee aka Phoenix616 (max@themoep.de)
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
Please note that BungeeCord is not Free Software and licensed under their own, BSD 3-Clause based license (which forbids usage of BungeeCord "for commercial software hosting services without written permission from the author") and that Waterfall uses an MIT License for its patches.
Therefore pre-built binaries of Snap would have to be distributed under Bungee's modified BSD 3-Clause license or a compatible one.