Fix Search Click #147
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren