Fix Schem Delete Member #116
@ -37,6 +37,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
@ -272,6 +273,9 @@ public class SchematicCommand extends SWCommand {
|
|||||||
if (!nodes.isEmpty()) {
|
if (!nodes.isEmpty()) {
|
||||||
for (SchematicNode schematicNode : nodes) {
|
for (SchematicNode schematicNode : nodes) {
|
||||||
SchematicNode newNode = mkdirs(schematicNode.generateBreadcrumbs(user).split("/"), target, 1);
|
SchematicNode newNode = mkdirs(schematicNode.generateBreadcrumbs(user).split("/"), target, 1);
|
||||||
|
if(SchematicNode.getSchematicNode(schematicNode.getName(), newNode == null ? 0 : newNode.getId()) != null) {
|
||||||
|
schematicNode.setName(schematicNode.getName() + "-" + Instant.now().getEpochSecond() % 1000);
|
||||||
|
}
|
||||||
schematicNode.setParent(newNode == null ? 0 : newNode.getId());
|
schematicNode.setParent(newNode == null ? 0 : newNode.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,14 +202,7 @@ public class SchematicCommandUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
player.sendMessage("§7Format: §e" + (node.getSchemFormat() ? ".schem" : ".schematic"));
|
player.sendMessage("§7Format: §e" + (node.getSchemFormat() ? ".schem" : ".schematic"));
|
||||||
List<CheckedSchematic> checkedSchematics = CheckedSchematic.getLastDeclined(player.getUniqueId());
|
CheckedSchematic.getLastDeclinedOfNode(node).stream().findFirst().ifPresent(checkedSchematic -> player.sendMessage("§cStatus: §c" + checkedSchematic.getStartTime() + " : " + checkedSchematic.getDeclineReason()));
|
||||||
for (CheckedSchematic checkedSchematic : checkedSchematics) {
|
|
||||||
if (checkedSchematic.getSchemName().equals(node.getName()) &&
|
|
||||||
checkedSchematic.getSchemOwner() == node.getOwner()) {
|
|
||||||
player.sendMessage("§cStatus: §c" + checkedSchematic.getStartTime() + " : " + checkedSchematic.getDeclineReason());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
List<String> schematicMembers = new ArrayList<>();
|
List<String> schematicMembers = new ArrayList<>();
|
||||||
NodeMember.getNodeMembers(node.getId()).forEach(nodeMember -> schematicMembers.add(SteamwarUser.get(nodeMember.getMember()).getUserName()));
|
NodeMember.getNodeMembers(node.getId()).forEach(nodeMember -> schematicMembers.add(SteamwarUser.get(nodeMember.getMember()).getUserName()));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren