diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index bf885f4..f170b37 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -332,6 +332,7 @@ public class SchematicCommand extends SWCommand { return true; }); player.sendMessage("§eSchematics §8(§e" + nodes.size() + "§8)"); + int finalUserId = userId; nodes.forEach(node -> { String br = node.generateBreadcrumbs(user); String displayName = br; @@ -343,7 +344,7 @@ public class SchematicCommand extends SWCommand { } TextComponent schematics = new TextComponent("§7" + displayName); schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eSchematic verwalten").create())); - schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem info " + br)); + schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem info " + (finalUserId == 0 ? "public ":"") + br)); player.spigot().sendMessage(schematics); });