Add error messages #129
@ -26,8 +26,6 @@ import de.steamwar.providers.BauServerInfo;
|
||||
import de.steamwar.schematicsystem.SafeSchematicNode;
|
||||
import de.steamwar.schematicsystem.SchematicSystem;
|
||||
import de.steamwar.sql.*;
|
||||
import lombok.extern.log4j.Log4j;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import net.md_5.bungee.api.chat.HoverEvent;
|
||||
@ -47,7 +45,6 @@ import java.util.stream.Collectors;
|
||||
import static de.steamwar.schematicsystem.commands.SchematicCommandHelp.*;
|
||||
import static de.steamwar.schematicsystem.commands.SchematicCommandUtils.*;
|
||||
|
||||
@Log4j2
|
||||
@SuppressWarnings("unused")
|
||||
public class SchematicCommand extends SWCommand {
|
||||
|
||||
@ -88,26 +85,22 @@ public class SchematicCommand extends SWCommand {
|
||||
@Register("list")
|
||||
@Register({"list", "/"})
|
||||
public void schemList(Player player, @OptionalValue(value = "1", onlyUINIG = true) int page) {
|
||||
log.info("list / page \"{}\"", page);
|
||||
renderSchemlist(player, SchematicNode.getSchematicsAccessibleByUser(getUser(player).getId(), 0), Math.max(page - 1, 0), null, SchematicListBehavior.DEFAULT);
|
||||
}
|
||||
|
||||
@Register({"list", "public"})
|
||||
public void schemListPublic(Player player, @Validator("isDirValidator") @Mapper("publicDirMapper") SchematicNode node, @OptionalValue("1") int page) {
|
||||
log.info("list public \"{}\" page \"{}\"", node.generateBreadcrumbs(getUser(player)), page);
|
||||
schemList(player, node, page);
|
||||
}
|
||||
|
||||
@Register({"list", "public"})
|
||||
@Register({"list", "public", "/"})
|
||||
public void schemListPublic(Player player, @OptionalValue(value = "1", onlyUINIG = true) int page) {
|
||||
log.info("list public \"/\" page \"{}\"", page);
|
||||
renderSchemlist(player, SchematicNode.getSchematicsAccessibleByUser(0, 0), Math.max(page - 1, 0), null, SchematicListBehavior.builder().setPublics(true).setPageCommandGen(integer -> "/schem list public " + integer).build());
|
||||
}
|
||||
|
||||
@Register("list")
|
||||
public void schemList(Player player, @Validator("isDirValidator") @Mapper("dirMapper") SchematicNode node, @OptionalValue("1") int page) {
|
||||
log.info("list \"{}\" page \"{}\"", node.generateBreadcrumbs(getUser(player)), page);
|
||||
SteamwarUser user = getUser(player);
|
||||
renderSchemlist(player, SchematicNode.getSchematicNodeInNode(node), Math.max(page - 1, 0), node, SchematicListBehavior.builder().setPublics(node.getOwner() == 0).setPageCommandGen(value -> "/schem list " + (node.getOwner()==0?"public ":"") + node.generateBreadcrumbs(user) + " " + value).build());
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren