Commits vergleichen
1 Commits
master
...
member_par
Autor | SHA1 | Datum | |
---|---|---|---|
|
cd401a389e |
@ -432,7 +432,8 @@ public class SchematicCommand extends SWCommand {
|
|||||||
@Register("move")
|
@Register("move")
|
||||||
public void move(Player player, SchematicNode node, @Mapper("dirStringMapper") String name) {
|
public void move(Player player, SchematicNode node, @Mapper("dirStringMapper") String name) {
|
||||||
SteamwarUser user = getUser(player);
|
SteamwarUser user = getUser(player);
|
||||||
if (node.getOwner() != user.getId()) {
|
NodeMember member = NodeMember.getNodeMember(node.getId(), user.getId());
|
||||||
|
if (node.getOwner() != user.getId() && member == null) {
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§cDu kannst nur deine eigenen Schems verschieben.");
|
player.sendMessage(SchematicSystem.PREFIX + "§cDu kannst nur deine eigenen Schems verschieben.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -445,6 +446,7 @@ public class SchematicCommand extends SWCommand {
|
|||||||
String[] layers = name.split("/");
|
String[] layers = name.split("/");
|
||||||
if (invalidSchemName(player, layers)) return;
|
if (invalidSchemName(player, layers)) return;
|
||||||
SchematicNode newNode = mkdirs(layers, user, 0);
|
SchematicNode newNode = mkdirs(layers, user, 0);
|
||||||
|
if(node.getOwner() == user.getId()) {
|
||||||
if(SchematicNode.getAllParentsOfNode(newNode).contains(node)) {
|
if(SchematicNode.getAllParentsOfNode(newNode).contains(node)) {
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§cDas gibt nur Fehler, vertrau mir.");
|
player.sendMessage(SchematicSystem.PREFIX + "§cDas gibt nur Fehler, vertrau mir.");
|
||||||
return;
|
return;
|
||||||
@ -454,6 +456,9 @@ public class SchematicCommand extends SWCommand {
|
|||||||
result.sendError(player);
|
result.sendError(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
member.setParentNode(newNode == null ? null : node.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren