当前位置: 首页>>代码示例>>Java>>正文


Java YggdrasilAuthenticationService类代码示例

本文整理汇总了Java中net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService的典型用法代码示例。如果您正苦于以下问题:Java YggdrasilAuthenticationService类的具体用法?Java YggdrasilAuthenticationService怎么用?Java YggdrasilAuthenticationService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


YggdrasilAuthenticationService类属于net.minecraft.util.com.mojang.authlib.yggdrasil包,在下文中一共展示了YggdrasilAuthenticationService类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MinecraftServer

import net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; //导入依赖的package包/类
public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet
    this.X = new UserCache(this, a);
    j = this;
    this.d = proxy;
    // this.universe = file1; // CraftBukkit
    this.p = new ServerConnection(this);
    this.o = new CommandDispatcher();
    // this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init
    this.T = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString());
    this.U = this.T.createMinecraftSessionService();
    this.W = this.T.createProfileRepository();
    // CraftBukkit start
    this.options = options;
    // Try to see if we're actually running in a terminal, disable jline if not
    if (System.console() == null) {
        System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
        org.bukkit.craftbukkit.Main.useJline = false;
    }

    try {
        this.reader = new ConsoleReader(System.in, System.out);
        this.reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators
    } catch (Throwable e) {
        try {
            // Try again with jline disabled for Windows users without C++ 2008 Redistributable
            System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
            System.setProperty("user.language", "en");
            org.bukkit.craftbukkit.Main.useJline = false;
            this.reader = new ConsoleReader(System.in, System.out);
            this.reader.setExpandEvents(false);
        } catch (IOException ex) {
            i.warn((String) null, ex);
        }
    }
    Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));

    primaryThread = new ThreadServerApplication(this, "Server thread"); // Moved from main
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:39,代码来源:MinecraftServer.java

示例2: MinecraftServer

import net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; //导入依赖的package包/类
public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet
    net.minecraft.util.io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
    this.X = new UserCache(this, a);
    j = this;
    this.d = proxy;
    // this.universe = file1; // CraftBukkit
    // this.p = new ServerConnection(this); // Spigot
    this.o = new CommandDispatcher();
    // this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init
    this.T = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString());
    this.U = this.T.createMinecraftSessionService();
    this.W = this.T.createProfileRepository();
    // CraftBukkit start
    this.options = options;
    // Try to see if we're actually running in a terminal, disable jline if not
    if (System.console() == null) {
        System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
        org.bukkit.craftbukkit.Main.useJline = false;
    }

    try {
        this.reader = new ConsoleReader(System.in, System.out);
        this.reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators
    } catch (Throwable e) {
        try {
            // Try again with jline disabled for Windows users without C++ 2008 Redistributable
            System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
            System.setProperty("user.language", "en");
            org.bukkit.craftbukkit.Main.useJline = false;
            this.reader = new ConsoleReader(System.in, System.out);
            this.reader.setExpandEvents(false);
        } catch (IOException ex) {
            i.warn((String) null, ex);
        }
    }
    Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));

    primaryThread = new ThreadServerApplication(this, "Server thread"); // Moved from main
}
 
开发者ID:pvginkel,项目名称:Tweakkit-Server,代码行数:40,代码来源:MinecraftServer.java


注:本文中的net.minecraft.util.com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。