From 299855cc35d4f595e0368f273d06448ce4c6d4ee Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 15 Aug 2020 18:29:39 +0200 Subject: [PATCH] Hotfix player not found bug Signed-off-by: Lixfel --- .../schematicsystem/commands/SchematicCommand.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index ec42e79..945b1e8 100644 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -420,26 +420,26 @@ public class SchematicCommand implements CommandExecutor { return; } - SteamwarUser warkingUser = SteamwarUser.get(args[2]); - if(warkingUser.getUUID() == null){ + SteamwarUser user = SteamwarUser.get(args[2]); + if(user == null){ player.sendMessage(SchematicSystem.PREFIX + "§cDieser Spieler existiert nicht"); return; } - if(schematic.getSchemOwner() == warkingUser.getId()){ + if(schematic.getSchemOwner() == user.getId()){ player.sendMessage(SchematicSystem.PREFIX + "§cAlso bitte: Das ist deine eigene Schematic!"); return; } - SchematicMember schematicMember = SchematicMember.getSchemMemberFromDB(schematic.getSchemName(), SteamwarUser.get(schematic.getSchemOwner()).getUUID(), warkingUser.getUUID()); + SchematicMember schematicMember = SchematicMember.getSchemMemberFromDB(schematic.getSchemName(), SteamwarUser.get(schematic.getSchemOwner()).getUUID(), user.getUUID()); if(schematicMember == null) { player.sendMessage(SchematicSystem.PREFIX + "§cDieser Spieler ist nicht auf die Schematic hinzugefügt"); return; } schematicMember.remove(); - player.sendMessage(SchematicSystem.PREFIX + "Der Spieler §e" + warkingUser.getUserName() + " §7hat keinen Zugriff mehr auf die Schematic §e" + schematic.getSchemName()); + player.sendMessage(SchematicSystem.PREFIX + "Der Spieler §e" + user.getUserName() + " §7hat keinen Zugriff mehr auf die Schematic §e" + schematic.getSchemName()); - Player target = Bukkit.getPlayer(warkingUser.getUUID()); + Player target = Bukkit.getPlayer(user.getUUID()); if(target != null) target.sendMessage(SchematicSystem.PREFIX + "Du hast keinen Zugriff mehr auf die Schematic §e" + schematic.getSchemName() + "§7von §e" + SteamwarUser.get(schematic.getSchemOwner()).getUserName()); }