Remove BauSystem
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
b4466e6444
Commit
c0c22980a2
@ -57,7 +57,6 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
world = Bukkit.getWorlds().get(0);
|
||||
fixBauSystem();
|
||||
|
||||
// LOGGER
|
||||
fixLogging();
|
||||
@ -135,49 +134,6 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
}));
|
||||
}
|
||||
|
||||
private void fixBauSystem() {
|
||||
if (!new File(world.getWorldFolder(), "sections.yml").exists()) {
|
||||
try {
|
||||
Path path = new File(world.getWorldFolder(), "region").toPath();
|
||||
BasicFileAttributes attributes = Files.readAttributes(path, BasicFileAttributes.class);
|
||||
FileTime creationTime = attributes.creationTime();
|
||||
long millis = creationTime.toMillis();
|
||||
if (millis < 1611081960) {
|
||||
createLink("sections3.yml", "sections.yml");
|
||||
} else {
|
||||
createLink("sections4.yml", "sections.yml");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||
Bukkit.shutdown();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
int number = -1;
|
||||
try {
|
||||
String string = new File(world.getWorldFolder(), "sections.yml").getCanonicalPath();
|
||||
if (string.endsWith("/sections2.yml")) number = 2;
|
||||
if (string.endsWith("/sections3.yml")) number = 3;
|
||||
if (string.endsWith("/sections4.yml")) number = 4;
|
||||
Bukkit.getLogger().log(Level.INFO, "SectionFile: " + string);
|
||||
} catch (IOException e) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e);
|
||||
Bukkit.shutdown();
|
||||
return;
|
||||
}
|
||||
if (number == -1) {
|
||||
return;
|
||||
}
|
||||
if (!new File(world.getWorldFolder(),"prototypes.yapion").exists()) {
|
||||
createLink("prototypes" + number + ".yapion", "prototypes.yapion");
|
||||
}
|
||||
if (!new File(world.getWorldFolder(),"regions.yapion").exists()) {
|
||||
createLink("regions" + number + ".yapion", "regions.yapion");
|
||||
}
|
||||
}
|
||||
|
||||
private void createLink(String source, String destination) {
|
||||
try {
|
||||
Bukkit.getLogger().log(Level.INFO, "Executing: ln -s /home/minecraft/server/Bau15/{0} {1}", new String[]{source, destination});
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren