From 5d2b646367064fe6b32a6e27bc60072299b604be Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 24 Sep 2022 20:35:59 +0200 Subject: [PATCH] Adapt to commonDB --- src/de/steamwar/lobby/map/CustomMapCommand.java | 4 ++-- src/de/steamwar/lobby/portal/CommandPortal.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/lobby/map/CustomMapCommand.java b/src/de/steamwar/lobby/map/CustomMapCommand.java index 9d76bed..2bb13e2 100644 --- a/src/de/steamwar/lobby/map/CustomMapCommand.java +++ b/src/de/steamwar/lobby/map/CustomMapCommand.java @@ -41,7 +41,7 @@ public class CustomMapCommand extends SWCommand { @Register @SneakyThrows public void render(@Validator Player p, File file) { - if (SteamwarUser.get(p).getUserGroup() != UserGroup.Developer) { + if (SteamwarUser.get(p.getUniqueId()).getUserGroup() != UserGroup.Developer) { return; } if (!file.exists()) { @@ -54,7 +54,7 @@ public class CustomMapCommand extends SWCommand { @ClassValidator(value = Player.class, local = true) public TypeValidator getGuardChecker() { return (commandSender, player, messageSender) -> { - return SteamwarUser.get(player).getUserGroup() == UserGroup.Developer; + return SteamwarUser.get(player.getUniqueId()).getUserGroup() == UserGroup.Developer; }; } diff --git a/src/de/steamwar/lobby/portal/CommandPortal.java b/src/de/steamwar/lobby/portal/CommandPortal.java index 64552dd..1362aa6 100644 --- a/src/de/steamwar/lobby/portal/CommandPortal.java +++ b/src/de/steamwar/lobby/portal/CommandPortal.java @@ -84,7 +84,7 @@ public class CommandPortal implements PortalHandler { if(ModifyCommand.modifying(player)) player.sendMessage("/" + cmd); - NetworkSender.send(new ExecuteCommandPacket(SteamwarUser.get(player).getId(), cmd.toString())); + NetworkSender.send(new ExecuteCommandPacket(SteamwarUser.get(player.getUniqueId()).getId(), cmd.toString())); } @Override