13
0

Update SchematicCommand to CommandFramework #99

Zusammengeführt
Chaoscaot hat 1 Commits von CommandFramework nach master 2021-12-28 13:31:19 +01:00 zusammengeführt
Nur Änderungen aus Commit 94711318f9 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -66,35 +66,18 @@ public class SchematicCommand extends SWCommand {
@Register("list")
@Register({"list", "/"})
public void schemList(Player player) {
renderSchemlist(player, SchematicNode.getSchematicsAccessibleByUser(getUser(player).getId(), 0), 0, "", false, null);
}
@Register("list")
@Register({"list", "/"})
public void schemList(Player player, int page) {
public void schemList(Player player, @OptionalValue("0") int page) {
renderSchemlist(player, SchematicNode.getSchematicsAccessibleByUser(getUser(player).getId(), 0), page, "", false, null);
}
@Register({"list", "public"})
public void schemListPublic(Player player, @Mapper("publicDirMapper") SchematicNode node) {
schemList(player, node);
}
@Register({"list", "public"})
public void schemListPublic(Player player, @Mapper("publicDirMapper") SchematicNode node, int page) {
public void schemListPublic(Player player, @Mapper("publicDirMapper") SchematicNode node, @OptionalValue("0") int page) {
schemList(player, node, page);
}
@Register({"list", "public"})
@Register({"list", "public", "/"})
public void schemListPublic(Player player) {
renderSchemlist(player, SchematicNode.getSchematicsAccessibleByUser(0, 0), 0, "", true, null);
}
@Register({"list", "public"})
@Register({"list", "public", "/"})
public void schemListPublic(Player player, int page) {
public void schemListPublic(Player player, @OptionalValue("0") int page) {
renderSchemlist(player, SchematicNode.getSchematicsAccessibleByUser(0, 0), page, "", true, null);
}
@ -105,17 +88,7 @@ public class SchematicCommand extends SWCommand {
}
@Register("list")
public void schemList(Player player, @Mapper("dirMapper") SchematicNode node) {
SteamwarUser user = getUser(player);
if (!node.isDir()) {
player.sendMessage(SchematicSystem.PREFIX + "Das ist eine Schematic und kein Ordner");
} else {
renderSchemlist(player, SchematicNode.getSchematicNodeInNode(node), 0, node.generateBreadcrumbs(user), node.getOwner() == 0, node);
}
}
@Register("list")
public void schemList(Player player, @Mapper("dirMapper") SchematicNode node, int page) {
public void schemList(Player player, @Mapper("dirMapper") SchematicNode node, @OptionalValue("0") int page) {
SteamwarUser user = getUser(player);
if (!node.isDir()) {
player.sendMessage(SchematicSystem.PREFIX + "Das ist eine Schematic und kein Ordner");