public schematics can now be loaded
Signed-off-by: yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
6e348cd6ba
Commit
3bc4620bbd
@ -51,7 +51,7 @@ public class SchematicCommand implements CommandExecutor {
|
||||
|
||||
case 1:
|
||||
if(args[0].equalsIgnoreCase("list")) {
|
||||
sendPlayerSchematicList(0, 15, player);
|
||||
sendPlayerSchematicList(0, 15, WarkingUser.get(player.getUniqueId()).getId(), player);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -63,8 +63,13 @@ public class SchematicCommand implements CommandExecutor {
|
||||
|
||||
case 2:
|
||||
if(args[0].equalsIgnoreCase("list")) {
|
||||
if(args[1].equalsIgnoreCase("public")) {
|
||||
sendPlayerSchematicList(0, 15, 0, player);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
sendPlayerSchematicList(Integer.parseInt(args[1]), 15, player);
|
||||
sendPlayerSchematicList(Integer.parseInt(args[1]), 15, WarkingUser.get(player.getUniqueId()).getId(), player);
|
||||
return false;
|
||||
} catch (NumberFormatException ex) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDu musst eine Seitenzahl angeben!");
|
||||
@ -356,6 +361,19 @@ public class SchematicCommand implements CommandExecutor {
|
||||
return false;
|
||||
|
||||
case 3:
|
||||
if(args[0].equalsIgnoreCase("list")) {
|
||||
if(args[1].equalsIgnoreCase("public")) {
|
||||
try {
|
||||
sendPlayerSchematicList(Integer.parseInt(args[2]), 15, 0, player);
|
||||
return false;
|
||||
} catch (NumberFormatException ex) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDu musst eine Seitenzahl angeben!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(args[0].equalsIgnoreCase("load")) {
|
||||
if(!player.hasPermission("bau.team")) return false;
|
||||
WarkingUser warkingUser = WarkingUser.get(args[2]);
|
||||
@ -585,7 +603,7 @@ public class SchematicCommand implements CommandExecutor {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "Befehle:");
|
||||
player.sendMessage("§8/schem - §6Zeigt Informationen zum Plugin");
|
||||
player.sendMessage("§8/schem help - §6Zeigt eine Liste mit Befehlen");
|
||||
player.sendMessage("§8/schem list - §6Listet deine Schematics auf");
|
||||
player.sendMessage("§8/schem list (public) - §6Listet deine (oder Public) Schematics auf");
|
||||
player.sendMessage("§8/schem load <Name> [Besitzer] - §6Du lädst eine Schematic");
|
||||
player.sendMessage("§8/schem save <Name> - §6Du speicherst dein Clipboard als Datei");
|
||||
player.sendMessage("§8/schem changetype <Name> <airship/warship/miniwargear/wargear/normal> - §6Ändert den Typ deiner Schematic");
|
||||
@ -596,8 +614,8 @@ public class SchematicCommand implements CommandExecutor {
|
||||
|
||||
}
|
||||
|
||||
public static void sendPlayerSchematicList(int currentPage, int filesPerPage, Player player) {
|
||||
List<Schematic> schematicList = Schematic.getSchemsAccessibleByUser(player.getUniqueId());
|
||||
public static void sendPlayerSchematicList(int currentPage, int filesPerPage, int schemOwner, Player player) {
|
||||
List<Schematic> schematicList = Schematic.getSchemsAccessibleByUser(schemOwner);
|
||||
|
||||
if(schematicList.isEmpty()) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDu hast noch keine Schematic(s)!");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren