class Dispatcher extends CommandDispatcher<CommandSender> implements Listener {

    public static Dispatcher of(Plugin plugin) {
        var prefix = plugin.getName().toLowerCase();
        var server = ((CraftServer) plugin.getServer());
        
        var map = new SpigotMap(prefix, plugin, (CraftCommandMap) server.getCommandMap());
        var root = new Root(prefix, map);
        var dispatcher = new Dispatcher(server, root);
        map.dispatcher = dispatcher;
        
        server.getPluginManager().registerEvents(dispatcher, plugin);
        
        return dispatcher;
    }

    protected  Dispatcher(Server server, Root root);

}