geforkt von SteamWar/BungeeCore
Fix geyser floodgate null
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
d4e2e80dd5
Commit
6d0a1f6bfd
@ -49,12 +49,18 @@ public class SubserverProtocolFixer extends BasicListener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void loginEvent(LoginEvent e) {
|
public void loginEvent(LoginEvent e) {
|
||||||
InitialHandler initialHandler = ((InitialHandler) e.getConnection());
|
InitialHandler initialHandler = ((InitialHandler) e.getConnection());
|
||||||
LoginResult.Property[] properties = initialHandler.getLoginProfile().getProperties();
|
|
||||||
try {
|
String extraData = "\00" + AddressUtil.sanitizeAddress(inetSocketAddress) + "\00" + UUIDUtils.undash(initialHandler.getUniqueId().toString());
|
||||||
String extraData = "\00" + AddressUtil.sanitizeAddress(inetSocketAddress) + "\00" + UUIDUtils.undash(initialHandler.getUniqueId().toString());
|
|
||||||
|
LoginResult result = initialHandler.getLoginProfile();
|
||||||
|
if (result != null) {
|
||||||
|
LoginResult.Property[] properties = result.getProperties();
|
||||||
if (properties.length > 0) {
|
if (properties.length > 0) {
|
||||||
extraData += "\00" + BungeeCord.getInstance().gson.toJson(properties);
|
extraData += "\00" + BungeeCord.getInstance().gson.toJson(properties);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
field.set(initialHandler, extraData);
|
field.set(initialHandler, extraData);
|
||||||
} catch (IllegalAccessException ex) {
|
} catch (IllegalAccessException ex) {
|
||||||
BungeeCord.getInstance().getLogger().log(Level.SEVERE, ex.getMessage(), ex);
|
BungeeCord.getInstance().getLogger().log(Level.SEVERE, ex.getMessage(), ex);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren