Skip to content

Commit

Permalink
Centralise platform identification logic in velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
JLyne committed Dec 21, 2023
1 parent 6bf6ba3 commit d4a3734
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void onProxyInitialization(ProxyInitializeEvent event) {

@Subscribe
public void onClientBrand(PlayerClientBrandEvent event) {
platforms.put(event.getPlayer(), Platform.fromClientBrand(event.getBrand()));
platforms.remove(event.getPlayer());
}

public Platform getPlatform(Player player) {
Expand All @@ -69,7 +69,7 @@ public Platform getPlatform(Player player) {
return vivecraftHandler.getPlatform(player);
}

return null;
return Platform.fromClientBrand(player.getClientBrand());
});

return platform != null ? platform : Platform.JAVA;
Expand Down

0 comments on commit d4a3734

Please sign in to comment.