13
0

Fix Search Click
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2023-04-22 15:40:12 +02:00
Ursprung 7d3fffa9da
Commit 8a474997c6
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -146,10 +146,10 @@ public class SchematicCommandUtils {
if (node.isDir()) {
schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(SchematicSystem.MESSAGE.parse("UTIL_LIST_OPEN_DIR", player)).create()));
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem list " + (behavior.isPublics() ? "public " : "") + breadcrumbs + node.getName() + "/"));
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem list " + (behavior.isPublics() ? "public " : "") + (behavior.nonCachedBreadcrumbs ? node.generateBreadcrumbs() : breadcrumbs + node.getName() + "/")));
} else {
schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(SchematicSystem.MESSAGE.parse("UTIL_LIST_OPEN_SCHEM", player)).create()));
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem info " + (behavior.isPublics() ? "public " : "") + breadcrumbs + node.getName()));
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem info " + (behavior.isPublics() ? "public " : "") + (behavior.nonCachedBreadcrumbs ? node.generateBreadcrumbs() : breadcrumbs + node.getName())));
}
player.spigot().sendMessage(schematics);
@ -194,6 +194,7 @@ public class SchematicCommandUtils {
@Builder.Default private boolean showPath = true;
@Builder.Default private boolean publics = false;
@Builder.Default private boolean nonCachedBreadcrumbs = false;
@Builder.Default private UnaryOperator<String> renderHook = s -> s;
@Builder.Default private IntFunction<String> pageCommandGen = value -> "/schem list " + value;
}

Datei anzeigen

@ -127,7 +127,7 @@ public class SearchPart extends SWCommand {
s = s.replace(ss, "§e§l" + ss + "§7");
}
return "§7" + s;
}).build());
}).setNonCachedBreadcrumbs(true).build());
}
@Mapper(value = "searchMapper", local = true)