Fixing symlinks on world reset
Dieser Commit ist enthalten in:
Ursprung
bdf5ec20c6
Commit
736cdcdf36
17
pom.xml
17
pom.xml
@ -32,18 +32,6 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
@ -63,10 +51,5 @@
|
||||
<type>jar</type>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -3,7 +3,6 @@ package de.steamwar.bungeecore.bausystem;
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.sql.Bauwelt;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -40,8 +39,12 @@ public class BauSystem {
|
||||
File w = new File(BungeeCore.WorldFolder + owner);
|
||||
if (!w.exists() || !w.isDirectory()){
|
||||
try {
|
||||
FileUtils.copyDirectory(new File(BungeeCore.BauweltPrototyp), w);
|
||||
} catch (IOException e) {
|
||||
Process pr;
|
||||
ProcessBuilder pb = new ProcessBuilder(
|
||||
"cp", "-r", BungeeCore.BauweltPrototyp, BungeeCore.WorldFolder + owner);
|
||||
pr = pb.start();
|
||||
pr.waitFor();
|
||||
} catch (InterruptedException | IOException e) {
|
||||
e.printStackTrace();
|
||||
p.sendMessage(BungeeCore.ChatPrefix + "§cDas Erstellen der Welt ist fehlgeschlagen.");
|
||||
return;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren