fix(mods): 加载器 mod 仅在正版验证的独立服务器上签发绑定码,README 标明只用 limbo token 及其风险
This commit is contained in:
5 files changed
+63
-3
No files matched your search
@@ -5,6 +5,7 @@ import best.lolicon.felis.link.LinkCode;
|
||||
import best.lolicon.felis.link.LinkConfig;
|
||||
import best.lolicon.felis.link.LinkConfigLoader;
|
||||
import best.lolicon.felis.link.LinkException;
|
||||
import best.lolicon.felis.link.ModLinkPolicy;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
@@ -68,6 +69,11 @@ public final class FelisFabricMod implements DedicatedServerModInitializer {
|
||||
source.sendFailure(Component.literal("/link 只能由玩家执行 / /link can only be run by a player."));
|
||||
return 0;
|
||||
}
|
||||
if (!source.getServer().usesAuthentication()) {
|
||||
LOGGER.warn(ModLinkPolicy.OFFLINE_LOG);
|
||||
source.sendFailure(Component.literal(ModLinkPolicy.OFFLINE_REPLY));
|
||||
return 0;
|
||||
}
|
||||
requestAndReply(source.getServer(), player);
|
||||
return 1;
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user