Skip to content

Commit

Permalink
Prevent NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Feb 10, 2021
1 parent 202ba1c commit 7d68788
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public void onDisable() {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
DeviceOS deviceOS = this.platformChecker.getBedrockPlatform(event.getPlayer().getUniqueId());
if (deviceOS == null) {
return;
}
if (!supportedDeviceOSList.contains(deviceOS)) {
event.getPlayer().kickPlayer("This server cannot be joined with your Bedrock platform!");
}
Expand Down

0 comments on commit 7d68788

Please sign in to comment.