本文整理汇总了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
}
示例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
}