Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Replace remaining instances of worldeditregentempworld
Dieser Commit ist enthalten in:
Ursprung
722c411219
Commit
d6695d23f0
@ -222,7 +222,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
|
||||
try {
|
||||
Class.forName("org.spigotmc.SpigotConfig");
|
||||
SpigotConfig.config.set("world-settings.worldeditregentempworld.verbose", false);
|
||||
SpigotConfig.config.set("world-settings.faweregentempworld.verbose", false);
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
}
|
||||
@ -628,7 +628,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
Path tempDir = Files.createTempDirectory("FastAsyncWorldEditWorldGen");
|
||||
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
|
||||
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
|
||||
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("worldeditregentempworld", worldDimKey)) {
|
||||
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("faweregentempworld", worldDimKey)) {
|
||||
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
|
||||
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
|
||||
.getWorldData().overworldData();
|
||||
@ -640,7 +640,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
: originalOpts;
|
||||
|
||||
LevelSettings newWorldSettings = new LevelSettings(
|
||||
"worldeditregentempworld",
|
||||
"faweregentempworld",
|
||||
levelProperties.settings.gameType(),
|
||||
levelProperties.settings.hardcore(),
|
||||
levelProperties.settings.difficulty(),
|
||||
@ -674,7 +674,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, org.bukkit.World> map = (Map<String, org.bukkit.World>) worldsField.get(Bukkit.getServer());
|
||||
map.remove("worldeditregentempworld");
|
||||
map.remove("faweregentempworld");
|
||||
} catch (IllegalAccessException ignored) {
|
||||
}
|
||||
SafeFiles.tryHardToDeleteDir(tempDir);
|
||||
|
@ -223,7 +223,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
|
||||
try {
|
||||
Class.forName("org.spigotmc.SpigotConfig");
|
||||
SpigotConfig.config.set("world-settings.worldeditregentempworld.verbose", false);
|
||||
SpigotConfig.config.set("world-settings.faweregentempworld.verbose", false);
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
}
|
||||
@ -625,7 +625,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
Path tempDir = Files.createTempDirectory("FastAsyncWorldEditWorldGen");
|
||||
LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir);
|
||||
ResourceKey<LevelStem> worldDimKey = getWorldDimKey(env);
|
||||
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("worldeditregentempworld", worldDimKey)) {
|
||||
try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("faweregentempworld", worldDimKey)) {
|
||||
ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle();
|
||||
PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer()
|
||||
.getWorldData().overworldData();
|
||||
@ -637,7 +637,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
: originalOpts;
|
||||
|
||||
LevelSettings newWorldSettings = new LevelSettings(
|
||||
"worldeditregentempworld",
|
||||
"faweregentempworld",
|
||||
levelProperties.settings.gameType(),
|
||||
levelProperties.settings.hardcore(),
|
||||
levelProperties.settings.difficulty(),
|
||||
@ -671,7 +671,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, org.bukkit.World> map = (Map<String, org.bukkit.World>) worldsField.get(Bukkit.getServer());
|
||||
map.remove("worldeditregentempworld");
|
||||
map.remove("faweregentempworld");
|
||||
} catch (IllegalAccessException ignored) {
|
||||
}
|
||||
SafeFiles.tryHardToDeleteDir(tempDir);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren