From 1fbc3c883568569293aadca331a42ffefbcbebca Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 23 Feb 2023 17:01:12 +0100 Subject: [PATCH] Fix build --- .../src/de/steamwar/core/events/PlayerJoinedEvent.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java b/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java index aae2000..fe342bd 100644 --- a/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java +++ b/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java @@ -35,10 +35,7 @@ public class PlayerJoinedEvent implements Listener{ @EventHandler(priority = EventPriority.LOWEST) private void onJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); - if(!Statement.productionDatabase()) { - SteamwarUser.createOrUpdateUsername(player.getUniqueId(), player.getName()); - } - SteamwarUser user = SteamwarUser.get(player.getUniqueId()); + SteamwarUser user = Statement.productionDatabase() ? SteamwarUser.get(player.getUniqueId()) : SteamwarUser.getOrCreate(player.getUniqueId(), player.getName(), uuid -> {}, (oldName, newName) -> {}); if(user.getUserGroup() != UserGroup.Member) { UserGroup group = user.getUserGroup();