SharwBlog/posts/20230902142755.html

264 lines
34 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>让Geyser用上外置登录使用Authlib-Injector | SharwOrangeのBlog小屋</title><meta name="author" content="SharwOrange"><meta name="copyright" content="SharwOrange"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="如果你是一位服主,又有意向兼容基岩版,但是担心基岩版无法使用外置登录,这个教程或许能帮助到你">
<meta property="og:type" content="article">
<meta property="og:title" content="让Geyser用上外置登录使用Authlib-Injector">
<meta property="og:url" content="https://blog.hope-now.top:8443/posts/20230902142755">
<meta property="og:site_name" content="SharwOrangeのBlog小屋">
<meta property="og:description" content="如果你是一位服主,又有意向兼容基岩版,但是担心基岩版无法使用外置登录,这个教程或许能帮助到你">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://blog.hope-now.top:8443/img/avatar.png">
<meta property="article:published_time" content="2023-09-02T06:27:55.000Z">
<meta property="article:modified_time" content="2024-06-02T13:47:08.702Z">
<meta property="article:author" content="SharwOrange">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://blog.hope-now.top:8443/img/avatar.png"><link rel="shortcut icon" href="/img/avatar.png"><link rel="canonical" href="https://blog.hope-now.top:8443/posts/20230902142755"><link rel="preconnect" href="//unpkg.com"/><link rel="stylesheet" href="/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://unpkg.com/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://unpkg.com/node-snackbar@0.1.16/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://unpkg.com/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: {"appId":"1HAQBDQMGS","apiKey":"56a1e4d9766bc4c1f6911c88099c4d33","indexName":"blog","hits":{"per_page":6},"languages":{"input_placeholder":"搜索文章","hits_empty":"找不到您查询的内容:${query}","hits_stats":"找到 ${hits} 条结果,用时 ${time} 毫秒"}},
localSearch: undefined,
translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
noticeOutdate: {"limitDay":60,"position":"top","messagePrev":"距离上次更新已经","messageNext":"天,文章内容可能已过时"},
highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '天',
dateSuffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: {"limitCount":50,"languages":{"author":"作者: SharwOrange","link":"链接: ","source":"来源: SharwOrangeのBlog小屋","info":"著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。"}},
lightbox: 'fancybox',
Snackbar: {"chs_to_cht":"你已切换为繁体中文","cht_to_chs":"你已切换为简体中文","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-right"},
infinitegrid: {
js: 'https://unpkg.com/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
buttonText: '加载更多'
},
isPhotoFigcaption: false,
islazyload: true,
isAnchor: false,
percent: {
toc: true,
rightside: true,
},
autoDarkmode: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '让Geyser用上外置登录使用Authlib-Injector',
isPost: true,
isHome: false,
isHighlightShrink: undefined,
isToc: true,
postUpdate: '2024-06-02 21:47:08'
}</script><script>(win=>{
win.saveToLocal = {
set: (key, value, ttl) => {
if (ttl === 0) return
const now = Date.now()
const expiry = now + ttl * 86400000
const item = {
value,
expiry
}
localStorage.setItem(key, JSON.stringify(item))
},
get: key => {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = Date.now()
if (now > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
Object.keys(attr).forEach(key => {
script.setAttribute(key, attr[key])
})
document.head.appendChild(script)
})
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = url
if (id) link.id = id
link.onerror = reject
link.onload = link.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
link.onload = link.onreadystatechange = null
resolve()
}
document.head.appendChild(link)
})
win.activateDarkMode = () => {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = () => {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
if (t === undefined) {
if (isLightMode) activateLightMode()
else if (isDarkMode) activateDarkMode()
else if (isNotSpecified || hasNoSupport) {
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
if (saveToLocal.get('theme') === undefined) {
e.matches ? activateDarkMode() : activateLightMode()
}
})
} else if (t === 'light') activateLightMode()
else activateDarkMode()
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><link rel="stylesheet" href="https://unpkg.com/lxgw-wenkai-screen-webfont" media="print" onload="this.media='all'"><link rel="stylesheet" href="//at.alicdn.com/t/c/font_4574301_6ji9zz4qvww.css"><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
const $loadingBox = document.getElementById('loading-box')
const $body = document.body
const preloader = {
endLoading: () => {
$body.style.overflow = ''
$loadingBox.classList.add('loaded')
},
initLoading: () => {
$body.style.overflow = 'hidden'
$loadingBox.classList.remove('loaded')
}
}
preloader.initLoading()
window.addEventListener('load',() => { preloader.endLoading() })
if (false) {
document.addEventListener('pjax:send', () => { preloader.initLoading() })
document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}
})()</script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/img/avatar.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">3</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友联</span></a></div><div class="menus_item"><a class="site-page" href="/artitalk/"><i class="fa-fw fa-fw fas fa-comment-dots"></i><span> 说说</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-heartbeat"></i><span> 网站</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://server1.hope-now.top:8443"><span> Hope Now Network Site Map</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://git.blog.hope-now.top"><span> Gitub 镜像站</span></a></li><li><a class="site-page child" href="https://blog.hope-now.top:8443"><span> 大陆镜像站</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog-info"><a href="/" title="SharwOrangeのBlog小屋"><img class="site-icon" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/img/avatar.png"/><span class="site-name">SharwOrangeのBlog小屋</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友联</span></a></div><div class="menus_item"><a class="site-page" href="/artitalk/"><i class="fa-fw fa-fw fas fa-comment-dots"></i><span> 说说</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-heartbeat"></i><span> 网站</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://server1.hope-now.top:8443"><span> Hope Now Network Site Map</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://git.blog.hope-now.top"><span> Gitub 镜像站</span></a></li><li><a class="site-page child" href="https://blog.hope-now.top:8443"><span> 大陆镜像站</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div id="post"><div id="post-info"><h1 class="post-title">让Geyser用上外置登录使用Authlib-Injector</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-09-02T06:27:55.000Z" title="发表于 2023-09-02 14:27:55">2023-09-02</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-06-02T13:47:08.702Z" title="更新于 2024-06-02 21:47:08">2024-06-02</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.1k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>3分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="让Geyser用上外置登录使用Authlib-Injector"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span><span class="post-meta-separator">|</span><span class="post-meta-commentcount"><i class="far fa-comments fa-fw post-meta-icon"></i><span class="post-meta-label">评论数:</span><a href="/posts/20230902142755#post-comment"><span id="twikoo-count"><i class="fa-solid fa-spinner fa-spin"></i></span></a></span></div></div></div><article class="post-content" id="article-container"><p>平心而论,在我开测试服的时候顺便兼容了基岩版本<del>加了Geyser插件</del>(本人也是一位服主)<br>而在正式服又忍受不了登录插件的许多毛病在外网ip只有一个而且还是DDNS来连接的情况下需要开不止一个服务器本身就是个问题<del>带端口也不好看主要是</del><br>在尝试跨服解决方案后又因为登录插件的问题导致有盗号漏洞<br>又想到了在很久之前因为没折腾出来基岩版的使用方案而被废弃的外置登录<br>在仔细看了<a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector">Authlib-Injector</a><a target="_blank" rel="noopener" href="https://github.com/GeyserMC/Geyser">Geyser</a>的关于基岩版使用外置的所有Issue之后折腾出了这么些方案 </p>
<hr>
<h3 id="准备环节"><a href="#准备环节" class="headerlink" title="准备环节"></a>准备环节</h3><ol>
<li>外置登录解决方案(这个应该不用多说了吧,这里用<a target="_blank" rel="noopener" href="https://github.com/bs-community/blessing-skin-server">Blessing Skin</a>加上其插件 <strong>Yggdrasil API</strong> 举例)</li>
<li>Geyser本文使用插件版独立版未测试但是理论可行需要在启动参数后面加上<a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector">Authlib-Injector</a>的启动参数来修改验证地址 <strong>服务端也要改成一样的地址</strong> </li>
<li>一个Minecraft服务器</li>
</ol>
<p>因为Geyser本身的问题无法使用有多角色的外置登录解决方案所以需要再加个插件<br><strong>单角色限制 single-player-limit</strong><br>由于载入之后需要选择一个角色来使用,其他角色会被清除(可能?)<br>所以推荐在没有玩家数据的情况下使用<del>不然玩家数据不就gg了对吧</del></p>
<h3 id="开始操作"><a href="#开始操作" class="headerlink" title="开始操作"></a>开始操作</h3><h4 id="外置登录解决方案的配置"><a href="#外置登录解决方案的配置" class="headerlink" title="外置登录解决方案的配置"></a>外置登录解决方案的配置</h4><p>安装Blessing Skin的步骤就不赘述了<a target="_blank" rel="noopener" href="https://blessing.netlify.app/setup.html">官方文档</a>已经写得很清楚了<br>仅仅安装完Blessing Skin还不够若要实现外置登录的功能需要进入管理面板左侧的插件市场安装 <strong>Yggdrasil API</strong> 插件和 <strong>单角色限制</strong> 插件</p>
<p>如果出现 “严重错误 Undefined array key “packages” ” 请在.env文件的最后一行加入如下内容</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">PLUGINS_REGISTRY=https://d2jw1l0ullrzt6.cloudfront.net/registry_&#123;lang&#125;.json</span><br></pre></td></tr></table></figure>
<h4 id="Minecraft服务端与Geyser的配置"><a href="#Minecraft服务端与Geyser的配置" class="headerlink" title="Minecraft服务端与Geyser的配置"></a>Minecraft服务端与Geyser的配置</h4><p>我想大家让服务器使用外置应该都是为了安全,和去掉登录插件(<del>香草</del>原版服务器无法使用插件功能)</p>
<p>在你的server.properties中开启正版验证由于验证地址由Authlib-Injector修改成了外置登录的地址所以这个正版验证会验证外置账户是否一致而不是Minecraft在线账户<br><figure class="highlight properties"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">online-mode</span>=<span class="string">true</span></span><br></pre></td></tr></table></figure></p>
<p>如果你是插件版的Geyser直接放入服务端的 <strong>Plugins</strong> 文件夹即可<br>如果你是独立版的Geyser下载下来后修改配置文件让Geyser连接到Java版本服务器即可<br>具体步骤请看<a target="_blank" rel="noopener" href="https://wiki.geysermc.org">Geyser官方文档</a><br>如果你啃不动生肉,这里有<a target="_blank" rel="noopener" href="https://geyser.superiormc.cn/">非官方的中文文档</a>,但是时效性问题,并不是最新的(怎么说呢,我因为这个原因排查了一个晚上版本的问题,最后才发现这两个手册已经差别很大了)</p>
<h3 id="进入服务器方式"><a href="#进入服务器方式" class="headerlink" title="进入服务器方式"></a>进入服务器方式</h3><p>Java版本应该不用多说<br>基岩版只需要进入服务器后选择“使用 Mojang 账户登录”<br>随后输入邮箱与密码(如果上面没有载入 <strong>单角色限制</strong> 插件,你会出现 <a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector/issues/220">此服务器需要一个付费的Java账号 后被踢出服务器</a></p>
<h4 id="可选-修改登录文字"><a href="#可选-修改登录文字" class="headerlink" title="(可选)修改登录文字"></a>(可选)修改登录文字</h4><p>其实这个就简单了不需要去改源码下载下来的jar文件用Bandizip或者7zip打开后找到languages文件夹中的texts文件夹./languages/texts<br>在里面找到你对应的语言文件修改即可</p>
<h3 id="结尾"><a href="#结尾" class="headerlink" title="结尾"></a>结尾</h3><p>到这里其实已经完成了(防火墙什么的应该不用说吧)<br>这么简单的东西对吧 <del>我折腾了几周才摸索出来是怎么个回事</del></p>
<hr>
<p>相关Issues<br><a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector/issues/83">https://github.com/yushijinhun/authlib-injector/issues/83</a><br><a target="_blank" rel="noopener" href="https://github.com/GeyserMC/MCProtocolLib/issues/552">https://github.com/GeyserMC/MCProtocolLib/issues/552</a><br><a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector/issues/132">https://github.com/yushijinhun/authlib-injector/issues/132</a><br><a target="_blank" rel="noopener" href="https://github.com/GeyserMC/Geyser/issues/1611">https://github.com/GeyserMC/Geyser/issues/1611</a><br><a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector/issues/132">https://github.com/yushijinhun/authlib-injector/issues/132</a><br><a target="_blank" rel="noopener" href="https://github.com/GeyserMC/Geyser/issues/1000">https://github.com/GeyserMC/Geyser/issues/1000</a><br><a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector/issues/83">https://github.com/yushijinhun/authlib-injector/issues/83</a><br><a target="_blank" rel="noopener" href="https://github.com/yushijinhun/authlib-injector/issues/220">https://github.com/yushijinhun/authlib-injector/issues/220</a><br><a target="_blank" rel="noopener" href="https://github.com/GeyserMC/Geyser/issues/974">https://github.com/GeyserMC/Geyser/issues/974</a><br><a target="_blank" rel="noopener" href="https://github.com/GeyserMC/Geyser/issues/1178">https://github.com/GeyserMC/Geyser/issues/1178</a></p>
<p>如果本文有些没提到的你可以去以上Issues寻找解决方案<del>或者在本文下留言(</del></p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://blog.hope-now.top:8443">SharwOrange</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://blog.hope-now.top:8443/posts/20230902142755">https://blog.hope-now.top:8443/posts/20230902142755</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://blog.hope-now.top:8443" target="_blank">SharwOrangeのBlog小屋</a></span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="/img/avatar.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://unpkg.com/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://unpkg.com/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/20230609182444" title="Blog终于弄好了"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Blog终于弄好了</div></div></a></div><div class="next-post pull-right"><a href="/posts/20230904214934" title="御三家启动器外置使用教程PCL2、HMCL、BakaXL"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">御三家启动器外置使用教程PCL2、HMCL、BakaXL</div></div></a></div></nav><hr class="custom-hr"/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/img/avatar.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">SharwOrange</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">3</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" href="/about/"><i class="fas fa-heart"></i><span>关于我</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="mailto:kuliangcha@qq.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a><a class="social-icon" href="https://github.com/SharwOrange" target="_blank" title="Github"><i class="fab fa-github" style="color: #808080;"></i></a><a class="social-icon" href="https://git.hope-now.top:8443" target="_blank" title="Gitea"><i class="iconfont icon-gitea" style="color: #609926;"></i></a><a class="social-icon" href="https://steamcommunity.com/id/SharwOrange" target="_blank" title="Steam"><i class="fa-brands fa-steam" style="color: #808080;"></i></a><a class="social-icon" href="https://space.bilibili.com/551097042" target="_blank" title="Bilibili"><i class="fa-brands fa-bilibili" style="color: #00a1d6;"></i></a></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%87%86%E5%A4%87%E7%8E%AF%E8%8A%82"><span class="toc-number">1.</span> <span class="toc-text">准备环节</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BC%80%E5%A7%8B%E6%93%8D%E4%BD%9C"><span class="toc-number">2.</span> <span class="toc-text">开始操作</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%96%E7%BD%AE%E7%99%BB%E5%BD%95%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E7%9A%84%E9%85%8D%E7%BD%AE"><span class="toc-number">2.1.</span> <span class="toc-text">外置登录解决方案的配置</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Minecraft%E6%9C%8D%E5%8A%A1%E7%AB%AF%E4%B8%8EGeyser%E7%9A%84%E9%85%8D%E7%BD%AE"><span class="toc-number">2.2.</span> <span class="toc-text">Minecraft服务端与Geyser的配置</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%BF%9B%E5%85%A5%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%96%B9%E5%BC%8F"><span class="toc-number">3.</span> <span class="toc-text">进入服务器方式</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%8F%AF%E9%80%89-%E4%BF%AE%E6%94%B9%E7%99%BB%E5%BD%95%E6%96%87%E5%AD%97"><span class="toc-number">3.1.</span> <span class="toc-text">(可选)修改登录文字</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BB%93%E5%B0%BE"><span class="toc-number">4.</span> <span class="toc-text">结尾</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/posts/20230904214934" title="御三家启动器外置使用教程PCL2、HMCL、BakaXL">御三家启动器外置使用教程PCL2、HMCL、BakaXL</a><time datetime="2023-09-04T13:49:34.000Z" title="发表于 2023-09-04 21:49:34">2023-09-04</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/posts/20230902142755" title="让Geyser用上外置登录使用Authlib-Injector">让Geyser用上外置登录使用Authlib-Injector</a><time datetime="2023-09-02T06:27:55.000Z" title="发表于 2023-09-02 14:27:55">2023-09-02</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/posts/20230609182444" title="Blog终于弄好了">Blog终于弄好了</a><time datetime="2023-06-09T10:24:44.000Z" title="发表于 2023-06-09 18:24:44">2023-06-09</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2023 - 2024 By SharwOrange</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a href="https://icp.gov.moe/?keyword=20231251" target="_blank">萌ICP备20231251号</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换"></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js?v=4.13.0"></script><script src="/js/main.js?v=4.13.0"></script><script src="/js/tw_cn.js?v=4.13.0"></script><script src="https://unpkg.com/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.js"></script><script src="https://unpkg.com/instant.page" type="module"></script><script src="https://unpkg.com/vanilla-lazyload@17.8.8/dist/lazyload.iife.min.js"></script><script src="https://unpkg.com/node-snackbar@0.1.16/dist/snackbar.min.js"></script><script>function panguFn () {
if (typeof pangu === 'object') pangu.autoSpacingPage()
else {
getScript('https://unpkg.com/pangu@4.0.7/dist/browser/pangu.min.js')
.then(() => {
pangu.autoSpacingPage()
})
}
}
function panguInit () {
if (false){
GLOBAL_CONFIG_SITE.isPost && panguFn()
} else {
panguFn()
}
}
document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"><script>(() => {
const getCount = () => {
const countELement = document.getElementById('twikoo-count')
if(!countELement) return
twikoo.getCommentsCount({
envId: 'https://twikoo.hope-now.top:8443/',
region: '',
urls: [window.location.pathname],
includeReply: false
}).then(res => {
countELement.textContent = res[0].count
}).catch(err => {
console.error(err)
})
}
const init = () => {
twikoo.init(Object.assign({
el: '#twikoo-wrap',
envId: 'https://twikoo.hope-now.top:8443/',
region: '',
onCommentLoaded: () => {
btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
}
}, null))
GLOBAL_CONFIG_SITE.isPost && getCount()
}
const loadTwikoo = () => {
if (typeof twikoo === 'object') setTimeout(init,0)
else getScript('https://unpkg.com/twikoo').then(init)
}
if ('Twikoo' === 'Twikoo' || !false) {
if (false) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
else loadTwikoo()
} else {
window.loadOtherComment = loadTwikoo
}
})()</script></div><script async data-pjax src="https://busuanzi.9420.ltd/js"></script><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr/><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div><script src="https://unpkg.com/algoliasearch@4.22.1/dist/algoliasearch-lite.umd.js"></script><script src="https://unpkg.com/instantsearch.js@4.65.0/dist/instantsearch.production.min.js"></script><script src="/js/search/algolia.js?v=4.13.0"></script></div></div></body></html>