mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Legacy API: return null if player is null
This commit is contained in:
parent
966c2155ad
commit
c3eaee6267
1 changed files with 12 additions and 2 deletions
|
@ -73,11 +73,21 @@ public class GeyserConnector {
|
|||
}
|
||||
|
||||
public GeyserSession getPlayerByXuid(String xuid) {
|
||||
return new GeyserSession(GeyserImpl.getInstance().connectionByXuid(xuid));
|
||||
org.geysermc.geyser.session.GeyserSession session = GeyserImpl.getInstance().connectionByXuid(xuid);
|
||||
if (session != null) {
|
||||
return new GeyserSession(session);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public GeyserSession getPlayerByUuid(UUID uuid) {
|
||||
return new GeyserSession(GeyserImpl.getInstance().connectionByUuid(uuid));
|
||||
org.geysermc.geyser.session.GeyserSession session = GeyserImpl.getInstance().connectionByUuid(uuid);
|
||||
if (session != null) {
|
||||
return new GeyserSession(session);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isProductionEnvironment() {
|
||||
|
|
Loading…
Reference in a new issue