Safe Schematic Node #105
@ -24,6 +24,7 @@ import de.steamwar.command.SWCommandUtils;
|
|||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
import de.steamwar.inventory.SWAnvilInv;
|
import de.steamwar.inventory.SWAnvilInv;
|
||||||
import de.steamwar.inventory.SchematicSelector;
|
import de.steamwar.inventory.SchematicSelector;
|
||||||
|
import de.steamwar.schematicsystem.SafeSchematicNode;
|
||||||
import de.steamwar.schematicsystem.SchematicSystem;
|
import de.steamwar.schematicsystem.SchematicSystem;
|
||||||
import de.steamwar.sql.*;
|
import de.steamwar.sql.*;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
@ -407,7 +408,11 @@ public class SchematicCommand extends SWCommand {
|
|||||||
player.sendMessage(SchematicSystem.PREFIX + "§cDas gibt nur Fehler, vertrau mir.");
|
player.sendMessage(SchematicSystem.PREFIX + "§cDas gibt nur Fehler, vertrau mir.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
node.setParent(newNode.getId());
|
SafeSchematicNode.Result result = SafeSchematicNode.setParent(user, node, newNode);
|
||||||
|
if(!result.isSuccessful()) {
|
||||||
|
result.sendError(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§7Die Schematic ist nun unter §e" + node.generateBreadcrumbs(user) + " §7zu finden");
|
player.sendMessage(SchematicSystem.PREFIX + "§7Die Schematic ist nun unter §e" + node.generateBreadcrumbs(user) + " §7zu finden");
|
||||||
}
|
}
|
||||||
@ -422,7 +427,11 @@ public class SchematicCommand extends SWCommand {
|
|||||||
if (invalidSchemName(player, new String[]{name})) {
|
if (invalidSchemName(player, new String[]{name})) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
node.setName(name);
|
SafeSchematicNode.Result result = SafeSchematicNode.setName(user, node, name);
|
||||||
|
if(!result.isSuccessful()) {
|
||||||
|
result.sendError(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§7Die Schematic heist nun §e" + node.generateBreadcrumbs(user));
|
player.sendMessage(SchematicSystem.PREFIX + "§7Die Schematic heist nun §e" + node.generateBreadcrumbs(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren