diff --git a/src/de/steamwar/schematicsystem/commands/GUI.java b/src/de/steamwar/schematicsystem/commands/GUI.java index 468249e..b6db76b 100644 --- a/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/src/de/steamwar/schematicsystem/commands/GUI.java @@ -164,8 +164,12 @@ class GUI { } static void list(Player p){ + list(p, WarkingUser.get(p.getUniqueId()).getId()); + } + + static void list(Player p, int pid){ List> schemList = new LinkedList<>(); - List schems = Schematic.getSchemsAccessibleByUser(p.getUniqueId()); + List schems = Schematic.getSchemsAccessibleByUser(pid); for(Schematic schem : schems) { Material m; diff --git a/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index 9feb5cb..ca30f61 100644 --- a/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -108,14 +108,7 @@ public class SchematicCommand implements CommandExecutor { } if("public".equalsIgnoreCase(args[1])){ - if(args.length == 3){ - try { - sendPlayerSchematicList(Integer.parseInt(args[2]), 0, player); - } catch (NumberFormatException ex) { - player.sendMessage(SchematicSystem.PREFIX + "§cUngültige Seitenzahl"); - } - }else - sendPlayerSchematicList(0, 0, player); + GUI.list(player, 0); return; }