mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-11 10:57:47 +01:00
Support non-yggdrasil implementations of MinecraftSessionService
This commit is contained in:
parent
f33804609e
commit
c767b6fdc3
v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util
v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util
v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util
@ -262,6 +262,9 @@ public class NMSImpl implements NMSBridge {
|
||||
|
||||
MinecraftSessionService sessionService = ((CraftServer) Bukkit.getServer()).getServer().ay();
|
||||
|
||||
if (!(sessionService instanceof YggdrasilMinecraftSessionService)) {
|
||||
return sessionService.fillProfileProperties(profile, requireSecure);
|
||||
}
|
||||
YggdrasilAuthenticationService auth = ((YggdrasilMinecraftSessionService) sessionService)
|
||||
.getAuthenticationService();
|
||||
|
||||
|
@ -284,6 +284,9 @@ public class NMSImpl implements NMSBridge {
|
||||
|
||||
MinecraftSessionService sessionService = ((CraftServer) Bukkit.getServer()).getServer().az();
|
||||
|
||||
if (!(sessionService instanceof YggdrasilMinecraftSessionService)) {
|
||||
return sessionService.fillProfileProperties(profile, requireSecure);
|
||||
}
|
||||
YggdrasilAuthenticationService auth = ((YggdrasilMinecraftSessionService) sessionService)
|
||||
.getAuthenticationService();
|
||||
|
||||
|
@ -288,7 +288,9 @@ public class NMSImpl implements NMSBridge {
|
||||
throw new IllegalStateException("NMS.fillProfileProperties cannot be invoked from the main thread.");
|
||||
|
||||
MinecraftSessionService sessionService = ((CraftServer) Bukkit.getServer()).getServer().az();
|
||||
|
||||
if (!(sessionService instanceof YggdrasilMinecraftSessionService)) {
|
||||
return sessionService.fillProfileProperties(profile, requireSecure);
|
||||
}
|
||||
YggdrasilAuthenticationService auth = ((YggdrasilMinecraftSessionService) sessionService)
|
||||
.getAuthenticationService();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user