Skip to content

Commit

Permalink
prog
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldmensch committed Sep 13, 2024
1 parent 0ee059b commit 31a508d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
}

World teamWorld = duplicator.duplicate(player.getName());
Team team = new Team(player, List.of(), teamWorld);
Team team = new Team(player, new ArrayList<>(), teamWorld);
plugin.teams().add(team);
player.sendMessage(MiniMessage.miniMessage().deserialize("<green>Team with name %s created".formatted(player.getName())));
}
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/club/devcord/gamejam/world/WorldDuplicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
import org.bukkit.WorldCreator;

import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;

public class WorldDuplicator {
Expand Down Expand Up @@ -54,6 +51,7 @@ private void recursiveCopy(Path from, Path to) {

private void recursiveDelete(Path path) {
try {
if (Files.notExists(path)) return;
Files.walkFileTree(path,
new SimpleFileVisitor<>() {
@Override
Expand Down

0 comments on commit 31a508d

Please sign in to comment.